Skip to content

Commit 94e4df3

Browse files
author
Tiexin Guo
committed
test: add variables into e2e test
1 parent e22d99b commit 94e4df3

File tree

3 files changed

+18
-12
lines changed

3 files changed

+18
-12
lines changed

.github/workflows/e2e-test.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,13 @@ jobs:
6262
run: |
6363
aws eks update-kubeconfig --region ap-southeast-1 --name dtm-test
6464
- name: apply
65-
run: ./dtm apply -f ./test/e2e/yaml/e2e-config.yaml -y
65+
run: ./dtm apply -f ./test/e2e/yaml/e2e-config.yaml --var-file ./test/e2e/yaml/e2e-variables.yaml -y
6666
- name: apply twice
67-
run: ./dtm apply -f ./test/e2e/yaml/e2e-config.yaml -y
67+
run: ./dtm apply -f ./test/e2e/yaml/e2e-config.yaml --var-file ./test/e2e/yaml/e2e-variables.yaml -y
6868
- name: check if pod is ready
6969
run: while [[ $(kubectl get pods -l app=dtm-e2e-go -o 'jsonpath={..status.conditions[?(@.type=="Ready")].status}') != "True" ]]; do echo "pod not ready yet..."; sleep 3; done
7070
timeout-minutes: 10
7171
- name: verify
72-
run: ./dtm verify -f ./test/e2e/yaml/e2e-config.yaml
72+
run: ./dtm verify -f ./test/e2e/yaml/e2e-config.yaml --var-file ./test/e2e/yaml/e2e-variables.yaml
7373
- name: clean
74-
run: ./dtm delete -f ./test/e2e/yaml/e2e-config.yaml -y
74+
run: ./dtm delete -f ./test/e2e/yaml/e2e-config.yaml --var-file ./test/e2e/yaml/e2e-variables.yaml -y

test/e2e/yaml/e2e-config.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ tools:
22
- name: go-webapp-repo
33
plugin: github-repo-scaffolding-golang
44
options:
5-
org: devstream-io
6-
repo: dtm-e2e-go
7-
branch: main
8-
image_repo: dtme2etest/dtm-e2e-go
5+
org: [[ githubOrganization]]
6+
repo: [[ repoName ]]
7+
branch: [[ defaultBranch ]]
8+
image_repo: [[ dockerRegistryUserName ]]/[[ repoName ]]
99
- name: golang-demo-actions
1010
plugin: githubactions-golang
1111
dependsOn: ["go-webapp-repo.github-repo-scaffolding-golang"]
@@ -15,7 +15,7 @@ tools:
1515
language:
1616
name: go
1717
version: "1.17"
18-
branch: main
18+
branch: [[ defaultBranch ]]
1919
build:
2020
enable: True
2121
test:
@@ -34,17 +34,17 @@ tools:
3434
chart:
3535
chart_name: argo/argo-cd
3636
release_name: argocd
37-
namespace: argocd
37+
namespace: [[ argocdNameSpace ]]
3838
wait: true
39-
timeout: 10m
39+
timeout: [[ argocdDeployTimeout ]]
4040
upgradeCRDs: true
4141
- name: go-webapp-argocd-deploy
4242
plugin: argocdapp
4343
dependsOn: ["argocd.argocd", "go-webapp-repo.github-repo-scaffolding-golang"]
4444
options:
4545
app:
4646
name: ${{go-webapp-repo.github-repo-scaffolding-golang.outputs.repo}}
47-
namespace: argocd
47+
namespace: [[ argocdNameSpace ]]
4848
destination:
4949
server: https://kubernetes.default.svc
5050
namespace: default

test/e2e/yaml/e2e-variables.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
defaultBranch: main
2+
githubOrganization: devstream-io
3+
repoName: dtm-e2e-go
4+
dockerRegistryUserName: dtme2etest
5+
argocdNameSpace: argocd
6+
argocdDeployTimeout: 10m

0 commit comments

Comments
 (0)