From b40c2fe997cabb80d59d3a167f0de2b8c6c4592f Mon Sep 17 00:00:00 2001 From: Emil Hessman Date: Wed, 28 Jan 2015 06:39:16 +0100 Subject: [PATCH] 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. --- command/apply_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/apply_test.go b/command/apply_test.go index c062de5af..0506b49d6 100644 --- a/command/apply_test.go +++ b/command/apply_test.go @@ -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)