Skip to content

Commit

Permalink
Fix integration tests
Browse files Browse the repository at this point in the history
Signed-off-by: David Gageot <david@gageot.net>
  • Loading branch information
dgageot committed Apr 28, 2020
1 parent 0249f89 commit 2b9d95b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
7 changes: 4 additions & 3 deletions integration/cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,14 @@ func TestCacheAPITriggers(t *testing.T) {
t.Skip("skipping kind integration test")
}

// Run skaffold build first to cache artifacts.
// Run skaffold build first to fail quickly on a build failure
skaffold.Build().InDir("examples/getting-started").RunOrFail(t)

ns, _ := SetupNamespace(t)

rpcAddr := randomPort()
skaffold.Dev("--rpc-port", rpcAddr).InDir("examples/getting-started").InNs(ns.Name).RunBackground(t)

// Disable caching to ensure we get a "build in progress" event each time.
skaffold.Dev("cache-artifacts=false", "--rpc-port", rpcAddr).InDir("examples/getting-started").InNs(ns.Name).RunBackground(t)

// Ensure we see a build triggered in the event log
_, entries := apiEvents(t, rpcAddr)
Expand Down
3 changes: 2 additions & 1 deletion integration/rpc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,8 @@ func setupSkaffoldWithArgs(t *testing.T, args ...string) {
// start a skaffold dev loop on an example
ns, _ := SetupNamespace(t)

skaffold.Dev(args...).InDir("testdata/dev").InNs(ns.Name).RunBackground(t)
// Disable caching to ensure we get a "build in progress" event each time.
skaffold.Dev(append([]string{"cache-artifacts=false"}, args...)...).InDir("testdata/dev").InNs(ns.Name).RunBackground(t)

t.Cleanup(func() {
Run(t, "testdata/dev", "rm", "foo")
Expand Down

0 comments on commit 2b9d95b

Please sign in to comment.