diff options
author | Filip Tehlar <ftehlar@cisco.com> | 2023-01-13 21:33:43 +0100 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2023-01-16 20:47:33 +0000 |
commit | 3f951433b89df4639bb2ae8f297aee90c70cebf5 (patch) | |
tree | ae93e18461fb7cb92a4ae18faa43fd620ba8f58e /extras/hs-test/container.go | |
parent | f4b82f52e8b0fcc59a4c3020724022a7bc184b1a (diff) |
hs-test: restrict concurrency on envoy
Type: test
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: I8b06f4554a6ee5b13de829e47eaa82431a76c332
Diffstat (limited to 'extras/hs-test/container.go')
-rw-r--r-- | extras/hs-test/container.go | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/extras/hs-test/container.go b/extras/hs-test/container.go index 4ad454848fa..874ce3d1750 100644 --- a/extras/hs-test/container.go +++ b/extras/hs-test/container.go @@ -14,12 +14,13 @@ type Volume struct { } type Container struct { - isOptional bool - name string - image string - workDir string - volumes map[string]Volume - envVars map[string]string + isOptional bool + name string + image string + workDir string + extraRunningArgs string + volumes map[string]Volume + envVars map[string]string } func NewContainer(yamlInput ContainerConfig) (*Container, error) { @@ -40,6 +41,12 @@ func NewContainer(yamlInput ContainerConfig) (*Container, error) { container.image = "hs-test/vpp" } + if args, ok := yamlInput["extra-args"]; ok { + container.extraRunningArgs = args.(string) + } else { + container.extraRunningArgs = "" + } + if isOptional, ok := yamlInput["is-optional"]; ok { container.isOptional = isOptional.(bool) } else { @@ -77,7 +84,7 @@ func (c *Container) getRunCommand() string { cmd += syncPath cmd += c.getVolumesAsCliOption() cmd += c.getEnvVarsAsCliOption() - cmd += " --name " + c.name + " " + c.image + cmd += " --name " + c.name + " " + c.image + " " + c.extraRunningArgs return cmd } |