Updated sql-shell.bats tests to support running in local vs remote mode.

This commit is contained in:
Neil Macneale IV
2023-07-06 09:46:27 -07:00
parent 2dda262ed8
commit 49f67c9a4f
2 changed files with 16 additions and 3 deletions
@@ -100,7 +100,6 @@ SKIP_SERVER_TESTS=$(cat <<-EOM
~import-append-tables.bats~
~backup.bats~
~default-values.bats~
~sql-shell.bats~
~types.bats~
~config-home.bats~
~cherry-pick.bats~
@@ -161,4 +160,4 @@ teardown_remote_server() {
then
stop_sql_server
fi
}
}
+15 -1
View File
@@ -35,7 +35,12 @@ teardown() {
run dolt --user=new_user sql <<< "select user from mysql.user"
[ "$status" -eq 1 ]
[[ "$output" =~ "command denied to user " ]] || false
# https://github.com/dolthub/dolt/issues/6307
if [ "$SQL_ENGINE" = "remote-engine" ]; then
[[ "$output" =~ "Access denied for user 'new_user'@'localhost'" ]] || false
else
[[ "$output" =~ "command denied to user 'new_user'@'localhost'" ]] || false
fi
rm -rf .doltcfg
}
@@ -236,6 +241,9 @@ teardown() {
}
@test "sql-shell: specify doltcfg directory" {
if [ "$SQL_ENGINE" = "remote-engine" ]; then
skip "Remote behavior differs"
fi
# remove any previous config directories
rm -rf .doltcfg
rm -rf doltcfgdir
@@ -273,6 +281,9 @@ teardown() {
}
@test "sql-shell: specify privilege file" {
if [ "$SQL_ENGINE" = "remote-engine" ]; then
skip "Remote behavior differs"
fi
# remove config files
rm -rf .doltcfg
rm -f privs.db
@@ -506,6 +517,9 @@ teardown() {
}
@test "sql-shell: specify doltcfg-dir and privilege-file" {
if [ "$SQL_ENGINE" = "remote-engine" ]; then
skip "Remote behavior differs"
fi
# remove any previous config directories
rm -rf .doltcfg
rm -rf doltcfgdir