Skip to content

Commit 154eff2

Browse files
committed
fix: switch auth_jwt unit test condition
1 parent bcc1f04 commit 154eff2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

analyze_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ func TestAnalyze_auth_jwt(t *testing.T) {
7171
Line: 5,
7272
},
7373
blockCtx{"http", "location", "limit_except"},
74-
true,
74+
false,
7575
},
7676
"auth_jwt not ok": {
7777
&Directive{
@@ -108,11 +108,11 @@ func TestAnalyze_auth_jwt(t *testing.T) {
108108
t.Parallel()
109109
err := analyze("nginx.conf", tc.stmt, ";", tc.ctx, &ParseOptions{})
110110

111-
if tc.wantErr && err != nil {
111+
if !tc.wantErr && err != nil {
112112
t.Fatal(err)
113113
}
114114

115-
if !tc.wantErr && err == nil {
115+
if tc.wantErr && err == nil {
116116
t.Fatal("expected error, got nil")
117117
}
118118
})

0 commit comments

Comments
 (0)