}
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) {
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 {
cmd += syncPath
cmd += c.getVolumesAsCliOption()
cmd += c.getEnvVarsAsCliOption()
- cmd += " --name " + c.name + " " + c.image
+ cmd += " --name " + c.name + " " + c.image + " " + c.extraRunningArgs
return cmd
}
s.log("http server started...")
- c := fmt.Sprintf("ip netns exec client wget --retry-connrefused --retry-on-http-error=503 --tries=10 -O %s 10.0.0.2:555/%s", outputFile, srcFile)
+ c := fmt.Sprintf("ip netns exec client wget --no-proxy --retry-connrefused --retry-on-http-error=503 --tries=10 -O %s 10.0.0.2:555/%s", outputFile, srcFile)
_, err = exechelper.CombinedOutput(c)
s.assertNil(err, "failed to run wget")
stopServer <- struct{}{}