Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion integrations/Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -181,13 +181,15 @@ tasks:

test:gateway:
desc: Gateway test
vars:
REMOVE_CONTAINERS: '{{ .REMOVE_CONTAINERS | default "true" }}'
cmds:
- task: k8s:port-forward:setup:gateway
- defer: { task: k8s:port-forward:teardown:gateway }
- task: test:autogen-agent:run
- defer: { task: test:autogen-agent:remove }
- docker pull {{ .IMAGE_REPO }}/csit/test-langchain-agent:{{ .TEST_APP_TAG }}
- 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
- 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

version:
desc: Get version
Expand Down
8 changes: 7 additions & 1 deletion integrations/testutils/docker_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package testutils
import (
"bytes"
"fmt"
"os"
"os/exec"
"runtime"
)
Expand All @@ -18,7 +19,12 @@ type DockerRunner struct {
func NewDockerRunner(dockerImage, mountString string, envVars map[string]string) *DockerRunner {
baseArgs := []string{
"run",
"--rm",
}

if os.Getenv("REMOVE_CONTAINERS") == "true" {
baseArgs = append(baseArgs,
"--rm",
)
}

if mountString != "" {
Expand Down