Skip to content

Commit 32ca5a4

Browse files
committed
Fixing tests for new Revert conflict resolution support changes
1 parent 5d96869 commit 32ca5a4

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

testing/go/dolt_functions_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2267,8 +2267,9 @@ func TestDoltRevert(t *testing.T) {
22672267
Expected: []sql.Row{{34}},
22682268
},
22692269
{
2270-
Query: "SELECT DOLT_REVERT('HEAD');",
2271-
Expected: []sql.Row{{"{0}"}},
2270+
// This returns a hash, so we need to take the consistent substring portion for testing
2271+
Query: `SELECT substring(DOLT_REVERT('HEAD')::text, 34);`,
2272+
Expected: []sql.Row{{",0,0,0}"}},
22722273
},
22732274
{
22742275
Query: `SELECT * FROM t_simple;`,

testing/go/enginetest/doltgres_engine_test.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1275,8 +1275,10 @@ func TestDoltRebasePrepared(t *testing.T) {
12751275

12761276
func TestDoltRevert(t *testing.T) {
12771277
h := newDoltgresServerHarness(t).WithSkippedQueries([]string{
1278-
"dolt_revert() respects dolt_ignore", // ERROR: INSERT: non-Doltgres type found in destination: text
1279-
"dolt_revert() automatically resolves some conflicts", // panic: interface conversion: sql.Type is types.VarCharType, not types.StringType
1278+
"dolt_revert() respects dolt_ignore", // ERROR: INSERT: non-Doltgres type found in destination: text
1279+
"dolt_revert() automatically resolves some conflicts", // panic: interface conversion: sql.Type is types.VarCharType, not types.StringType
1280+
"select count(*) from dolt_log;", // Doltgres creates an additional commit that Dolt doesn't have
1281+
"dolt_revert() --continue: ignored table in working set", // ERROR: ASSIGNMENT_CAST: target is of type boolean but expression is of type integer: 1
12801282
})
12811283
denginetest.RunDoltRevertTests(t, h)
12821284
}

0 commit comments

Comments
 (0)