mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-16 10:33:11 -06:00
Add constraint test
This commit is contained in:
parent
c9d131d38b
commit
c721d9f97f
|
|
@ -130,5 +130,9 @@ func Test_insertMigration(t *testing.T) {
|
||||||
if err := sqlutil.InsertMigration(context.Background(), db, "testing"); err != nil {
|
if err := sqlutil.InsertMigration(context.Background(), db, "testing"); err != nil {
|
||||||
t.Fatalf("unable to insert migration: %s", err)
|
t.Fatalf("unable to insert migration: %s", err)
|
||||||
}
|
}
|
||||||
|
// Second insert should not return an error, as it was already executed.
|
||||||
|
if err := sqlutil.InsertMigration(context.Background(), db, "testing"); err != nil {
|
||||||
|
t.Fatalf("unable to insert migration: %s", err)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue