Fixed test failure caused by new result set schema

This commit is contained in:
Zach Musgrave
2021-03-18 18:17:48 -07:00
parent ceb7673b43
commit af826badbd
4 changed files with 9 additions and 9 deletions

View File

@@ -78,7 +78,7 @@ seed_repos_with_tables_with_use_statements() {
EXPECTED=$(echo -e "pk,c1\n2,200")
run dolt sql -r csv --multi-db-dir ./ -b -q "
USE repo1;
SELECT r1_t1.pk, repo2.r2_t1.c1 FROM r1_t1 JOIN repo2.r2_t1 ON r1_t1.pk=repo2.r2_t1.pk;"
SELECT r1_t1.pk as pk, repo2.r2_t1.c1 as c1 FROM r1_t1 JOIN repo2.r2_t1 ON r1_t1.pk=repo2.r2_t1.pk;"
echo \"\"\"$output\"\"\"
[ "$status" -eq 0 ]
[[ "$output" =~ "$EXPECTED" ]] || false

View File

@@ -258,7 +258,7 @@ teardown() {
server_query 0 "SET @@repo1_head=hashof('master');SELECT * FROM one_pk ORDER by pk" ";pk,c1,c2\n0,None,None\n1,1,None\n2,2,2\n3,3,3"
# Validate the commit master matches that of test_branch (this is a fast forward) by matching commit hashes.
server_query 0 "select COUNT(hash) from dolt_branches where hash IN (select hash from dolt_branches WHERE name = 'test_branch')" "COUNT(dolt_branches.hash)\n2"
server_query 0 "select COUNT(hash) from dolt_branches where hash IN (select hash from dolt_branches WHERE name = 'test_branch')" "COUNT(hash)\n2"
# make some changes to test_branch and commit. Make some changes to master and commit. Merge.
multi_query 0 "
@@ -282,7 +282,7 @@ teardown() {
server_query 0 "SET @@repo1_head=hashof('master');SELECT * FROM one_pk ORDER by pk" ";pk,c1,c2\n0,None,None\n1,1,None\n2,10,2\n3,3,3\n4,4,4"
# Validate the a merge commit was written by making sure the hashes of the two branches don't match
server_query 0 "select COUNT(hash) from dolt_branches where hash IN (select hash from dolt_branches WHERE name = 'test_branch')" "COUNT(dolt_branches.hash)\n1"
server_query 0 "select COUNT(hash) from dolt_branches where hash IN (select hash from dolt_branches WHERE name = 'test_branch')" "COUNT(hash)\n1"
}
@test "sql-server: test reset_hard" {
@@ -552,4 +552,4 @@ SQL
"
server_query 1 "SELECT * FROM test" "pk,c1,c2,c3,c4,c5\n0,1,2,3,4,5\n1,1,2,3,4,5"
}
}

View File

@@ -93,10 +93,10 @@ SQL
@test "sql-shell: active branch after checkout" {
run dolt sql <<< "select active_branch()"
[ $status -eq 0 ]
[[ "$output" =~ "ACTIVE_BRANCH()" ]] || false
[[ "$output" =~ "active_branch()" ]] || false
[[ "$output" =~ "master" ]] || false
run dolt sql <<< "select dolt_checkout('-b', 'tmp_br'); select active_branch()"
run dolt sql <<< "select dolt_checkout('-b', 'tmp_br') as co; select active_branch()"
[ $status -eq 0 ]
[[ "$output" =~ "ACTIVE_BRANCH()" ]] || false
[[ "$output" =~ "active_branch()" ]] || false
[[ "$output" =~ "tmp_br" ]] || false
}

View File

@@ -1010,7 +1010,7 @@ SQL
@test "sql: active_branch() func" {
run dolt sql -q 'select active_branch()' -r csv
[ $status -eq 0 ]
[[ "$output" =~ "ACTIVE_BRANCH()" ]] || false
[[ "$output" =~ "active_branch()" ]] || false
[[ "$output" =~ "master" ]] || false
}
@@ -1019,6 +1019,6 @@ SQL
run dolt checkout tmp_br
run dolt sql -q 'select active_branch()' -r csv
[ $status -eq 0 ]
[[ "$output" =~ "ACTIVE_BRANCH()" ]] || false
[[ "$output" =~ "active_branch()" ]] || false
[[ "$output" =~ "tmp_br" ]] || false
}