Skip to content

Commit

Permalink
Add a test for an error case
Browse files Browse the repository at this point in the history
Signed-off-by: David Gageot <david@gageot.net>
  • Loading branch information
dgageot committed Sep 26, 2018
1 parent 093a17e commit 8f878fe
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/skaffold/deploy/kustomize_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ func TestDependenciesForKustomization(t *testing.T) {
- files: [app2.properties, app3.properties]`,
expected: []string{"kustomization.yaml", "app1.properties", "app2.properties", "app3.properties"},
},
{
description: "unknown base",
yaml: `bases: [other]`,
shouldErr: true,
},
}

for _, test := range tests {
Expand All @@ -69,7 +74,7 @@ func TestDependenciesForKustomization(t *testing.T) {

deps, err := dependenciesForKustomization(tmp.Root())

testutil.CheckErrorAndDeepEqual(t, false, err, joinPaths(tmp.Root(), test.expected), deps)
testutil.CheckErrorAndDeepEqual(t, test.shouldErr, err, joinPaths(tmp.Root(), test.expected), deps)
})
}
}

0 comments on commit 8f878fe

Please sign in to comment.