summaryrefslogtreecommitdiffstats
path: root/extras/hs-test/infra/container.go
diff options
context:
space:
mode:
Diffstat (limited to 'extras/hs-test/infra/container.go')
-rw-r--r--extras/hs-test/infra/container.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/extras/hs-test/infra/container.go b/extras/hs-test/infra/container.go
index 5093398ae56..44f141a9102 100644
--- a/extras/hs-test/infra/container.go
+++ b/extras/hs-test/infra/container.go
@@ -4,6 +4,7 @@ import (
"bytes"
"context"
"fmt"
+ "github.com/docker/go-units"
"os"
"os/exec"
"slices"
@@ -15,7 +16,6 @@ import (
containerTypes "github.com/docker/docker/api/types/container"
"github.com/docker/docker/api/types/image"
"github.com/docker/docker/pkg/stdcopy"
- "github.com/docker/go-units"
"github.com/edwarnicke/exechelper"
. "github.com/onsi/ginkgo/v2"
)
@@ -382,6 +382,11 @@ func (c *Container) CreateFile(destFileName string, content string) error {
return nil
}
+func (c *Container) GetFile(sourceFileName, targetFileName string) error {
+ cmd := exec.Command("docker", "cp", c.Name+":"+sourceFileName, targetFileName)
+ return cmd.Run()
+}
+
/*
* Executes in detached mode so that the started application can continue to run
* without blocking execution of test