From 843743ed172198e0eda08154895e6f27bd4f206f Mon Sep 17 00:00:00 2001 From: Ryan Ohnemus Date: Tue, 23 Jan 2024 02:03:49 -0600 Subject: [PATCH] add test pod name to test pod output (#132) Signed-off-by: ryanohnemus --- tests/kubernetes-plugins/basic.bats | 2 +- tests/kubernetes-plugins/full.bats | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/kubernetes-plugins/basic.bats b/tests/kubernetes-plugins/basic.bats index 15e0c0a..78198d6 100644 --- a/tests/kubernetes-plugins/basic.bats +++ b/tests/kubernetes-plugins/basic.bats @@ -60,7 +60,7 @@ setup() { teardown() { if [[ "${SKIP_TEARDOWN:-no}" != "yes" ]]; then if [[ ! -z "$TEST_POD_NAME" ]]; then - run kubectl delete pod $TEST_POD_NAME --grace-period 0 + run kubectl delete pod $TEST_POD_NAME -n $TEST_NAMESPACE --grace-period 1 --wait fi fi } diff --git a/tests/kubernetes-plugins/full.bats b/tests/kubernetes-plugins/full.bats index c00b0f5..a6e9e1d 100644 --- a/tests/kubernetes-plugins/full.bats +++ b/tests/kubernetes-plugins/full.bats @@ -97,7 +97,7 @@ function create_test_pod() { kubectl run -n $TEST_NAMESPACE $TEST_POD_NAME --image=docker.io/library/alpine:latest -l "this_is_a_test_label=true" \ --overrides="{\"apiVersion\":\"v1\",\"spec\":{\"nodeSelector\":{\"kubernetes.io/hostname\":\"$node_name\"}}}" \ - --command -- sh -c 'while true; do echo "hello world"; sleep 1; done' + --command -- sh -c "while true; do echo 'hello world from ${TEST_POD_NAME}'; sleep 1; done" try "at most 30 times every 2s " \ "to find 1 pods named '$TEST_POD_NAME' " \