vppInstance *VppInstance
}
-func newContainer(suite *HstSuite, yamlInput ContainerConfig) (*Container, error) {
+func newContainer(suite *HstSuite, yamlInput ContainerConfig, pid string) (*Container, error) {
containerName := yamlInput["name"].(string)
if len(containerName) == 0 {
err := fmt.Errorf("container name must not be blank")
var container = new(Container)
container.volumes = make(map[string]Volume)
container.envVars = make(map[string]string)
- container.name = containerName
+ container.name = containerName + pid
container.suite = suite
if image, ok := yamlInput["image"]; ok {
}
if _, ok := yamlInput["volumes"]; ok {
- workingVolumeDir := logDir + container.suite.T().Name() + volumeDir
+ workingVolumeDir := logDir + container.suite.T().Name() + pid + volumeDir
workDirReplacer := strings.NewReplacer("$HST_DIR", workDir)
volDirReplacer := strings.NewReplacer("$HST_VOLUME_DIR", workingVolumeDir)
for _, volu := range yamlInput["volumes"].([]interface{}) {
}
func (c *Container) createFile(destFileName string, content string) error {
- f, err := os.CreateTemp("/tmp", "hst-config")
+ f, err := os.CreateTemp("/tmp", "hst-config" + c.suite.pid)
if err != nil {
return err
}