summaryrefslogtreecommitdiffstats
path: root/extras/hs-test/container.go
diff options
context:
space:
mode:
authorMaros Ondrejicka <mondreji@cisco.com>2023-02-14 12:56:49 +0100
committerMaros Ondrejicka <mondreji@cisco.com>2023-02-14 12:56:49 +0100
commit7d7ab1008a0f13a464e7f4c3628b48832172d0b3 (patch)
tree2022c53dce9275357974e2bfff119e573e1ff87e /extras/hs-test/container.go
parent590a82c237337f560cc3d5beac47a235c5e97eac (diff)
hs-test: clean-up obsolete code
Type: test Signed-off-by: Maros Ondrejicka <mondreji@cisco.com> Change-Id: I52cd825f903e41c35f6c4a9db71f00dbedbb8680
Diffstat (limited to 'extras/hs-test/container.go')
-rw-r--r--extras/hs-test/container.go23
1 files changed, 4 insertions, 19 deletions
diff --git a/extras/hs-test/container.go b/extras/hs-test/container.go
index 8ece8a8952b..4087d851945 100644
--- a/extras/hs-test/container.go
+++ b/extras/hs-test/container.go
@@ -130,7 +130,6 @@ func (c *Container) run() error {
return fmt.Errorf("run container failed: name is blank")
}
- exechelper.Run(fmt.Sprintf("mkdir -p /tmp/%s/sync", c.name))
cmd := c.getRunCommand()
err := exechelper.Run(cmd)
if err != nil {
@@ -148,10 +147,6 @@ func (c *Container) addVolume(hostDir string, containerDir string, isDefaultWork
c.volumes[hostDir] = volume
}
-func (c *Container) getVolumeByHostDir(hostDir string) Volume {
- return c.volumes[hostDir]
-}
-
func (c *Container) getVolumesAsCliOption() string {
cliOption := ""
@@ -164,13 +159,6 @@ func (c *Container) getVolumesAsCliOption() string {
return cliOption
}
-func (c *Container) getWorkDirAsCliOption() string {
- if _, ok := c.getWorkDirVolume(); ok {
- return fmt.Sprintf(" --workdir=\"%s\"", c.GetContainerWorkDir())
- }
- return ""
-}
-
func (c *Container) addEnvVar(name string, value string) {
c.envVars[name] = value
}
@@ -188,15 +176,12 @@ func (c *Container) getEnvVarsAsCliOption() string {
}
func (c *Container) newVppInstance(additionalConfig ...Stanza) (*VppInstance, error) {
- vppConfig := new(VppConfig)
- vppConfig.CliSocketFilePath = defaultCliSocketFilePath
- if len(additionalConfig) > 0 {
- vppConfig.additionalConfig = additionalConfig[0]
- }
-
vpp := new(VppInstance)
vpp.container = c
- vpp.config = vppConfig
+
+ if len(additionalConfig) > 0 {
+ vpp.additionalConfig = additionalConfig[0]
+ }
c.vppInstance = vpp