Skip to content

Commit 98847e0

Browse files
ab-ghoshsavitaashture
authored andcommitted
ADD: e2e-test for BUILD_ARG
Signed-off-by: Abhishek Ghosh <[email protected]>
1 parent 37ecb3c commit 98847e0

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed

test/e2e/e2e-buildah.bats

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,25 @@ declare -rx E2E_BUILDAH_PARAMS_IMAGE="${E2E_BUILDAH_PARAMS_IMAGE:-}"
5959
# waiting a few seconds before asserting results
6060
sleep 30
6161
assert_success
62+
63+
# cleaning up all the existing resources before starting a new taskrun, the test assertion
64+
# will describe the objects on the current namespace
65+
run kubectl delete taskrun --all
66+
assert_success
67+
68+
run kubectl delete pipelinerun --all
69+
assert_success
70+
71+
72+
#
73+
# Testing BUILD_ARGS params
74+
#
75+
run kubectl delete -f ./test/e2e/resources/cm-build-extra-args-test.yaml
76+
run kubectl apply -f ./test/e2e/resources/cm-build-extra-args-test.yaml
77+
78+
run kubectl apply -f ./test/e2e/resources/build-arg-taskrun.yaml
79+
80+
# waiting a few seconds before asserting results
81+
sleep 30
82+
assert_success
6283
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
apiVersion: tekton.dev/v1
3+
kind: TaskRun
4+
metadata:
5+
name: test-build-args-task
6+
spec:
7+
params:
8+
- name: IMAGE
9+
value: "test:latest"
10+
- name: TLS_VERIFY
11+
value: "false"
12+
- name: VERBOSE
13+
value: "true"
14+
- name: BUILD_ARGS
15+
value:
16+
- EXTRA_ARGS_TEST="abc def"
17+
- name: SKIP_PUSH
18+
value: "true"
19+
serviceAccountName: pipeline
20+
taskRef:
21+
name: buildah
22+
workspaces:
23+
- name: source
24+
configMap:
25+
name: test-extra-args

0 commit comments

Comments
 (0)