mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-01 07:47:56 +00:00
Merge pull request #78380 from hainesc/master
Add test cases for a helper function in controller manager
This commit is contained in:
commit
8cd8784289
@ -60,6 +60,20 @@ func TestIsControllerEnabled(t *testing.T) {
|
|||||||
disabledByDefaultControllers: []string{"delta", "echo"},
|
disabledByDefaultControllers: []string{"delta", "echo"},
|
||||||
expected: false,
|
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",
|
name: "off by default implicit, no star",
|
||||||
controllerName: "foxtrot",
|
controllerName: "foxtrot",
|
||||||
|
Loading…
Reference in New Issue
Block a user