tests: convert windows style path to posix style path to avoid hcl parsing error (#6351)

This commit is contained in:
gaoxinge 2020-02-11 17:13:31 +08:00 committed by GitHub
parent e231d62bc9
commit 216eb29d6b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -149,6 +149,10 @@ func (a *TestAgent) Start() (err error) {
if err != nil {
return fmt.Errorf("Error creating data dir %s: %s", filepath.Join(TempDir, name), err)
}
// Convert windows style path to posix style path
// to avoid illegal char escape error when hcl
// parsing.
d = filepath.ToSlash(d)
hclDataDir = `data_dir = "` + d + `"`
}