mirror of
https://github.com/dolthub/dolt.git
synced 2026-04-23 05:13:00 -05:00
fix failing bats tests
This commit is contained in:
@@ -134,6 +134,7 @@ SKIP_SERVER_TESTS=$(cat <<-EOM
|
||||
~sql-checkout.bats~
|
||||
~cli-hosted.bats~
|
||||
~profile.bats~
|
||||
~ls.bats~
|
||||
EOM
|
||||
)
|
||||
|
||||
|
||||
@@ -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 ]
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user