Fixed bats tests that were using reserved words that needed quoting

This commit is contained in:
Zach Musgrave
2022-08-09 11:24:30 -07:00
parent 4bf188f64d
commit 3e547e256b
3 changed files with 7 additions and 7 deletions

View File

@@ -17,7 +17,7 @@ CREATE TABLE two_pk (
c2 BIGINT,
PRIMARY KEY (pk1,pk2)
);
CREATE TABLE empty (
CREATE TABLE empty_table (
pk BIGINT NOT NULL,
PRIMARY KEY (pk)
);
@@ -31,7 +31,7 @@ teardown() {
}
@test "sql-conflicts: read from empty table" {
dolt sql -q "SELECT * FROM dolt_conflicts_empty"
dolt sql -q "SELECT * FROM dolt_conflicts_empty_table"
}
@test "sql-conflicts: add conflict" {

View File

@@ -499,11 +499,11 @@ SQL
@test "sql-diff: reconciles CREATE/ALTER/DROP VIEW" {
dolt sql -q 'create table test (pk int not null primary key)'
dolt sql -q 'create view double as select pk*2 from test'
dolt sql -q 'create view double_view as select pk*2 from test'
run dolt diff -r sql
[ "$status" -eq 0 ]
skip "create view statements not implemented"
[[ "$output" =~ "CREATE VIEW `double`" ]] || false
[[ "$output" =~ "CREATE VIEW `double_view`" ]] || false
}
@test "sql-diff: diff sql recreates tables with all types" {

View File

@@ -39,12 +39,12 @@ teardown() {
@test "sql-show: show table status has number of rows correct" {
dolt sql -q "CREATE TABLE test(pk int NOT NULL AUTO_INCREMENT, c1 int, PRIMARY KEY (pk))"
run dolt sql -q "show table status where Rows=0"
run dolt sql -q 'show table status where `Rows`=0'
[ "$status" -eq 0 ]
[[ "$output" =~ "test" ]] || false
dolt sql -q "INSERT INTO test (c1) VALUES (0)"
run dolt sql -q "show table status where Rows=1;"
run dolt sql -q 'show table status where `Rows`=1;'
[ "$status" -eq 0 ]
[[ "$output" =~ "test" ]] || false
}
@@ -62,4 +62,4 @@ teardown() {
# Looking for 32 bytes (2 cols * 2 * rows * 8 int bytes)
[[ "$output" =~ "32" ]] || false
}
}