From e8061ff664d3aca1c87d06f9b31cf828e117a1a3 Mon Sep 17 00:00:00 2001 From: Martin Ahrens Date: Thu, 17 Oct 2024 13:08:45 -0400 Subject: [PATCH] more expected error text changes --- db_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/db_test.go b/db_test.go index aa7687a..bbbd192 100644 --- a/db_test.go +++ b/db_test.go @@ -1052,7 +1052,7 @@ func TestTransactionBlock(t *testing.T) { t.Fatal(err) } - expectedError := "Error 1146: Table 'squalor_test.objects' doesn't exist" + expectedError := "Error 1146 (42S02): Table 'squalor_test.objects' doesn't exist" if err := db.Transaction(func(tx *Tx) error { _, err := tx.Exec("SELECT * from objects") @@ -1079,7 +1079,7 @@ func TestTransactionBlockFailsOnDuplicatePrimaryKeyUpdate(t *testing.T) { t.Fatal(err.Error()) } - expectedError := fmt.Sprintf("Error 1062: Duplicate entry '%v' for key 'PRIMARY'", u2.ID) + expectedError := fmt.Sprintf("Error 1062 (23000): Duplicate entry '%v' for key 'users.PRIMARY'", u2.ID) if err := db.Transaction(func(tx *Tx) error { _, err := db.Exec(fmt.Sprintf("UPDATE `users` SET id = %v WHERE `id` = %v", u2.ID, u1.ID))