Wrap postgres up migrations into a single transaction (#887)
This commit is contained in:
1 parent
c1576dddda
commit
d2bb8820ea
9 files changed
+209
-217
No files matched your search
@@ -98,7 +98,7 @@ func testRun(t *testing.T, d *Postgres, migration io.Reader) {
|
||||
t.Fatal("migration can't be nil")
|
||||
}
|
||||
|
||||
if err := d.Run(ctx, migration); err != nil {
|
||||
if err := d.Run(ctx, migration, 1); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
@@ -132,7 +132,7 @@ func testSetVersion(t *testing.T, d *Postgres) {
|
||||
|
||||
for _, tc := range testCases {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
err := d.SetVersion(ctx, tc.version, tc.dirty)
|
||||
err := d.setVersion(ctx, tc.version, tc.dirty)
|
||||
if err != tc.expectedErr {
|
||||
t.Fatal("Got unexpected error:", err, "!=", tc.expectedErr)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user