Skip to content

Commit

Permalink
Merge pull request kubernetes#78380 from hainesc/master
Browse files Browse the repository at this point in the history
Add test cases for a helper function in controller manager
  • Loading branch information
k8s-ci-robot authored Dec 19, 2019
2 parents 5cb1ec5 + 01f1cf3 commit 8cd8784
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions cmd/controller-manager/app/helper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,20 @@ func TestIsControllerEnabled(t *testing.T) {
disabledByDefaultControllers: []string{"delta", "echo"},
expected: false,
},
{
name: "on by star, not off by name",
controllerName: "alpha",
controllers: []string{"*", "-charlie"},
disabledByDefaultControllers: []string{"delta", "echo"},
expected: true,
},
{
name: "off by name with star",
controllerName: "charlie",
controllers: []string{"*", "-charlie"},
disabledByDefaultControllers: []string{"delta", "echo"},
expected: false,
},
{
name: "off by default implicit, no star",
controllerName: "foxtrot",
Expand Down

0 comments on commit 8cd8784

Please sign in to comment.