Skip to content

Commit

Permalink
Update dolt qery tests to detect adding a null column as a change.
Browse files Browse the repository at this point in the history
  • Loading branch information
nicktobey committed Nov 28, 2023
1 parent da879b7 commit 9071835
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions go/libraries/doltcore/sqle/enginetest/dolt_queries_diff.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ var DiffSystemTableScriptTests = []queries.ScriptTest{
Assertions: []queries.ScriptTestAssertion{
{
Query: "SELECT COUNT(*) FROM DOLT_DIFF_t;",
Expected: []sql.Row{{5}},
Expected: []sql.Row{{7}},
},
{
Query: "SELECT to_pk, to_c, from_pk, from_c, diff_type FROM DOLT_DIFF_t WHERE TO_COMMIT=@Commit1 ORDER BY to_pk;",
Expand All @@ -208,6 +208,8 @@ var DiffSystemTableScriptTests = []queries.ScriptTest{
{
Query: "SELECT to_pk, to_c, from_pk, from_c, diff_type FROM DOLT_DIFF_t WHERE TO_COMMIT=@Commit3 ORDER BY to_pk;",
Expected: []sql.Row{
{1, nil, 1, nil, "modified"},
{3, nil, 3, nil, "modified"},
{100, 101, nil, nil, "added"},
},
},
Expand Down Expand Up @@ -326,7 +328,7 @@ var DiffSystemTableScriptTests = []queries.ScriptTest{
Assertions: []queries.ScriptTestAssertion{
{
Query: "SELECT COUNT(*) FROM DOLT_DIFF_t;",
Expected: []sql.Row{{5}},
Expected: []sql.Row{{7}},
},
{
Query: "SELECT to_pk, to_c, from_pk, from_c, diff_type FROM DOLT_DIFF_t WHERE TO_COMMIT=@Commit1 ORDER BY to_pk;",
Expand All @@ -345,6 +347,8 @@ var DiffSystemTableScriptTests = []queries.ScriptTest{
{
Query: "SELECT to_pk, to_c, from_pk, from_c, diff_type FROM DOLT_DIFF_t WHERE TO_COMMIT=@Commit3 ORDER BY to_pk;",
Expected: []sql.Row{
{1, nil, 1, nil, "modified"},
{3, nil, 3, nil, "modified"},
{100, "101", nil, nil, "added"},
},
},
Expand All @@ -371,7 +375,7 @@ var DiffSystemTableScriptTests = []queries.ScriptTest{
Assertions: []queries.ScriptTestAssertion{
{
Query: "SELECT COUNT(*) FROM DOLT_DIFF_t;",
Expected: []sql.Row{{5}},
Expected: []sql.Row{{7}},
},
{
Query: "SELECT to_pk, to_c, from_pk, from_c, diff_type FROM DOLT_DIFF_t WHERE TO_COMMIT=@Commit1 ORDER BY to_pk;",
Expand All @@ -390,6 +394,8 @@ var DiffSystemTableScriptTests = []queries.ScriptTest{
{
Query: "SELECT to_pk, to_c, from_pk, from_c, diff_type FROM DOLT_DIFF_t WHERE TO_COMMIT=@Commit3 ORDER BY to_pk;",
Expected: []sql.Row{
{1, nil, 1, nil, "modified"},
{3, nil, 3, nil, "modified"},
{100, 101, nil, nil, "added"},
},
},
Expand Down Expand Up @@ -461,7 +467,7 @@ var DiffSystemTableScriptTests = []queries.ScriptTest{
Assertions: []queries.ScriptTestAssertion{
{
Query: "SELECT COUNT(*) FROM DOLT_DIFF_t;",
Expected: []sql.Row{{5}},
Expected: []sql.Row{{7}},
},
{
Query: "SELECT to_pk, to_c2, from_pk, from_c2, diff_type FROM DOLT_DIFF_t WHERE TO_COMMIT=@Commit1 ORDER BY to_pk;",
Expand All @@ -485,6 +491,8 @@ var DiffSystemTableScriptTests = []queries.ScriptTest{
{
Query: "SELECT to_pk, to_c2, from_pk, from_c2, diff_type FROM DOLT_DIFF_t WHERE TO_COMMIT=@Commit4 ORDER BY to_pk;",
Expected: []sql.Row{
{1, nil, 1, nil, "modified"},
{3, nil, 3, nil, "modified"},
{100, 101, nil, nil, "added"},
},
},
Expand Down

0 comments on commit 9071835

Please sign in to comment.