mirror of https://github.com/linkerd/linkerd2.git
Fix flaky certificate controller test (#2009)
Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
This commit is contained in:
parent
d48a473985
commit
10d5ebd064
|
|
@ -47,16 +47,15 @@ func TestCertificateController(t *testing.T) {
|
|||
t.Fatal("timed out waiting for sync")
|
||||
}
|
||||
|
||||
actions := controller.k8sAPI.Client.(*fake.Clientset).Actions()
|
||||
action := actions[len(actions)-2] // configmap create
|
||||
|
||||
if !action.Matches("create", "configmaps") {
|
||||
t.Fatalf("expected action to be configmap create, got: %+v", action)
|
||||
var found bool
|
||||
for _, a := range controller.k8sAPI.Client.(*fake.Clientset).Actions() {
|
||||
if a.Matches("create", "configmaps") && a.GetNamespace() == injectedNS {
|
||||
found = true
|
||||
}
|
||||
}
|
||||
|
||||
if action.GetNamespace() != injectedNS {
|
||||
t.Fatalf("expected action to happen in [%s] namespace, got [%s] namespace",
|
||||
injectedNS, action.GetNamespace())
|
||||
if !found {
|
||||
t.Fatalf("configmap create event not found in [%s] namespace", injectedNS)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue