@@ -223,14 +223,14 @@ func Build() error {
223
223
return patchWasm (filepath .Join ("build" , "mainraw.wasm" ), filepath .Join ("build" , "main.wasm" ), initialPages )
224
224
}
225
225
226
- // E2e runs e2e tests with a built plugin against the example deployment. Requires docker-compose .
226
+ // E2e runs e2e tests with a built plugin against the example deployment. Requires docker.
227
227
func E2e () error {
228
228
var err error
229
- if err = sh .RunV ("docker- compose" , "--file" , "e2e/docker-compose.yml" , "up" , "-d" , "envoy" ); err != nil {
229
+ if err = sh .RunV ("docker" , " compose" , "--file" , "e2e/docker-compose.yml" , "up" , "-d" , "envoy" ); err != nil {
230
230
return err
231
231
}
232
232
defer func () {
233
- _ = sh .RunV ("docker- compose" , "--file" , "e2e/docker-compose.yml" , "down" , "-v" )
233
+ _ = sh .RunV ("docker" , " compose" , "--file" , "e2e/docker-compose.yml" , "down" , "-v" )
234
234
}()
235
235
236
236
envoyHost := os .Getenv ("ENVOY_HOST" )
@@ -245,18 +245,18 @@ func E2e() error {
245
245
// --nulled-body is needed because coraza-proxy-wasm returns a 200 OK with a nulled body when if the interruption happens after phase 3
246
246
if err = sh .RunV ("go" , "run" , "github.com/corazawaf/coraza/v3/http/e2e/cmd/httpe2e@main" , "--proxy-hostport" ,
247
247
"http://" + envoyHost , "--httpbin-hostport" , "http://" + httpbinHost , "--nulled-body" ); err != nil {
248
- sh .RunV ("docker- compose" , "-f" , "e2e/docker-compose.yml" , "logs" , "envoy" )
248
+ sh .RunV ("docker" , " compose" , "-f" , "e2e/docker-compose.yml" , "logs" , "envoy" )
249
249
}
250
250
return err
251
251
}
252
252
253
- // Ftw runs ftw tests with a built plugin and Envoy. Requires docker-compose .
253
+ // Ftw runs ftw tests with a built plugin and Envoy. Requires docker.
254
254
func Ftw () error {
255
- if err := sh .RunV ("docker- compose" , "--file" , "ftw/docker-compose.yml" , "build" , "--pull" ); err != nil {
255
+ if err := sh .RunV ("docker" , " compose" , "--file" , "ftw/docker-compose.yml" , "build" , "--pull" ); err != nil {
256
256
return err
257
257
}
258
258
defer func () {
259
- _ = sh .RunV ("docker- compose" , "--file" , "ftw/docker-compose.yml" , "down" , "-v" )
259
+ _ = sh .RunV ("docker" , " compose" , "--file" , "ftw/docker-compose.yml" , "down" , "-v" )
260
260
}()
261
261
env := map [string ]string {
262
262
"FTW_CLOUDMODE" : os .Getenv ("FTW_CLOUDMODE" ),
@@ -270,22 +270,22 @@ func Ftw() error {
270
270
if os .Getenv ("MEMSTATS" ) == "true" {
271
271
task = "ftw-memstats"
272
272
}
273
- return sh .RunWithV (env , "docker- compose" , "--file" , "ftw/docker-compose.yml" , "run" , "--rm" , task )
273
+ return sh .RunWithV (env , "docker" , " compose" , "--file" , "ftw/docker-compose.yml" , "run" , "--rm" , task )
274
274
}
275
275
276
- // RunEnvoyExample spins up the test environment of envoy, access at http://localhost:8080. Requires docker-compose .
276
+ // RunEnvoyExample spins up the test environment of envoy, access at http://localhost:8080. Requires docker.
277
277
func RunEnvoyExample () error {
278
- return sh .RunWithV (map [string ]string {"ENVOY_IMAGE" : os .Getenv ("ENVOY_IMAGE" )}, "docker- compose" , "--file" , "example/envoy/docker-compose.yml" , "up" )
278
+ return sh .RunWithV (map [string ]string {"ENVOY_IMAGE" : os .Getenv ("ENVOY_IMAGE" )}, "docker" , " compose" , "--file" , "example/envoy/docker-compose.yml" , "up" )
279
279
}
280
280
281
- // TeardownEnvoyExample tears down the test environment of envoy. Requires docker-compose .
281
+ // TeardownEnvoyExample tears down the test environment of envoy. Requires docker.
282
282
func TeardownEnvoyExample () error {
283
- return sh .RunV ("docker- compose" , "--file" , "example/envoy/docker-compose.yml" , "down" )
283
+ return sh .RunV ("docker" , " compose" , "--file" , "example/envoy/docker-compose.yml" , "down" )
284
284
}
285
285
286
- // ReloadEnvoyExample reload the test environment (container) of envoy in case of envoy or wasm update. Requires docker-compose
286
+ // ReloadEnvoyExample reload the test environment (container) of envoy in case of envoy or wasm update. Requires docker.
287
287
func ReloadEnvoyExample () error {
288
- return sh .RunV ("docker- compose" , "--file" , "example/envoy/docker-compose.yml" , "restart" )
288
+ return sh .RunV ("docker" , " compose" , "--file" , "example/envoy/docker-compose.yml" , "restart" )
289
289
}
290
290
291
291
var Default = Build
0 commit comments