File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -181,13 +181,15 @@ tasks:
181181
182182 test:gateway :
183183 desc : Gateway test
184+ vars :
185+ REMOVE_CONTAINERS : ' {{ .REMOVE_CONTAINERS | default "true" }}'
184186 cmds :
185187 - task : k8s:port-forward:setup:gateway
186188 - defer : { task: k8s:port-forward:teardown:gateway }
187189 - task : test:autogen-agent:run
188190 - defer : { task: test:autogen-agent:remove }
189191 - docker pull {{ .IMAGE_REPO }}/csit/test-langchain-agent:{{ .TEST_APP_TAG }}
190- - IMAGE_REPO={{.IMAGE_REPO}} TEST_APP_TAG={{.TEST_APP_TAG}} go test ./agntcy-agp/tests -v -failfast -test.v -test.paniconexit0 -ginkgo.timeout 30m -timeout 30m -ginkgo.v
192+ - REMOVE_CONTAINERS={{.REMOVE_CONTAINERS}} IMAGE_REPO={{.IMAGE_REPO}} TEST_APP_TAG={{.TEST_APP_TAG}} go test ./agntcy-agp/tests -v -failfast -test.v -test.paniconexit0 -ginkgo.timeout 30m -timeout 30m -ginkgo.v
191193
192194 version :
193195 desc : Get version
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ package testutils
66import (
77 "bytes"
88 "fmt"
9+ "os"
910 "os/exec"
1011 "runtime"
1112)
@@ -18,7 +19,12 @@ type DockerRunner struct {
1819func NewDockerRunner (dockerImage , mountString string , envVars map [string ]string ) * DockerRunner {
1920 baseArgs := []string {
2021 "run" ,
21- "--rm" ,
22+ }
23+
24+ if os .Getenv ("REMOVE_CONTAINERS" ) == "true" {
25+ baseArgs = append (baseArgs ,
26+ "--rm" ,
27+ )
2228 }
2329
2430 if mountString != "" {
You can’t perform that action at this time.
0 commit comments