Adding dolt_branch(-d) tests for sql shell (non-sql-server)

This commit is contained in:
Jason Fulghum
2023-03-21 15:49:09 -07:00
parent cf36ef0116
commit f2b06238a1
2 changed files with 11 additions and 1 deletions
+10
View File
@@ -162,3 +162,13 @@ SQL
run dolt sql -q "CALL DOLT_BRANCH('-D', 'branch_with_unpushed_commit');"
[ $status -eq 0 ]
}
@test "sql-branch: CALL DOLT_BRANCH -d error cases" {
dolt add . && dolt commit -m "1, 2, and 3 in test table"
dolt branch new_branch
run dolt sql -q "CALL DOLT_BRANCH('-D', 'main');"
[ $status -eq 1 ]
echo "OUTPUT: $output \n\n"
[[ "$output" =~ "attempted to delete checked out branch" ]] || false
}