Skip to content

Commit e363387

Browse files
committed
Remove the final command test from the base, make it a "defaults" test
1 parent 75bcd96 commit e363387

File tree

4 files changed

+36
-20
lines changed

4 files changed

+36
-20
lines changed

.github/workflows/deploy.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,11 @@ jobs:
6666
echo "os: ubuntu" >goss_vars_${GH_RUNNER_IMAGE}.yaml
6767
echo "oscodename: ${{ matrix.release }}" >>goss_vars_${GH_RUNNER_IMAGE}.yaml
6868
echo "arch: ${{ matrix.platform }}" >>goss_vars_${GH_RUNNER_IMAGE}.yaml
69+
# test the base
6970
GOSS_VARS=goss_vars_${GH_RUNNER_IMAGE}.yaml GOSS_FILE=goss_base.yaml GOSS_SLEEP=1 dgoss run --entrypoint /usr/bin/sleep -e RUNNER_NAME=test -e DEBUG_ONLY=true ${GH_RUNNER_IMAGE} 10
71+
# test the final image but with all defaults
72+
GOSS_VARS=goss_vars_${GH_RUNNER_IMAGE}.yaml GOSS_FILE=goss_full_defaults.yaml GOSS_SLEEP=1 dgoss run --entrypoint /usr/bin/sleep -e RUNNER_NAME=test -e DEBUG_ONLY=true ${GH_RUNNER_IMAGE} 10
73+
# test the final image but with non-default values
7074
GOSS_VARS=goss_vars_${GH_RUNNER_IMAGE}.yaml GOSS_FILE=goss_full.yaml GOSS_SLEEP=1 dgoss run --entrypoint /usr/bin/sleep \
7175
-e DEBUG_ONLY=true \
7276
-e RUNNER_NAME=huzzah \
@@ -141,7 +145,11 @@ jobs:
141145
echo "os: debian" >goss_vars_${GH_RUNNER_IMAGE}.yaml
142146
echo "oscodename: ${{ matrix.release }}" >>goss_vars_${GH_RUNNER_IMAGE}.yaml
143147
echo "arch: ${{ matrix.platform }}" >>goss_vars_${GH_RUNNER_IMAGE}.yaml
148+
# test the base
144149
GOSS_VARS=goss_vars_${GH_RUNNER_IMAGE}.yaml GOSS_FILE=goss_base.yaml GOSS_SLEEP=1 dgoss run --entrypoint /usr/bin/sleep -e RUNNER_NAME=test -e DEBUG_ONLY=true ${GH_RUNNER_IMAGE} 10
150+
# test the final image but with all defaults
151+
GOSS_VARS=goss_vars_${GH_RUNNER_IMAGE}.yaml GOSS_FILE=goss_full_defaults.yaml GOSS_SLEEP=1 dgoss run --entrypoint /usr/bin/sleep -e RUNNER_NAME=test -e DEBUG_ONLY=true ${GH_RUNNER_IMAGE} 10
152+
# test the final image but with non-default values
145153
GOSS_VARS=goss_vars_${GH_RUNNER_IMAGE}.yaml GOSS_FILE=goss_full.yaml GOSS_SLEEP=1 dgoss run --entrypoint /usr/bin/sleep \
146154
-e DEBUG_ONLY=true \
147155
-e RUNNER_NAME=huzzah \

.github/workflows/test.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,11 @@ jobs:
6969
echo "os: ubuntu" >goss_vars_${GH_RUNNER_IMAGE}.yaml
7070
echo "oscodename: ${{ matrix.release }}" >>goss_vars_${GH_RUNNER_IMAGE}.yaml
7171
echo "arch: ${{ matrix.platform }}" >>goss_vars_${GH_RUNNER_IMAGE}.yaml
72+
# test the base
7273
GOSS_VARS=goss_vars_${GH_RUNNER_IMAGE}.yaml GOSS_FILE=goss_base.yaml GOSS_SLEEP=1 dgoss run --entrypoint /usr/bin/sleep -e RUNNER_NAME=test -e DEBUG_ONLY=true ${GH_RUNNER_IMAGE} 10
74+
# test the final image but with all defaults
75+
GOSS_VARS=goss_vars_${GH_RUNNER_IMAGE}.yaml GOSS_FILE=goss_full_defaults.yaml GOSS_SLEEP=1 dgoss run --entrypoint /usr/bin/sleep -e RUNNER_NAME=test -e DEBUG_ONLY=true ${GH_RUNNER_IMAGE} 10
76+
# test the final image but with non-default values
7377
GOSS_VARS=goss_vars_${GH_RUNNER_IMAGE}.yaml GOSS_FILE=goss_full.yaml GOSS_SLEEP=1 dgoss run --entrypoint /usr/bin/sleep \
7478
-e DEBUG_ONLY=true \
7579
-e RUNNER_NAME=huzzah \
@@ -148,7 +152,11 @@ jobs:
148152
echo "os: debian" >goss_vars_${GH_RUNNER_IMAGE}.yaml
149153
echo "oscodename: ${{ matrix.release }}" >>goss_vars_${GH_RUNNER_IMAGE}.yaml
150154
echo "arch: ${{ matrix.platform }}" >>goss_vars_${GH_RUNNER_IMAGE}.yaml
155+
# test the base
151156
GOSS_VARS=goss_vars_${GH_RUNNER_IMAGE}.yaml GOSS_FILE=goss_base.yaml GOSS_SLEEP=1 dgoss run --entrypoint /usr/bin/sleep -e RUNNER_NAME=test -e DEBUG_ONLY=true ${GH_RUNNER_IMAGE} 10
157+
# test the final image but with all defaults
158+
GOSS_VARS=goss_vars_${GH_RUNNER_IMAGE}.yaml GOSS_FILE=goss_full_defaults.yaml GOSS_SLEEP=1 dgoss run --entrypoint /usr/bin/sleep -e RUNNER_NAME=test -e DEBUG_ONLY=true ${GH_RUNNER_IMAGE} 10
159+
# test the final image but with non-default values
152160
GOSS_VARS=goss_vars_${GH_RUNNER_IMAGE}.yaml GOSS_FILE=goss_full.yaml GOSS_SLEEP=1 dgoss run --entrypoint /usr/bin/sleep \
153161
-e DEBUG_ONLY=true \
154162
-e RUNNER_NAME=huzzah \

goss_base.yaml

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -87,23 +87,3 @@ group:
8787
runner:
8888
exists: true
8989
gid: 121
90-
command:
91-
/entrypoint.sh something:
92-
exit-status: 0
93-
stdout:
94-
- REPO_URL required for repo runners
95-
- Runner reusage is disabled
96-
- ""
97-
- 'Disable automatic registration: false'
98-
- 'Random runner suffix: true'
99-
- 'Runner name: test'
100-
- 'Runner workdir: /_work/test'
101-
- 'Labels: default'
102-
- 'Runner Group: Default'
103-
- 'Github Host: github.com'
104-
- Run as root:true
105-
- 'Start docker: false'
106-
- Running something
107-
- ""
108-
stderr: ""
109-
timeout: 2000

goss_full_defaults.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
command:
2+
/entrypoint.sh something:
3+
exit-status: 0
4+
stdout:
5+
- REPO_URL required for repo runners
6+
- Runner reusage is disabled
7+
- ""
8+
- 'Disable automatic registration: false'
9+
- 'Random runner suffix: true'
10+
- 'Runner name: test'
11+
- 'Runner workdir: /_work/test'
12+
- 'Labels: default'
13+
- 'Runner Group: Default'
14+
- 'Github Host: github.com'
15+
- Run as root:true
16+
- 'Start docker: false'
17+
- Running something
18+
- ""
19+
stderr: ""
20+
timeout: 2000

0 commit comments

Comments
 (0)