mirror of
https://github.com/dolthub/dolt.git
synced 2026-02-26 18:29:03 -06:00
Updating BATS tests for type casing change from GMS
This commit is contained in:
@@ -281,7 +281,7 @@ teardown() {
|
||||
[[ "$output" =~ "column \"c12\" could not be found in any table in scope" ]] || false
|
||||
run dolt sql -q "update test set c1='foo' where pk=0"
|
||||
[ "$status" -eq 1 ]
|
||||
[[ "$output" =~ "error: 'foo' is not a valid value for 'BIGINT'" ]] || false
|
||||
[[ "$output" =~ "error: 'foo' is not a valid value for 'bigint'" ]] || false
|
||||
run dolt sql -q "update test set c1=100,c2=100,c3=100,c4=100,c5=100 where pk>0"
|
||||
[ "$status" -eq 0 ]
|
||||
[[ "$output" =~ "Query OK, 3 rows affected" ]] || false
|
||||
|
||||
@@ -769,7 +769,7 @@ SQL
|
||||
dolt sql -q "alter table t add primary key (pk, val)"
|
||||
run dolt diff -r sql
|
||||
[ $status -eq 0 ]
|
||||
[ "${lines[0]}" = 'ALTER TABLE `t` ADD `pk2` INT;' ]
|
||||
[ "${lines[0]}" = 'ALTER TABLE `t` ADD `pk2` int;' ]
|
||||
[ "${lines[1]}" = 'ALTER TABLE `t` DROP PRIMARY KEY;' ]
|
||||
[ "${lines[2]}" = 'ALTER TABLE `t` ADD PRIMARY KEY (pk,val);' ]
|
||||
[ "${lines[3]}" = 'Primary key sets differ between revisions for table t, skipping data diff' ]
|
||||
|
||||
@@ -83,7 +83,7 @@ teardown() {
|
||||
[[ "$output" =~ "\`boolean\` tinyint" ]] || false
|
||||
[[ "$output" =~ "\`float\` float" ]] || false
|
||||
[[ "$output" =~ "\`uint\` int unsigned" ]] || false
|
||||
[[ "$output" =~ "\`uuid\` char(36) character set ascii collate ascii_bin" ]] || false
|
||||
[[ "$output" =~ "\`uuid\` char(36) CHARACTER SET ascii COLLATE ascii_bin" ]] || false
|
||||
}
|
||||
|
||||
@test "schema-import: with an empty csv" {
|
||||
@@ -108,7 +108,7 @@ DELIM
|
||||
[[ "$output" =~ "\`boolean\` tinyint" ]] || false
|
||||
[[ "$output" =~ "\`float\` float" ]] || false
|
||||
[[ "$output" =~ "\`uint\` int" ]] || false
|
||||
[[ "$output" =~ "\`uuid\` char(36) character set ascii collate ascii_bin" ]] || false
|
||||
[[ "$output" =~ "\`uuid\` char(36) CHARACTER SET ascii COLLATE ascii_bin" ]] || false
|
||||
}
|
||||
|
||||
@test "schema-import: with invalid names" {
|
||||
|
||||
@@ -867,7 +867,7 @@ CREATE TABLE test (
|
||||
SQL
|
||||
run dolt schema show
|
||||
[ "$status" -eq "0" ]
|
||||
[[ "$output" =~ "\`v\` char(10) character set utf8mb3 collate utf8mb3_general_ci" ]] || false
|
||||
[[ "$output" =~ "\`v\` char(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci" ]] || false
|
||||
}
|
||||
|
||||
@test "types: NATIONAL CHARACTER(10)" {
|
||||
@@ -880,7 +880,7 @@ CREATE TABLE test (
|
||||
SQL
|
||||
run dolt schema show
|
||||
[ "$status" -eq "0" ]
|
||||
[[ "$output" =~ "\`v\` char(10) character set utf8mb3 collate utf8mb3_general_ci" ]] || false
|
||||
[[ "$output" =~ "\`v\` char(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci" ]] || false
|
||||
}
|
||||
|
||||
@test "types: NATIONAL CHARACTER VARYING(10)" {
|
||||
@@ -893,7 +893,7 @@ CREATE TABLE test (
|
||||
SQL
|
||||
run dolt schema show
|
||||
[ "$status" -eq "0" ]
|
||||
[[ "$output" =~ "\`v\` varchar(10) character set utf8mb3 collate utf8mb3_general_ci" ]] || false
|
||||
[[ "$output" =~ "\`v\` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci" ]] || false
|
||||
}
|
||||
|
||||
@test "types: NATIONAL VARCHAR(10)" {
|
||||
@@ -906,7 +906,7 @@ CREATE TABLE test (
|
||||
SQL
|
||||
run dolt schema show
|
||||
[ "$status" -eq "0" ]
|
||||
[[ "$output" =~ "\`v\` varchar(10) character set utf8mb3 collate utf8mb3_general_ci" ]] || false
|
||||
[[ "$output" =~ "\`v\` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci" ]] || false
|
||||
}
|
||||
|
||||
@test "types: NCHAR(10)" {
|
||||
@@ -919,7 +919,7 @@ CREATE TABLE test (
|
||||
SQL
|
||||
run dolt schema show
|
||||
[ "$status" -eq "0" ]
|
||||
[[ "$output" =~ "\`v\` char(10) character set utf8mb3 collate utf8mb3_general_ci" ]] || false
|
||||
[[ "$output" =~ "\`v\` char(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci" ]] || false
|
||||
}
|
||||
|
||||
@test "types: NVARCHAR(10)" {
|
||||
@@ -932,7 +932,7 @@ CREATE TABLE test (
|
||||
SQL
|
||||
run dolt schema show
|
||||
[ "$status" -eq "0" ]
|
||||
[[ "$output" =~ "\`v\` varchar(10) character set utf8mb3 collate utf8mb3_general_ci" ]] || false
|
||||
[[ "$output" =~ "\`v\` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci" ]] || false
|
||||
}
|
||||
|
||||
@test "types: NUMERIC" {
|
||||
@@ -1290,7 +1290,7 @@ CREATE TABLE test (
|
||||
SQL
|
||||
run dolt schema show
|
||||
[ "$status" -eq "0" ]
|
||||
[[ "$output" =~ "\`v\` varchar(10) character set utf32 collate utf32_general_ci" ]] || false
|
||||
[[ "$output" =~ "\`v\` varchar(10) CHARACTER SET utf32 COLLATE utf32_general_ci" ]] || false
|
||||
dolt sql -q "INSERT INTO test VALUES (1, 'abcdefg');"
|
||||
run dolt sql -q "SELECT * FROM test"
|
||||
[ "$status" -eq "0" ]
|
||||
|
||||
Reference in New Issue
Block a user