Browse Source

add a comment explaining the setting of $HOME in TestHttpsInsecure (#306)

Michael Hudson-Doyle 7 years ago
parent
commit
f6c7e790d0
1 changed files with 4 additions and 0 deletions
  1. 4
    0
      internal/driver/fetch_test.go

+ 4
- 0
internal/driver/fetch_test.go View File

368
 		t.Fatal("creating temp dir: ", err)
368
 		t.Fatal("creating temp dir: ", err)
369
 	}
369
 	}
370
 	defer os.RemoveAll(tempdir)
370
 	defer os.RemoveAll(tempdir)
371
+
372
+	// pprof writes to $HOME/pprof by default which is not necessarily
373
+	// writeable (e.g. on a Debian buildd) so set $HOME to something we
374
+	// know we can write to for the duration of the test.
371
 	os.Setenv(homeEnv(), tempdir)
375
 	os.Setenv(homeEnv(), tempdir)
372
 	defer os.Setenv(homeEnv(), saveHome)
376
 	defer os.Setenv(homeEnv(), saveHome)
373
 
377