Fix test coverage in docker containers

This commit is contained in:
Riccardo Biraghi
2018-04-20 17:34:37 +02:00
parent 818cbaca8d
commit d7633d8313
4 changed files with 58 additions and 42 deletions

View File

@@ -74,21 +74,7 @@ func waitForWebReady(t *testing.T, cli *client.Client, ID string, tlsConfig *tls
// tlsDir returns the host directory where the test certificate(s) are located
func tlsDir(t *testing.T, unixPath bool) string {
dir, err := os.Getwd()
if err != nil {
t.Fatal(err)
}
if isWSL(t) {
// Check if the cwd is a symlink
dir, err = filepath.EvalSymlinks(dir)
if err != nil {
t.Fatal(err)
}
if !unixPath {
dir = strings.Replace(dir, getWindowsRoot(true), getWindowsRoot(false), 1)
}
}
return filepath.Join(dir, "../tls")
return filepath.Join(getCwd(t, unixPath), "../tls")
}
// runJMSTests runs a container with a JMS client, which connects to the queue manager container with the specified ID