Skip to content

Commit

Permalink
Fix constraint tests
Browse files Browse the repository at this point in the history
  • Loading branch information
andreyaksenov committed Oct 16, 2023
1 parent d0c30dd commit 9b5538c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ g.test_constraints = function(cg)
-- Tests --
t.assert_equals(customers:count(), 1)
t.assert_equals(customers:get(1), { 1, "Alice", 30 })
t.assert_equals(age_err:unpack().message, 'Check constraint \'check_person\' failed for tuple')
t.assert_equals(name_err:unpack().message, 'Check constraint \'check_person\' failed for tuple')
t.assert_equals(age_err:unpack().message, 'Check constraint \'check_person\' failed for a tuple')
t.assert_equals(name_err:unpack().message, 'Check constraint \'check_person\' failed for a tuple')
end)
end
2 changes: 1 addition & 1 deletion doc/code_snippets/test/constraints/constraint_test.lua
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ g.test_constraints = function(cg)
t.assert_equals(customers:get(1), {1, "Alice", 30})

-- Failed contstraint --
t.assert_error_msg_contains("Check constraint 'check_person' failed for tuple",
t.assert_error_msg_contains("Check constraint 'check_person' failed for a tuple",
function() customers:insert{2, "Bob", 230} end)

-- Create one more tuple constraint --
Expand Down
2 changes: 1 addition & 1 deletion doc/code_snippets/test/sql/check_table_constraint_test.lua
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ g.test_space_is_updated = function(cg)
]])

-- Tests
t.assert_equals(insert_author_err:unpack().message, "Check constraint 'CHECK_NAME_LENGTH' failed for tuple")
t.assert_equals(insert_author_err:unpack().message, "Check constraint 'CHECK_NAME_LENGTH' failed for a tuple")
end)
end

0 comments on commit 9b5538c

Please sign in to comment.