Skip to content

Commit 026a4c5

Browse files
authored
Allow select the namespace in the test service account (#335)
1 parent 9e5ffb0 commit 026a4c5

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

scripts/deploy-test-pods.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,11 @@ if [[ $NUM_NODES == 1 ]]; then
1616
REPLICAS=1
1717
fi
1818

19+
# shellcheck disable=SC2002 # Useless cat.
20+
cat ./test-target/test-service-account.yaml | "$SCRIPT_DIR"/mo >./temp/rendered-test-service-account-template.yaml
1921
# shellcheck disable=SC2002 # Useless cat.
2022
cat ./test-target/local-pod-under-test.yaml | APP="testdp" RESOURCE_TYPE="Deployment" MULTUS_ANNOTATION=$MULTUS_ANNOTATION REPLICAS=$REPLICAS "$SCRIPT_DIR"/mo >./temp/rendered-local-pod-under-test-template.yaml
21-
oc apply --filename ./test-target/test-service-account.yaml
23+
oc apply --filename ./temp/rendered-test-service-account-template.yaml
2224
oc apply --filename ./temp/rendered-local-pod-under-test-template.yaml
23-
rm ./temp/rendered-local-pod-under-test-template.yaml
25+
rm ./temp/rendered-test-service-account-template.yaml ./temp/rendered-local-pod-under-test-template.yaml
2426
oc wait deployment test -n "$TNF_EXAMPLE_CNF_NAMESPACE" --for=condition=available --timeout="$TNF_DEPLOYMENT_TIMEOUT"

test-target/test-service-account.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ apiVersion: v1
33
kind: ServiceAccount
44
metadata:
55
name: test-pod-sa
6-
namespace: tnf
6+
namespace: {{ TNF_EXAMPLE_CNF_NAMESPACE }}

0 commit comments

Comments
 (0)