fix failing bats tests

This commit is contained in:
Stephanie You
2023-10-18 12:12:23 -07:00
parent 428acaff73
commit e82fd5e9aa
5 changed files with 26 additions and 31 deletions
@@ -134,6 +134,7 @@ SKIP_SERVER_TESTS=$(cat <<-EOM
~sql-checkout.bats~
~cli-hosted.bats~
~profile.bats~
~ls.bats~
EOM
)
+9
View File
@@ -183,6 +183,15 @@ teardown() {
[[ "$output" =~ "t3" ]] || false
}
@test "ls: no tables in working set" {
dolt sql -q "drop table t1"
dolt sql -q "drop table t2"
run dolt ls
[ "$status" -eq 0 ]
[[ "$output" =~ "No tables in working set" ]] || false
}
@test "ls: too many arguments" {
run dolt ls HEAD HEAD~1
[ "$status" -eq 1 ]
-28
View File
@@ -55,34 +55,6 @@ teardown() {
[[ "$output" =~ "dolt_commit_diff_test" ]] || false
}
@test "system-tables: dolt ls --system -v shows history and diff systems tables for tables on other branches" {
dolt checkout -b add-table-branch
dolt sql -q "create table test (pk int, c1 int, primary key(pk))"
dolt add test
dolt commit -m "Added test table"
dolt checkout main
run dolt ls --system
[ $status -eq 0 ]
[[ "$output" =~ "dolt_log" ]] || false
[[ "$output" =~ "dolt_conflicts" ]] || false
[[ "$output" =~ "dolt_branches" ]] || false
[[ "$output" =~ "dolt_remote_branches" ]] || false
[[ "$output" =~ "dolt_remotes" ]] || false
[[ ! "$output" =~ "dolt_history_test" ]] || false
[[ ! "$output" =~ "dolt_diff_test" ]] || false
[[ ! "$output" =~ "dolt_commit_diff_test" ]] || false
run dolt ls --system -v
[ $status -eq 0 ]
[[ "$output" =~ "dolt_log" ]] || false
[[ "$output" =~ "dolt_conflicts" ]] || false
[[ "$output" =~ "dolt_branches" ]] || false
[[ "$output" =~ "dolt_remote_branches" ]] || false
[[ "$output" =~ "dolt_remotes" ]] || false
[[ "$output" =~ "dolt_history_test" ]] || false
[[ "$output" =~ "dolt_diff_test" ]] || false
[[ "$output" =~ "dolt_commit_diff_test" ]] || false
}
@test "system-tables: query dolt_log system table" {
dolt sql -q "create table test (pk int, c1 int, primary key(pk))"
dolt add test
@@ -19,9 +19,9 @@ teardown() {
cd sakila
# tables in working set
# tables and views in working set
run dolt ls
[ "${#lines[@]}" -eq 17 ]
[ "${#lines[@]}" -eq 24 ]
# triggers