From a912ec508e7e614dc9b5155f36f2c9e0a09a8e46 Mon Sep 17 00:00:00 2001 From: Oleksandr Slynko Date: Sun, 7 Jun 2020 13:00:48 +0100 Subject: [PATCH] Fix integration tests to stop require GOPATH (#686) --- integration/integration_suite_test.go | 2 +- integration/watch_test.go | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/integration/integration_suite_test.go b/integration/integration_suite_test.go index 27e8d52fb..3000e98c6 100644 --- a/integration/integration_suite_test.go +++ b/integration/integration_suite_test.go @@ -26,7 +26,7 @@ func TestIntegration(t *testing.T) { } var _ = SynchronizedBeforeSuite(func() []byte { - pathToGinkgo, err := gexec.Build("github.com/onsi/ginkgo/ginkgo") + pathToGinkgo, err := gexec.Build("../ginkgo") Ω(err).ShouldNot(HaveOccurred()) return []byte(pathToGinkgo) }, func(computedPathToGinkgo []byte) { diff --git a/integration/watch_test.go b/integration/watch_test.go index 1d65702a7..4f711c123 100644 --- a/integration/watch_test.go +++ b/integration/watch_test.go @@ -1,6 +1,7 @@ package integration_test import ( + "go/build" "io/ioutil" "os" "path/filepath" @@ -41,7 +42,7 @@ var _ = Describe("Watch", func() { startGinkgoWithGopath := func(args ...string) *gexec.Session { cmd := ginkgoCommand(rootPath, args...) - os.Setenv("GOPATH", rootPath+":"+os.Getenv("GOPATH")) + os.Setenv("GOPATH", rootPath+":"+build.Default.GOPATH) session, err := gexec.Start(cmd, GinkgoWriter, GinkgoWriter) Ω(err).ShouldNot(HaveOccurred()) return session