From f7fcd7447a01a218b12d8ec1a8a41de8df97d143 Mon Sep 17 00:00:00 2001 From: Zac Bergquist Date: Tue, 13 Oct 2015 20:16:43 -0400 Subject: [PATCH] Fix test failure on non-Windows OS. NewTestController now sets the site root to '.' to accomodate Windows. This introduced a failure on Linux because we join "." and an absolute path in /tmp/ and end up looking for the temp file in the wrong place. This change puts the temp file under the current working directory, which should resolve the issue. --- config/setup/basicauth_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/setup/basicauth_test.go b/config/setup/basicauth_test.go index 7588f0f0..a94d6e69 100644 --- a/config/setup/basicauth_test.go +++ b/config/setup/basicauth_test.go @@ -38,7 +38,7 @@ func TestBasicAuthParse(t *testing.T) { md5:$apr1$l42y8rex$pOA2VJ0x/0TwaFeAF9nX61` var skipHtpassword bool - htfh, err := ioutil.TempFile("", "basicauth-") + htfh, err := ioutil.TempFile(".", "basicauth-") if err != nil { t.Logf("Error creating temp file (%v), will skip htpassword test", err) skipHtpassword = true