Skip to content

Commit 4761cec

Browse files
committed
tests: move test to proper lint
1 parent 2b69ef5 commit 4761cec

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

linter/src/rules/adding_field_with_default.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ pub fn adding_field_with_default(
4545
.filter(|x| !x.is_empty())
4646
.collect();
4747

48-
// println!("{:#?}", non_volatile_funcs);
4948
for raw_stmt in tree {
5049
match &raw_stmt.stmt {
5150
Stmt::AlterTableStmt(stmt) => {

linter/src/rules/ban_char_field.rs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -77,17 +77,4 @@ COMMIT;
7777
"#;
7878
assert_debug_snapshot!(lint_sql(sql));
7979
}
80-
#[test]
81-
fn regression_with_indexing_2() {
82-
let sql = r#"
83-
BEGIN;
84-
ALTER TABLE "core_recipe" ADD COLUMN "foo" integer DEFAULT 10;
85-
ALTER TABLE "core_recipe" ADD CONSTRAINT foo_not_null
86-
CHECK ("foo" IS NOT NULL) NOT VALID;
87-
COMMIT;
88-
BEGIN;
89-
90-
"#;
91-
assert_debug_snapshot!(lint_sql(sql));
92-
}
9380
}

linter/src/rules/constraint_missing_not_valid.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,4 +265,18 @@ ALTER TABLE accounts VALIDATE CONSTRAINT positive_balance;
265265

266266
assert_debug_snapshot!(lint_sql(ok_sql));
267267
}
268+
269+
#[test]
270+
fn regression_with_indexing_2() {
271+
let sql = r#"
272+
BEGIN;
273+
ALTER TABLE "core_recipe" ADD COLUMN "foo" integer DEFAULT 10;
274+
ALTER TABLE "core_recipe" ADD CONSTRAINT foo_not_null
275+
CHECK ("foo" IS NOT NULL) NOT VALID;
276+
COMMIT;
277+
BEGIN;
278+
279+
"#;
280+
assert_debug_snapshot!(lint_sql(sql));
281+
}
268282
}

0 commit comments

Comments
 (0)