Skip to content

Commit fc41bd5

Browse files
authored
Merge pull request #90 from buildkite-plugins/toote_kubernetes_compatibility
Kubernetes stack compatibility
2 parents c8bd9c3 + 17625e3 commit fc41bd5

File tree

4 files changed

+35
-35
lines changed

4 files changed

+35
-35
lines changed
File renamed without changes.

tests/post-checkout-tgz.bats renamed to tests/pre-command-tgz.bats

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ teardown() {
4141
'exists \* : exit 0' \
4242
"get \* \* : echo restoring \$2 to \$3"
4343

44-
run "$PWD/hooks/post-checkout"
44+
run "$PWD/hooks/pre-command"
4545

4646
assert_success
4747
assert_output --partial 'Cache hit at file level'
@@ -58,7 +58,7 @@ teardown() {
5858
'exists \* : exit 0' \
5959
"get \* \* : echo restoring \$2 to \$3"
6060

61-
run "$PWD/hooks/post-checkout"
61+
run "$PWD/hooks/pre-command"
6262

6363
assert_success
6464
assert_output --partial 'Cache hit at file level'
@@ -75,7 +75,7 @@ teardown() {
7575
'exists \* : exit 0' \
7676
"get \* \* : echo restoring \$2 to \$3"
7777

78-
run "$PWD/hooks/post-checkout"
78+
run "$PWD/hooks/pre-command"
7979

8080
assert_success
8181
assert_output --partial 'Cache hit at step level'
@@ -93,7 +93,7 @@ teardown() {
9393
'exists \* : exit 0' \
9494
"get \* \* : echo restoring \$2 to \$3"
9595

96-
run "$PWD/hooks/post-checkout"
96+
run "$PWD/hooks/pre-command"
9797

9898
assert_success
9999
assert_output --partial 'Cache hit at branch level'
@@ -111,7 +111,7 @@ teardown() {
111111
'exists \* : exit 0' \
112112
"get \* \* : echo restoring \$2 to \$3"
113113

114-
run "$PWD/hooks/post-checkout"
114+
run "$PWD/hooks/pre-command"
115115

116116
assert_success
117117
assert_output --partial 'Cache hit at pipeline level'
@@ -131,7 +131,7 @@ teardown() {
131131
'exists \* : exit 0' \
132132
"get \* \* : echo restoring \$2 to \$3"
133133

134-
run "$PWD/hooks/post-checkout"
134+
run "$PWD/hooks/pre-command"
135135

136136
assert_success
137137
assert_output --partial 'Cache hit at all level'
@@ -149,7 +149,7 @@ teardown() {
149149
'exists \* : exit 0' \
150150
"get \* \* : echo restoring \$2 to \$3"
151151

152-
run "$PWD/hooks/post-checkout"
152+
run "$PWD/hooks/pre-command"
153153

154154
assert_success
155155
assert_output --partial 'Cache hit at branch level'
@@ -166,7 +166,7 @@ teardown() {
166166
'exists \* : exit 0' \
167167
"get \* \* : echo restoring \$2 to \$3"
168168

169-
run "$PWD/hooks/post-checkout"
169+
run "$PWD/hooks/pre-command"
170170

171171
assert_success
172172
assert_output --partial 'Cache hit at file level'

tests/post-checkout-zip.bats renamed to tests/pre-command-zip.bats

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ teardown() {
4040
'exists \* : exit 0' \
4141
"get \* \* : echo restoring \$2 to \$3"
4242

43-
run "$PWD/hooks/post-checkout"
43+
run "$PWD/hooks/pre-command"
4444

4545
assert_success
4646
assert_output --partial 'Cache hit at file level'
@@ -56,7 +56,7 @@ teardown() {
5656
'exists \* : exit 0' \
5757
"get \* \* : echo restoring \$2 to \$3"
5858

59-
run "$PWD/hooks/post-checkout"
59+
run "$PWD/hooks/pre-command"
6060

6161
assert_success
6262
assert_output --partial 'Cache hit at file level'
@@ -73,7 +73,7 @@ teardown() {
7373
'exists \* : exit 0' \
7474
"get \* \* : echo restoring \$2 to \$3"
7575

76-
run "$PWD/hooks/post-checkout"
76+
run "$PWD/hooks/pre-command"
7777

7878
assert_success
7979
assert_output --partial 'Cache hit at step level'
@@ -91,7 +91,7 @@ teardown() {
9191
'exists \* : exit 0' \
9292
"get \* \* : echo restoring \$2 to \$3"
9393

94-
run "$PWD/hooks/post-checkout"
94+
run "$PWD/hooks/pre-command"
9595

9696
assert_success
9797
assert_output --partial 'Cache hit at branch level'
@@ -109,7 +109,7 @@ teardown() {
109109
'exists \* : exit 0' \
110110
"get \* \* : echo restoring \$2 to \$3"
111111

112-
run "$PWD/hooks/post-checkout"
112+
run "$PWD/hooks/pre-command"
113113

114114
assert_success
115115
assert_output --partial 'Cache hit at pipeline level'
@@ -129,7 +129,7 @@ teardown() {
129129
'exists \* : exit 0' \
130130
"get \* \* : echo restoring \$2 to \$3"
131131

132-
run "$PWD/hooks/post-checkout"
132+
run "$PWD/hooks/pre-command"
133133

134134
assert_success
135135
assert_output --partial 'Cache hit at all level'
@@ -147,7 +147,7 @@ teardown() {
147147
'exists \* : exit 0' \
148148
"get \* \* : echo restoring \$2 to \$3"
149149

150-
run "$PWD/hooks/post-checkout"
150+
run "$PWD/hooks/pre-command"
151151

152152
assert_success
153153
assert_output --partial 'Cache hit at branch level'
@@ -165,7 +165,7 @@ teardown() {
165165
'exists \* : exit 0' \
166166
"get \* \* : mkdir -p $(dirname \$3) && touch \$3 && echo restoring \$2 to \$3"
167167

168-
run "$PWD/hooks/post-checkout"
168+
run "$PWD/hooks/pre-command"
169169

170170
assert_success
171171
assert_output --partial 'Cache hit at file level'

tests/post-checkout.bats renamed to tests/pre-command.bats

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ teardown() {
2626
}
2727

2828
@test 'If not setup for restoring, do nothing' {
29-
run "$PWD/hooks/post-checkout"
29+
run "$PWD/hooks/pre-command"
3030

3131
assert_success
3232
assert_output --partial 'Cache not setup for restoring'
@@ -35,7 +35,7 @@ teardown() {
3535
@test "Missing path fails" {
3636
unset BUILDKITE_PLUGIN_CACHE_PATH
3737

38-
run "$PWD/hooks/post-checkout"
38+
run "$PWD/hooks/pre-command"
3939

4040
assert_failure
4141
assert_output --partial 'Missing path option'
@@ -44,7 +44,7 @@ teardown() {
4444
@test "Invalid level fails" {
4545
export BUILDKITE_PLUGIN_CACHE_RESTORE=unreal
4646

47-
run "$PWD/hooks/post-checkout"
47+
run "$PWD/hooks/pre-command"
4848

4949
assert_failure
5050
assert_output --partial 'Invalid cache level'
@@ -54,7 +54,7 @@ teardown() {
5454
export BUILDKITE_PLUGIN_CACHE_RESTORE=all
5555
export BUILDKITE_PLUGIN_CACHE_COMPRESSION=invalid
5656

57-
run "$PWD/hooks/post-checkout"
57+
run "$PWD/hooks/pre-command"
5858

5959
assert_failure
6060
assert_output --partial 'Invalid value for compression option'
@@ -64,7 +64,7 @@ teardown() {
6464
export BUILDKITE_PLUGIN_CACHE_RESTORE=file
6565
unset BUILDKITE_PLUGIN_CACHE_MANIFEST
6666

67-
run "$PWD/hooks/post-checkout"
67+
run "$PWD/hooks/pre-command"
6868

6969
assert_failure
7070
assert_output --partial 'Missing manifest option'
@@ -76,7 +76,7 @@ teardown() {
7676
stub cache_dummy \
7777
'exists \* : exit 1'
7878

79-
run "$PWD/hooks/post-checkout"
79+
run "$PWD/hooks/pre-command"
8080

8181
assert_success
8282
assert_output --partial 'Cache miss up to file-level, sorry'
@@ -91,7 +91,7 @@ teardown() {
9191
'exists \* : exit 1' \
9292
'exists \* : exit 1'
9393

94-
run "$PWD/hooks/post-checkout"
94+
run "$PWD/hooks/pre-command"
9595

9696
assert_success
9797
assert_output --partial 'Cache miss up to step-level, sorry'
@@ -106,7 +106,7 @@ teardown() {
106106
stub cache_dummy \
107107
'exists \* : exit 1'
108108

109-
run "$PWD/hooks/post-checkout"
109+
run "$PWD/hooks/pre-command"
110110

111111
assert_success
112112
assert_output --partial 'Cache miss up to step-level, sorry'
@@ -122,7 +122,7 @@ teardown() {
122122
'exists \* : exit 1' \
123123
'exists \* : exit 1'
124124

125-
run "$PWD/hooks/post-checkout"
125+
run "$PWD/hooks/pre-command"
126126

127127
assert_success
128128
assert_output --partial 'Cache miss up to branch-level, sorry'
@@ -138,7 +138,7 @@ teardown() {
138138
'exists \* : exit 1' \
139139
'exists \* : exit 1'
140140

141-
run "$PWD/hooks/post-checkout"
141+
run "$PWD/hooks/pre-command"
142142

143143
assert_success
144144
assert_output --partial 'Cache miss up to pipeline-level, sorry'
@@ -156,7 +156,7 @@ teardown() {
156156
'exists \* : exit 1' \
157157
'exists \* : exit 1'
158158

159-
run "$PWD/hooks/post-checkout"
159+
run "$PWD/hooks/pre-command"
160160

161161
assert_success
162162
assert_output --partial 'Cache miss up to all-level, sorry'
@@ -171,7 +171,7 @@ teardown() {
171171
'exists \* : exit 0' \
172172
"get \* \* : echo restoring \$2 to \$3"
173173

174-
run "$PWD/hooks/post-checkout"
174+
run "$PWD/hooks/pre-command"
175175

176176
assert_success
177177
assert_output --partial 'Cache hit at file level'
@@ -186,7 +186,7 @@ teardown() {
186186
'exists \* : exit 0' \
187187
"get \* \* : echo restoring \$2 to \$3"
188188

189-
run "$PWD/hooks/post-checkout"
189+
run "$PWD/hooks/pre-command"
190190

191191
assert_success
192192
assert_output --partial 'Cache hit at file level'
@@ -202,7 +202,7 @@ teardown() {
202202
'exists \* : exit 0' \
203203
"get \* \* : echo restoring \$2 to \$3"
204204

205-
run "$PWD/hooks/post-checkout"
205+
run "$PWD/hooks/pre-command"
206206

207207
assert_success
208208
assert_output --partial 'Cache hit at step level'
@@ -219,7 +219,7 @@ teardown() {
219219
'exists \* : exit 0' \
220220
"get \* \* : echo restoring \$2 to \$3"
221221

222-
run "$PWD/hooks/post-checkout"
222+
run "$PWD/hooks/pre-command"
223223

224224
assert_success
225225
assert_output --partial 'Cache hit at branch level'
@@ -236,7 +236,7 @@ teardown() {
236236
'exists \* : exit 0' \
237237
"get \* \* : echo restoring \$2 to \$3"
238238

239-
run "$PWD/hooks/post-checkout"
239+
run "$PWD/hooks/pre-command"
240240

241241
assert_success
242242
assert_output --partial 'Cache hit at pipeline level'
@@ -255,7 +255,7 @@ teardown() {
255255
'exists \* : exit 0' \
256256
"get \* \* : echo restoring \$2 to \$3"
257257

258-
run "$PWD/hooks/post-checkout"
258+
run "$PWD/hooks/pre-command"
259259

260260
assert_success
261261
assert_output --partial 'Cache hit at all level'
@@ -272,10 +272,10 @@ teardown() {
272272
'exists \* : exit 0' \
273273
"get \* \* : echo restoring \$2 to \$3"
274274

275-
run "$PWD/hooks/post-checkout"
275+
run "$PWD/hooks/pre-command"
276276

277277
assert_success
278278
assert_output --partial 'Cache hit at branch level'
279279

280280
unstub cache_dummy
281-
}
281+
}

0 commit comments

Comments
 (0)