add integration tests for different triggers
@@ -26,6 +26,27 @@ import (
)
func TestDev(t *testing.T) {
+ var tests = []struct {
+ description string
+ trigger string
+ skipFlakyTest bool
+ }{
+ {
+ description: "dev with polling trigger",
+ trigger: "polling",
+ },
+ {
+ description: "dev with notify trigger",
+ trigger: "notify",
+ skipFlakyTest: true,
+ },
+ }
+ for _, test := range tests {
+ t.Run(test.description, func(t *testing.T) {
+ // TODO(nkubala): fix this test and remove the skip
+ if test.skipFlakyTest {
+ t.Skip("Skip flaky test")
+ }
if testing.Short() {
t.Skip("skipping integration test")
}
@@ -42,7 +63,7 @@ func TestDev(t *testing.T) {
ns, client, deleteNs := SetupNamespace(t)
defer deleteNs()
- stop := skaffold.Dev().InDir("testdata/dev").InNs(ns.Name).RunBackground(t)
+ stop := skaffold.Dev("--trigger", test.trigger).InDir("testdata/dev").InNs(ns.Name).RunBackground(t)
defer stop()
dep := client.GetDeployment("test-dev")
@@ -56,4 +77,6 @@ func TestDev(t *testing.T) {
return dep.GetGeneration() != newDep.GetGeneration(), nil
})
testutil.CheckError(t, false, err)
+ })
+ }
}
