mirror of
https://github.com/dolthub/dolt.git
synced 2026-02-14 01:07:08 -06:00
Fixed bats tests that were using reserved words that needed quoting
This commit is contained in:
@@ -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" {
|
||||
|
||||
@@ -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" {
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user