Merge pull request #78380 from hainesc/master

Add test cases for a helper function in controller manager
This commit is contained in:
Kubernetes Prow Robot 2019-12-18 18:25:55 -08:00 committed by GitHub
commit 8cd8784289
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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",