Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
hs-test: restrict concurrency on envoy
[vpp.git]
/
extras
/
hs-test
/
container.go
diff --git
a/extras/hs-test/container.go
b/extras/hs-test/container.go
index
4ad4548
..
874ce3d
100644
(file)
--- a/
extras/hs-test/container.go
+++ b/
extras/hs-test/container.go
@@
-14,12
+14,13
@@
type Volume struct {
}
type Container 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) {
}
func NewContainer(yamlInput ContainerConfig) (*Container, error) {
@@
-40,6
+41,12
@@
func NewContainer(yamlInput ContainerConfig) (*Container, error) {
container.image = "hs-test/vpp"
}
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 {
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 += syncPath
cmd += c.getVolumesAsCliOption()
cmd += c.getEnvVarsAsCliOption()
- cmd += " --name " + c.name + " " + c.image
+ cmd += " --name " + c.name + " " + c.image
+ " " + c.extraRunningArgs
return cmd
}
return cmd
}