Skip to content

Commit 581d7c7

Browse files
authored
test/e2e/memcached_test.go: fix e2e testing on local machines (#548)
PR #525 changed the way that dep worked to fix dependency issues when doing e2e tests on travis. The PR breaks e2e testing on local machines though, as the tests will just use the master branch instead of a local branch. This commit symlinks the local sdk into vendor on non-travis tests. The tests will still fail on local machines if there is a dependency change, but we are unable to fix this on local machines unless `dep` adds local repo support.
1 parent 1a3f18b commit 581d7c7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/e2e/memcached_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,12 @@ func TestMemcached(t *testing.T) {
147147
if err != nil {
148148
t.Fatalf("dep ensure failed: %v\nCommand Output:\n%v", err, string(cmdOut))
149149
}
150+
// link local sdk to vendor if not in travis
151+
if prSlug == "" {
152+
os.RemoveAll("vendor/github.com/operator-framework/operator-sdk/pkg")
153+
os.Symlink(path.Join(gopath, "/src/github.com/operator-framework/operator-sdk/pkg"),
154+
"vendor/github.com/operator-framework/operator-sdk/pkg")
155+
}
150156

151157
// create crd
152158
crdYAML, err := ioutil.ReadFile("deploy/crd.yaml")

0 commit comments

Comments
 (0)