adding test

This commit is contained in:
James Cor
2022-09-22 16:35:42 -07:00
parent fc2e07ed6b
commit b9feb14941
2 changed files with 24 additions and 0 deletions

View File

@@ -1230,6 +1230,13 @@ func TestDoltCommit(t *testing.T) {
}
}
func TestDoltCommitPrepared(t *testing.T) {
harness := newDoltHarness(t)
for _, script := range DoltCommitTests {
enginetest.TestScriptPrepared(t, harness, script)
}
}
func TestQueriesPrepared(t *testing.T) {
enginetest.TestQueriesPrepared(t, newDoltHarness(t))
}

View File

@@ -6313,4 +6313,21 @@ var DoltCommitTests = []queries.ScriptTest{
},
},
},
{
Name: "CALL DOLT_COMMIT('-ALL') adds all tables (including new ones) to the commit.",
SetUpScript: []string{
"CREATE table t (pk int primary key);",
"INSERT INTO t VALUES (1);",
"CALL DOLT_ADD('t');",
"CALL DOLT_COMMIT('-m', concat('author: ','somebody'));",
},
Assertions: []queries.ScriptTestAssertion{
{
Query: "SELECT message from dolt_log LIMIT 1",
Expected: []sql.Row{
{"author: somebody"},
},
},
},
},
}