Commit f7fcd744 authored by Zac Bergquist's avatar Zac Bergquist

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.
parent 16bd63fc
...@@ -38,7 +38,7 @@ func TestBasicAuthParse(t *testing.T) { ...@@ -38,7 +38,7 @@ func TestBasicAuthParse(t *testing.T) {
md5:$apr1$l42y8rex$pOA2VJ0x/0TwaFeAF9nX61` md5:$apr1$l42y8rex$pOA2VJ0x/0TwaFeAF9nX61`
var skipHtpassword bool var skipHtpassword bool
htfh, err := ioutil.TempFile("", "basicauth-") htfh, err := ioutil.TempFile(".", "basicauth-")
if err != nil { if err != nil {
t.Logf("Error creating temp file (%v), will skip htpassword test", err) t.Logf("Error creating temp file (%v), will skip htpassword test", err)
skipHtpassword = true skipHtpassword = true
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment