Skip to content

Commit ce2c079

Browse files
committed
Run migration instead of dropping table
1 parent 1d2c485 commit ce2c079

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

tests/delete_test.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ package tests
4040

4141
import (
4242
"errors"
43-
"strings"
4443
"testing"
4544

4645
. "github.com/oracle-samples/gorm-oracle/tests/utils"
@@ -420,11 +419,7 @@ func TestHardDeleteAfterSoftDelete(t *testing.T) {
420419
}
421420

422421
func TestDeleteWithLimitAndOrder(t *testing.T) {
423-
if err := DB.Exec(`DROP TABLE "users" CASCADE CONSTRAINTS`).Error; err != nil {
424-
if !strings.Contains(err.Error(), "ORA-00942") {
425-
t.Fatalf("Failed to migrate, got error: %s", err)
426-
}
427-
}
422+
RunMigrations()
428423
users := []User{
429424
*GetUser("del-limited-1", Config{}),
430425
*GetUser("del-limited-2", Config{}),

0 commit comments

Comments
 (0)