浏览代码

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

Michael Hudson-Doyle 7 年前
父节点
当前提交
f6c7e790d0
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4
    0
      internal/driver/fetch_test.go

+ 4
- 0
internal/driver/fetch_test.go 查看文件

@@ -368,6 +368,10 @@ func TestHttpsInsecure(t *testing.T) {
368 368
 		t.Fatal("creating temp dir: ", err)
369 369
 	}
370 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 375
 	os.Setenv(homeEnv(), tempdir)
372 376
 	defer os.Setenv(homeEnv(), saveHome)
373 377