command: fix test failure on Windows
URLs are `/`-based. Windows path Separator is `\`. Convert `\` in test fixture path to `/` with filepath.ToSlash such that proper URLs are constructed even on Windows. Fixes a test failure on Windows.
This commit is contained in:
parent
92e68c1ee6
commit
b40c2fe997
|
@ -1142,7 +1142,7 @@ func testHttpServer(t *testing.T) net.Listener {
|
|||
func testHttpHandlerHeader(w http.ResponseWriter, r *http.Request) {
|
||||
var url url.URL
|
||||
url.Scheme = "file"
|
||||
url.Path = testFixturePath("init")
|
||||
url.Path = filepath.ToSlash(testFixturePath("init"))
|
||||
|
||||
w.Header().Add("X-Terraform-Get", url.String())
|
||||
w.WriteHeader(200)
|
||||
|
|
Loading…
Reference in New Issue