summaryrefslogtreecommitdiffstats
path: root/extras/hs-test/container.go
diff options
context:
space:
mode:
authorFilip Tehlar <ftehlar@cisco.com>2023-03-07 10:13:19 +0100
committerFlorin Coras <florin.coras@gmail.com>2023-03-07 17:47:45 +0000
commit9abba11a9434e152f35a863de3e7631fe3a00070 (patch)
tree5a23d41d9349741b18b2c3971d9ff04fe8cbaf99 /extras/hs-test/container.go
parent21121f60d2ffd66d5c28d989572fdb68653bc94c (diff)
hs-test: fix envoy test
Type: test Signed-off-by: Filip Tehlar <ftehlar@cisco.com> Change-Id: I776e0f1f7ea700439d1fe6a598772776ae6a1493
Diffstat (limited to 'extras/hs-test/container.go')
-rw-r--r--extras/hs-test/container.go13
1 files changed, 8 insertions, 5 deletions
diff --git a/extras/hs-test/container.go b/extras/hs-test/container.go
index 40dc0828376..4b3002f15be 100644
--- a/extras/hs-test/container.go
+++ b/extras/hs-test/container.go
@@ -127,17 +127,20 @@ func (c *Container) getContainerArguments() string {
args += c.getVolumesAsCliOption()
args += c.getEnvVarsAsCliOption()
args += " --name " + c.name + " " + c.image
+ args += " " + c.extraRunningArgs
return args
}
-func (c *Container) create() {
+func (c *Container) create() error {
cmd := "docker create " + c.getContainerArguments()
- exechelper.Run(cmd)
+ c.Suite().log(cmd)
+ return exechelper.Run(cmd)
}
-func (c *Container) start() {
+func (c *Container) start() error {
cmd := "docker start " + c.name
- exechelper.Run(cmd)
+ c.Suite().log(cmd)
+ return exechelper.Run(cmd)
}
func (c *Container) run() error {
@@ -145,7 +148,7 @@ func (c *Container) run() error {
return fmt.Errorf("run container failed: name is blank")
}
- cmd := "docker run -d " + c.getContainerArguments() + " " + c.extraRunningArgs
+ cmd := "docker run -d " + c.getContainerArguments()
c.Suite().log(cmd)
err := exechelper.Run(cmd)
if err != nil {