INNER CODE UNIT · Go

TestGetNamespaceRoleAnnotation

jtblin/kube2iam · namespace_test.go:13

func TestGetNamespaceRoleAnnotation(t *testing.T) {
	tests := []struct {
		name       string
		annotation string
		wantLen    int
		wantFirst  string
	}{
		{
			name:       "empty annotation returns nil",
			annotation: "",
			wantLen:    0,
		},
		{
			name:       "malformed JSON returns nil",
			annotation: "not valid json",
			wantLen:    0,
		},
		{

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…