Skip to content

Commit

Permalink
Fix integration tests to stop require GOPATH (#686)
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-slynko committed Jun 7, 2020
1 parent 9bef594 commit a912ec5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion integration/integration_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
3 changes: 2 additions & 1 deletion integration/watch_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package integration_test

import (
"go/build"
"io/ioutil"
"os"
"path/filepath"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit a912ec5

Please sign in to comment.