adding tests

This commit is contained in:
James Cor
2022-05-17 13:48:40 -07:00
parent 8b22e545cd
commit 9f11b3afd4
2 changed files with 14 additions and 0 deletions
+7
View File
@@ -42,6 +42,13 @@ teardown() {
[[ "$output" =~ "+---------------------" ]] || false
}
@test "sql-shell: dolt sql shell has mysql db" {
run dolt sql <<< "show tables from mysql;"
[ "$status" -eq "0" ]
[[ "$output" =~ "user" ]] || false
[[ "$output" =~ "role_edges" ]] || false
}
@test "sql-shell: bad sql in sql shell should error" {
run dolt sql <<< "This is bad sql"
[ $status -eq 1 ]
+7
View File
@@ -39,6 +39,13 @@ teardown() {
teardown_common
}
@test "sql: dolt sql -q has mysql db" {
run dolt sql -q "show tables from mysql;"
[ "$status" -eq "0" ]
[[ "$output" =~ "user" ]] || false
[[ "$output" =~ "role_edges" ]] || false
}
@test "sql: errors do not write incomplete rows" {
skip_nbf_dolt_1
dolt sql <<"SQL"