INNER CODE UNIT · Go

TestNamespaceHandlerOnAddWrongType

jtblin/kube2iam · namespace_test.go:115

func TestNamespaceHandlerOnAddWrongType(t *testing.T) {
	h := NewNamespaceHandler("ns-key")
	// Should not panic; logs an error
	h.OnAdd("not-a-namespace", false)
}

func TestNamespaceHandlerOnUpdate(t *testing.T) {
	h := NewNamespaceHandler("ns-key")
	ns := &v1.Namespace{ObjectMeta: metav1.ObjectMeta{Name: "test"}}
	h.OnUpdate(ns, ns)
}

func TestNamespaceHandlerOnUpdateWrongType(t *testing.T) {
	h := NewNamespaceHandler("ns-key")
	h.OnUpdate("old", "new")
}

func TestNamespaceHandlerOnDelete(t *testing.T) {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…