Skip to content

Commit 7e037e8

Browse files
NLB-6875: updated client_id context test cases
1 parent 69ef2f2 commit 7e037e8

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

analyze_test.go

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2912,6 +2912,24 @@ func TestAnalyze_oidc(t *testing.T) {
29122912
blockCtx{"http", "oidc_provider"},
29132913
false,
29142914
},
2915+
"client_id context not ok": {
2916+
&Directive{
2917+
Directive: "client_id",
2918+
Args: []string{"unique_id"},
2919+
Line: 5,
2920+
},
2921+
blockCtx{"http"},
2922+
true,
2923+
},
2924+
"client_id context ok": {
2925+
&Directive{
2926+
Directive: "client_id",
2927+
Args: []string{"unique_id"},
2928+
Line: 5,
2929+
},
2930+
blockCtx{"http", "oidc_provider"},
2931+
false,
2932+
},
29152933
}
29162934

29172935
for name, tc := range testcases {

0 commit comments

Comments
 (0)