Skip to content

Commit

Permalink
test/e2e/memcached_test.go: fix e2e testing on local machines (operat…
Browse files Browse the repository at this point in the history
…or-framework#548)

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 authored and John Kim committed Oct 2, 2018
1 parent 20c4791 commit 4c72ad8
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 4c72ad8

Please sign in to comment.