diff options
author | Filip Tehlar <ftehlar@cisco.com> | 2024-01-24 11:59:44 +0100 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2024-01-29 19:58:37 +0000 |
commit | a1bd50c7a2c2c2d69d92cef167a64a1a5ddc4af7 (patch) | |
tree | f66cbd0b7848dac6789369e2fe9a73f08888e638 /extras/hs-test/hst_suite.go | |
parent | af1ddd39f1f5fa6a00e70356bac2b0bd38f76566 (diff) |
hs-test: use relative paths for docker volumes
Type: test
Change-Id: I9d5c15662e50ceea08d2ccc653db36c5e3df869e
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Diffstat (limited to 'extras/hs-test/hst_suite.go')
-rw-r--r-- | extras/hs-test/hst_suite.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/extras/hs-test/hst_suite.go b/extras/hs-test/hst_suite.go index 12a66e44d46..7f93b15f50a 100644 --- a/extras/hs-test/hst_suite.go +++ b/extras/hs-test/hst_suite.go @@ -221,13 +221,15 @@ func (s *HstSuite) loadContainerTopology(topologyName string) { for _, elem := range yamlTopo.Volumes { volumeMap := elem["volume"].(VolumeConfig) hostDir := volumeMap["host-dir"].(string) + workingVolumeDir := logDir + s.T().Name() + volumeDir + volDirReplacer := strings.NewReplacer("$HST_VOLUME_DIR", workingVolumeDir) + hostDir = volDirReplacer.Replace(hostDir) s.volumes = append(s.volumes, hostDir) } s.containers = make(map[string]*Container) for _, elem := range yamlTopo.Containers { - newContainer, err := newContainer(elem) - newContainer.suite = s + newContainer, err := newContainer(s, elem) if err != nil { s.T().Fatalf("container config error: %v", err) } |