Skip to content

Commit 09308a8

Browse files
committed
Renamed test function for query rule skiplist.
1 parent 7a16c28 commit 09308a8

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

internal/metadata/meta_test.go

+8-8
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ func TestParseQueryFlags(t *testing.T) {
140140
}
141141
}
142142

143-
func TestParseQueryRuleBlocklist(t *testing.T) {
143+
func TestParseQueryRuleSkiplist(t *testing.T) {
144144
for _, comments := range [][]string{
145145
{
146146
" name: CreateFoo :one",
@@ -158,7 +158,7 @@ func TestParseQueryRuleBlocklist(t *testing.T) {
158158
" @sqlc-vet-disable delete-without-where ",
159159
},
160160
} {
161-
_, flags, ruleBlocklist, err := ParseCommentFlags(comments)
161+
_, flags, ruleSkiplist, err := ParseCommentFlags(comments)
162162
if err != nil {
163163
t.Errorf("expected comments to parse, got err: %s", err)
164164
}
@@ -167,16 +167,16 @@ func TestParseQueryRuleBlocklist(t *testing.T) {
167167
t.Errorf("expected @sqlc-vet-disable flag not found")
168168
}
169169

170-
if _, ok := ruleBlocklist["sqlc/db-prepare"]; !ok {
171-
t.Errorf("expected rule not found in blocklist")
170+
if _, ok := ruleSkiplist["sqlc/db-prepare"]; !ok {
171+
t.Errorf("expected rule not found in skiplist")
172172
}
173173

174-
if _, ok := ruleBlocklist["delete-without-where"]; !ok {
175-
t.Errorf("expected rule not found in blocklist")
174+
if _, ok := ruleSkiplist["delete-without-where"]; !ok {
175+
t.Errorf("expected rule not found in skiplist")
176176
}
177177

178-
if _, ok := ruleBlocklist["update-without-where"]; ok {
179-
t.Errorf("unexpected rule found in blocklist")
178+
if _, ok := ruleSkiplist["update-without-where"]; ok {
179+
t.Errorf("unexpected rule found in skiplist")
180180
}
181181
}
182182
}

0 commit comments

Comments
 (0)