Skip to content

Commit d020e04

Browse files
committed
label pods under test after waiting for all pods to come up
1 parent 1193a80 commit d020e04

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

run-basic-batch-operators-test.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -452,17 +452,18 @@ while IFS=, read -r package_name catalog; do
452452

453453
echo_color "$BLUE" "operator $package_name installed"
454454

455+
echo_color "$BLUE" "Wait to ensure all pods are running"
456+
# Extra wait to ensure that all pods are running
457+
sleep 30
458+
459+
echo_color "$BLUE" "Label deployments, statefulsets, pods"
455460
# Label deployments, statefulsets and pods with "test-network-function.com/generic=target"
456461
{
457462
oc get deployment -n "$ns" -o custom-columns=':.metadata.name,:.metadata.namespace,:.kind' | sed '/^ *$/d' | awk '{print " oc label " $3 " -n " $2 " " $1 " test-network-function.com/generic=target "}' | bash || true
458463
oc get statefulset -n "$ns" -o custom-columns=':.metadata.name,:.metadata.namespace,:.kind' | sed '/^ *$/d' | awk '{print " oc label " $3 " -n " $2 " " $1 " test-network-function.com/generic=target "}' | bash || true
459464
oc get pods -n "$ns" -o custom-columns=':.metadata.name,:.metadata.namespace,:.kind' | sed '/^ *$/d' | awk '{print " oc label " $3 " -n " $2 " " $1 " test-network-function.com/generic=target "}' | bash || true
460465
} >>"$LOG_FILE_PATH" 2>&1
461466

462-
echo_color "$BLUE" "Wait to ensure all pods are running"
463-
# Extra wait to ensure that all pods are running
464-
sleep 30
465-
466467
# run tnf-container
467468
echo_color "$BLUE" "run CNF suite"
468469
TNF_LOG_LEVEL=trace ./run-tnf-container.sh -k "$KUBECONFIG" -t "$report_dir" -o "$report_dir" -c "$DOCKER_CONFIG" -l all >>"$LOG_FILE_PATH" 2>&1 || {

0 commit comments

Comments
 (0)