Skip to content

Commit

Permalink
test/e2e/memcached_test.go: fix e2e testing on local machines
Browse files Browse the repository at this point in the history
PR operator-framework#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.
  • Loading branch information
AlexNPavel committed Sep 28, 2018
1 parent 5c53f65 commit 8031623
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/e2e/memcached_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,12 @@ func TestMemcached(t *testing.T) {
if err != nil {
t.Fatalf("dep ensure failed: %v\nCommand Output:\n%v", err, string(cmdOut))
}
// link local sdk to vendor if not in travis
if prSlug == "" {
os.RemoveAll("vendor/github.com/operator-framework/operator-sdk/pkg")
os.Symlink(path.Join(gopath, "/src/github.com/operator-framework/operator-sdk/pkg"),
"vendor/github.com/operator-framework/operator-sdk/pkg")
}

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

0 comments on commit 8031623

Please sign in to comment.