mirror of
https://github.com/dolthub/dolt.git
synced 2026-01-24 03:09:22 -06:00
what in tarnation is even happening
This commit is contained in:
@@ -78,77 +78,4 @@ teardown() {
|
||||
[ "${lines[5]}" = '+-----------------+' ]
|
||||
[ "${lines[6]}" = '| test |' ]
|
||||
[ "${lines[7]}" = '+-----------------+' ]
|
||||
}
|
||||
|
||||
@test "0-sql-client: no privs.json and no mysql.db, create mysql.db" {
|
||||
skiponwindows "Has dependencies that are missing on the Jenkins Windows installation."
|
||||
|
||||
cd repo1
|
||||
|
||||
# remove mysql.db and privs.json if they exist
|
||||
rm -f mysql.db
|
||||
rm -f privs.json
|
||||
|
||||
start_sql_server repo1
|
||||
cd ../
|
||||
|
||||
run show_users
|
||||
[ "$status" -eq 0 ]
|
||||
[ "${lines[0]}" = '# Welcome to the Dolt MySQL client.' ]
|
||||
[ "${lines[1]}" = "# Statements must be terminated with ';'." ]
|
||||
[ "${lines[2]}" = '# "exit" or "quit" (or Ctrl-D) to exit.' ]
|
||||
[ "${lines[3]}" = '+------+' ]
|
||||
[ "${lines[4]}" = '| User |' ]
|
||||
[ "${lines[5]}" = '+------+' ]
|
||||
[ "${lines[6]}" = '| dolt |' ]
|
||||
[ "${lines[7]}" = '+------+' ]
|
||||
|
||||
# check that mysql.db file exists, and privs.json doesn't
|
||||
cd repo1
|
||||
run ls
|
||||
[[ "$output" =~ "mysql.db" ]] || false
|
||||
![[ "$output" =~ "privs.json" ]] || false
|
||||
|
||||
# remove mysql.db and privs.json if they exist
|
||||
rm -f mysql.db
|
||||
rm -f privs.json
|
||||
}
|
||||
|
||||
@test "0-sql-client: has privs.json and no mysql.db, read from privs.json and create mysql.db" {
|
||||
skiponwindows "Has dependencies that are missing on the Jenkins Windows installation."
|
||||
|
||||
cd repo1
|
||||
|
||||
# remove mysql.db and privs.json if they exist
|
||||
rm -f mysql.db
|
||||
rm -f privs.json
|
||||
|
||||
# copy premade privs.json
|
||||
cp $BATS_TEST_DIRNAME/privs.json .
|
||||
|
||||
start_sql_server repo1
|
||||
cd ../
|
||||
|
||||
run show_users
|
||||
[ "$status" -eq 0 ]
|
||||
[ "${lines[0]}" = '# Welcome to the Dolt MySQL client.' ]
|
||||
[ "${lines[1]}" = "# Statements must be terminated with ';'." ]
|
||||
[ "${lines[2]}" = '# "exit" or "quit" (or Ctrl-D) to exit.' ]
|
||||
[ "${lines[3]}" = '+------------+' ]
|
||||
[ "${lines[4]}" = '| User |' ]
|
||||
[ "${lines[5]}" = '+------------+' ]
|
||||
[ "${lines[6]}" = '| dolt |' ]
|
||||
[ "${lines[7]}" = '| privs_user |' ]
|
||||
[ "${lines[8]}" = '+------------+' ]
|
||||
|
||||
cd repo1
|
||||
|
||||
# check that mysql.db and privs.json exist
|
||||
run ls
|
||||
[[ "$output" =~ "mysql.db" ]] || false
|
||||
[[ "$output" =~ "privs.json" ]] || false
|
||||
|
||||
# remove mysql.db and privs.json if they exist
|
||||
rm -f mysql.db
|
||||
rm -f privs.json
|
||||
}
|
||||
Reference in New Issue
Block a user