From d45c7b262744e5c4db4b38b8fa7c16e3a4c37075 Mon Sep 17 00:00:00 2001 From: Will McCutchen Date: Sat, 25 Nov 2023 16:09:12 -0500 Subject: [PATCH] move --- Makefile | 2 +- httpbin/websocket/websocket_autobahn_test.go | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 4b3acaf9..ad3f9c7e 100644 --- a/Makefile +++ b/Makefile @@ -38,7 +38,7 @@ buildtests: .PHONY: buildtests clean: - rm -rf $(DIST_PATH) $(COVERAGE_PATH) + rm -rf $(DIST_PATH) $(COVERAGE_PATH) .integrationtests .PHONY: clean diff --git a/httpbin/websocket/websocket_autobahn_test.go b/httpbin/websocket/websocket_autobahn_test.go index 0f9b774d..c1ae0c95 100644 --- a/httpbin/websocket/websocket_autobahn_test.go +++ b/httpbin/websocket/websocket_autobahn_test.go @@ -165,7 +165,13 @@ func runCmd(t *testing.T, cmd *exec.Cmd) { func newTestDir(t *testing.T) string { t.Helper() - testDir, err := filepath.Abs(path.Join(".integrationtests", fmt.Sprintf("autobahn-test-%d", time.Now().Unix()))) + + // package tests are run with the package as the working directory, but we + // want to store our integration test output in the repo root + testDir, err := filepath.Abs(path.Join( + "..", "..", ".integrationtests", fmt.Sprintf("autobahn-test-%d", time.Now().Unix()), + )) + assert.NilError(t, err) assert.NilError(t, os.MkdirAll(testDir, 0o755)) return testDir