Skip to content

Commit 5bbf70f

Browse files
committed
fix: adapt tests post backport
1 parent d50714a commit 5bbf70f

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

lib/active_record/connection_adapters/cockroachdb/referential_integrity.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ module ReferentialIntegrity
2929
# referential integrity (e.g: adding a foreign key with invalid data
3030
# raises).
3131
# So foreign keys should always be valid for that matter.
32-
def all_foreign_keys_valid?
32+
def check_all_foreign_keys_valid!
3333
true
3434
end
3535

test/cases/schema_dumper_test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def test_dump_index_rather_than_unique_constraints
1616
conn.create_table :payments, force: true do |t|
1717
t.text "name"
1818
t.integer "value"
19-
t.unique_constraint ["name", "value"], name: "as_unique_constraint" # Will be ignored
19+
t.unique_constraint ["name", "value"], name: "as_unique_constraint"
2020
t.index "lower(name::STRING) ASC", name: "simple_unique", unique: true
2121
t.index "name", name: "unique_with_where", where: "name IS NOT NULL", unique: true
2222
end
@@ -25,7 +25,7 @@ def test_dump_index_rather_than_unique_constraints
2525
output = dump_table_schema("payments")
2626

2727
index_lines = output.each_line.select { _1[/simple_unique|unique_with_where|as_unique_constraint/] }
28-
assert_equal 2, index_lines.size
28+
assert_equal 3, index_lines.size
2929
index_lines.each do |line|
3030
assert_match(/t.index/, line)
3131
end
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
exclude :test_translate_no_connection_exception_to_not_established, "CockroachDB doesn't support pg_terminate_backend()"

0 commit comments

Comments
 (0)