From 178259995b5dcc2e9d9ce7e71227d641703ad7cc Mon Sep 17 00:00:00 2001 From: Daylon Wilkins Date: Tue, 21 Jun 2022 01:54:36 -0700 Subject: [PATCH] Unskipped bats tests --- .../doltcore/table/typed/parquet/writer.go | 2 +- integration-tests/bats/column_tags.bats | 1 - integration-tests/bats/deleted-branches.bats | 2 +- integration-tests/bats/docs.bats | 5 -- integration-tests/bats/drop-create.bats | 1 - integration-tests/bats/export-tables.bats | 15 ++-- integration-tests/bats/filter-branch.bats | 1 - integration-tests/bats/helper/pytest.py | 6 -- .../bats/helper/query-server-common.bash | 1 - integration-tests/bats/merge.bats | 1 - .../bats/remotes-sql-server.bats | 32 ++++---- integration-tests/bats/remotes.bats | 1 - integration-tests/bats/replication.bats | 1 - .../bats/sql-check-constraints.bats | 2 - integration-tests/bats/sql-checkout.bats | 1 - integration-tests/bats/sql-client.bats | 2 +- integration-tests/bats/sql-config.bats | 1 - integration-tests/bats/sql-conflicts.bats | 1 - integration-tests/bats/sql-create-tables.bats | 4 - integration-tests/bats/sql-merge.bats | 2 - integration-tests/bats/sql-push.bats | 2 - integration-tests/bats/sql-server.bats | 78 +++++++++---------- integration-tests/bats/sql-show.bats | 1 - integration-tests/bats/sql.bats | 1 - integration-tests/bats/system-tables.bats | 13 ++-- 25 files changed, 71 insertions(+), 106 deletions(-) diff --git a/go/libraries/doltcore/table/typed/parquet/writer.go b/go/libraries/doltcore/table/typed/parquet/writer.go index 7cfc2c690b..8120befbef 100644 --- a/go/libraries/doltcore/table/typed/parquet/writer.go +++ b/go/libraries/doltcore/table/typed/parquet/writer.go @@ -38,7 +38,7 @@ type ParquetWriter struct { var typeMap = map[typeinfo.Identifier]string{ typeinfo.DatetimeTypeIdentifier: "type=INT64, convertedtype=TIME_MICROS", - typeinfo.DecimalTypeIdentifier: "type=BYTE_ARRAY, convertedtype=DECIMAL, scale=2, precision=20", + typeinfo.DecimalTypeIdentifier: "type=BYTE_ARRAY, convertedtype=UTF8", typeinfo.EnumTypeIdentifier: "type=BYTE_ARRAY, convertedtype=UTF8", typeinfo.InlineBlobTypeIdentifier: "type=BYTE_ARRAY, convertedtype=UTF8", typeinfo.SetTypeIdentifier: "type=BYTE_ARRAY, convertedtype=UTF8", diff --git a/integration-tests/bats/column_tags.bats b/integration-tests/bats/column_tags.bats index 2a55b19957..d6e22a9507 100644 --- a/integration-tests/bats/column_tags.bats +++ b/integration-tests/bats/column_tags.bats @@ -57,7 +57,6 @@ SQL [[ "$output" =~ "TeSt,c1,8201" ]] || false } - @test "column_tags: Merging two branches that added same tag, name, type, and constraints" { dolt sql < LICENSE.md dolt sql < README.md @@ -400,7 +398,6 @@ SQL run cat README.md [[ "$output" =~ "this is my readme" ]] || false - echo "testing-modified-doc" > LICENSE.md dolt checkout LICENSE.md run cat LICENSE.md @@ -463,7 +460,6 @@ SQL run cat README.md [[ "$output" =~ "a readme" ]] || false - echo "new readme" > README.md dolt sql < README.md echo "a license" > LICENSE.md diff --git a/integration-tests/bats/drop-create.bats b/integration-tests/bats/drop-create.bats index 8696361922..af55323d71 100755 --- a/integration-tests/bats/drop-create.bats +++ b/integration-tests/bats/drop-create.bats @@ -148,7 +148,6 @@ SQL [[ "$output" =~ "| + | 3 | 3 | 3 |" ]] || false } - @test "drop-create: dropped column" { dolt sql < output.json [ "$status" -eq 0 ] - row1='{"pk":1,"v":1234.57,"b":511}' - row2='{"pk":2,"v":5235.67,"b":514}' - [[ "$output" =~ "$row1" ]] || false - [[ "$output" =~ "$row2" ]] || false + [[ "$output" =~ '{"pk":1,"v":"1234.56789","b":511}' ]] || false + [[ "$output" =~ '{"pk":2,"v":"5235.66789","b":514}' ]] || false } @test "export-tables: table export to sql with null values in different sql types" { diff --git a/integration-tests/bats/filter-branch.bats b/integration-tests/bats/filter-branch.bats index d5b2d71f2e..d25e0082dd 100644 --- a/integration-tests/bats/filter-branch.bats +++ b/integration-tests/bats/filter-branch.bats @@ -193,7 +193,6 @@ function setup_write_test { [[ "$output" =~ "added" ]] || false done - for commit in HEAD HEAD~1 HEAD~2; do run dolt sql -q "SHOW TABLES AS OF '$commit';" -r csv [ "$status" -eq 0 ] diff --git a/integration-tests/bats/helper/pytest.py b/integration-tests/bats/helper/pytest.py index 7448d78912..1d64badbb6 100644 --- a/integration-tests/bats/helper/pytest.py +++ b/integration-tests/bats/helper/pytest.py @@ -6,16 +6,13 @@ import mysql.connector from io import StringIO from multiprocessing import Process - def _connect(user, host, port, database): return mysql.connector.connect(user=user, host=host, port=port, database=database, allow_local_infile=True) - def _print_err_and_exit(e): print(e, file=sys.stderr) sys.exit(1) - def csv_to_row_maps(csv_str): csv_str = csv_str.replace('\\n', '\n') rd = csv.DictReader(StringIO(csv_str)) @@ -25,7 +22,6 @@ def csv_to_row_maps(csv_str): return rows - class DoltConnection(object): def __init__(self, user='root', host='127.0.0.1', port=3306, database='dolt', auto_commit=False): self.user = user @@ -69,7 +65,6 @@ class DoltConnection(object): _print_err_and_exit(e) raise e - class InfiniteRetryConnection(DoltConnection): def connect(self): while True: @@ -86,7 +81,6 @@ class InfiniteRetryConnection(DoltConnection): except BaseException: pass - def wait_for_connection(user='root', host='127.0.0.1', port=3306, database='dolt', timeout_ms=5000): timeoutf = timeout_ms / 1000.0 exit_zero_on_connect = InfiniteRetryConnection(user=user, host=host, port=port, database=database) diff --git a/integration-tests/bats/helper/query-server-common.bash b/integration-tests/bats/helper/query-server-common.bash index 1af3ad706e..0cf35fa7b0 100644 --- a/integration-tests/bats/helper/query-server-common.bash +++ b/integration-tests/bats/helper/query-server-common.bash @@ -161,7 +161,6 @@ behavior: wait_for_connection $PORT 5000 } - start_multi_db_server() { DEFAULT_DB="$1" let PORT="$$ % (65536-1024) + 1024" diff --git a/integration-tests/bats/merge.bats b/integration-tests/bats/merge.bats index f23be499f1..1fa0df155f 100644 --- a/integration-tests/bats/merge.bats +++ b/integration-tests/bats/merge.bats @@ -531,7 +531,6 @@ SQL [[ "$output" =~ "2,2,2" ]] || false } - @test "merge: merge branch with table that was deleted" { dolt sql << SQL INSERT INTO test2 VALUES (0, 0, 0); diff --git a/integration-tests/bats/remotes-sql-server.bats b/integration-tests/bats/remotes-sql-server.bats index c47d7b21f3..46d0b386c3 100644 --- a/integration-tests/bats/remotes-sql-server.bats +++ b/integration-tests/bats/remotes-sql-server.bats @@ -37,7 +37,7 @@ teardown() { } @test "remotes-sql-server: sql-push --set-remote within session" { - skiponwindows "Has dependencies that are missing on the Jenkins Windows installation." + skiponwindows "Missing dependencies" cd repo1 dolt remote add origin file://../rem1 @@ -55,7 +55,7 @@ teardown() { } @test "remotes-sql-server: push on sql-session commit" { - skiponwindows "Has dependencies that are missing on the Jenkins Windows installation." + skiponwindows "Missing dependencies" cd repo1 dolt config --local --add sqlserver.global.dolt_replicate_to_remote remote1 @@ -75,7 +75,7 @@ teardown() { } @test "remotes-sql-server: async push on sql-session commit" { - skiponwindows "Has dependencies that are missing on the Jenkins Windows installation." + skiponwindows "Missing dependencies" cd repo1 dolt config --local --add sqlserver.global.dolt_replicate_to_remote remote1 @@ -99,7 +99,7 @@ teardown() { } @test "remotes-sql-server: pull new commits on read" { - skiponwindows "Has dependencies that are missing on the Jenkins Windows installation." + skiponwindows "Missing dependencies" cd repo1 dolt commit -am "cm" @@ -114,7 +114,7 @@ teardown() { } @test "remotes-sql-server: pull remote not found error" { - skiponwindows "Has dependencies that are missing on the Jenkins Windows installation." + skiponwindows "Missing dependencies" cd repo1 dolt config --local --add sqlserver.global.dolt_read_replica_remote unknown @@ -127,7 +127,7 @@ teardown() { } @test "remotes-sql-server: quiet pull warnings" { - skiponwindows "Has dependencies that are missing on the Jenkins Windows installation." + skiponwindows "Missing dependencies" cd repo1 dolt config --local --add sqlserver.global.dolt_skip_replication_errors 1 @@ -139,7 +139,7 @@ teardown() { } @test "remotes-sql-server: push remote not found error" { - skiponwindows "Has dependencies that are missing on the Jenkins Windows installation." + skiponwindows "Missing dependencies" cd repo1 dolt config --local --add sqlserver.global.dolt_replicate_to_remote unknown @@ -151,7 +151,7 @@ teardown() { } @test "remotes-sql-server: quiet push warnings" { - skiponwindows "Has dependencies that are missing on the Jenkins Windows installation." + skiponwindows "Missing dependencies" cd repo1 dolt config --local --add sqlserver.global.dolt_skip_replication_errors 1 @@ -162,7 +162,7 @@ teardown() { } @test "remotes-sql-server: pull multiple heads" { - skiponwindows "Has dependencies that are missing on the Jenkins Windows installation." + skiponwindows "Missing dependencies" cd repo1 dolt checkout -b new_feature @@ -179,7 +179,7 @@ teardown() { } @test "remotes-sql-server: connect to remote head" { - skiponwindows "Has dependencies that are missing on the Jenkins Windows installation." + skiponwindows "Missing dependencies" cd repo1 dolt checkout -b new_feature @@ -222,7 +222,7 @@ teardown() { } @test "remotes-sql-server: pull all heads" { - skiponwindows "Has dependencies that are missing on the Jenkins Windows installation." + skiponwindows "Missing dependencies" cd repo1 dolt commit -am "new commit" @@ -237,7 +237,7 @@ teardown() { } @test "remotes-sql-server: pull invalid head" { - skiponwindows "Has dependencies that are missing on the Jenkins Windows installation." + skiponwindows "Missing dependencies" skip "query retry prevents error checking" cd repo2 @@ -252,7 +252,7 @@ teardown() { } @test "remotes-sql-server: pull multiple heads, one invalid" { - skiponwindows "Has dependencies that are missing on the Jenkins Windows installation." + skiponwindows "Missing dependencies" skip "query retry prevents error checking" cd repo2 @@ -267,7 +267,7 @@ teardown() { } @test "remotes-sql-server: quiet pull all heads warnings" { - skiponwindows "Has dependencies that are missing on the Jenkins Windows installation." + skiponwindows "Missing dependencies" cd repo1 dolt commit -am "cm" @@ -283,7 +283,7 @@ teardown() { } @test "remotes-sql-server: connect to missing branch pulls remote" { - skiponwindows "Has dependencies that are missing on the Jenkins Windows installation." + skiponwindows "Missing dependencies" cd repo1 dolt checkout -b feature-branch @@ -300,7 +300,7 @@ teardown() { } @test "remotes-sql-server: connect to hash works" { - skiponwindows "Has dependencies that are missing on the Jenkins Windows installation." + skiponwindows "Missing dependencies" cd repo1 dolt commit -am "cm" diff --git a/integration-tests/bats/remotes.bats b/integration-tests/bats/remotes.bats index 2707be82d7..f35df4db36 100644 --- a/integration-tests/bats/remotes.bats +++ b/integration-tests/bats/remotes.bats @@ -952,7 +952,6 @@ SQL [ "$status" -eq 0 ] } - @test "remotes: force fetch from main" { dolt remote add test-remote http://localhost:50051/test-org/test-repo dolt push test-remote main diff --git a/integration-tests/bats/replication.bats b/integration-tests/bats/replication.bats index d0713d40ba..9ac6e21c44 100644 --- a/integration-tests/bats/replication.bats +++ b/integration-tests/bats/replication.bats @@ -211,7 +211,6 @@ teardown() { [[ "$output" =~ "invalid replicate heads setting; cannot set both" ]] || false } - @test "replication: replica pull multiple heads quiet warnings" { dolt clone file://./rem1 repo2 cd repo2 diff --git a/integration-tests/bats/sql-check-constraints.bats b/integration-tests/bats/sql-check-constraints.bats index 7753589fa3..e62e6aab3a 100644 --- a/integration-tests/bats/sql-check-constraints.bats +++ b/integration-tests/bats/sql-check-constraints.bats @@ -9,7 +9,6 @@ teardown() { teardown_common } - @test "sql-check-constraints: basic tests for check constraints" { dolt sql < 3" ]] || false } - diff --git a/integration-tests/bats/sql-checkout.bats b/integration-tests/bats/sql-checkout.bats index 26528a3a96..c53d7308cb 100644 --- a/integration-tests/bats/sql-checkout.bats +++ b/integration-tests/bats/sql-checkout.bats @@ -99,7 +99,6 @@ CALL DOLT_CHECKOUT('-b', 'new-branch'); SQL } - @test "sql-checkout: DOLT_CHECKOUT -b throws error on branches that already exist" { run dolt sql -q "SELECT DOLT_CHECKOUT('-b', 'main')" [ $status -eq 1 ] diff --git a/integration-tests/bats/sql-client.bats b/integration-tests/bats/sql-client.bats index 58c2de2fc3..db0051d9c8 100644 --- a/integration-tests/bats/sql-client.bats +++ b/integration-tests/bats/sql-client.bats @@ -42,7 +42,7 @@ teardown() { } @test "sql-client: test sql-client shows tables" { - skiponwindows "Has dependencies that are missing on the Jenkins Windows installation." + skiponwindows "Missing dependencies" cd repo1 start_sql_server repo1 cd ../ diff --git a/integration-tests/bats/sql-config.bats b/integration-tests/bats/sql-config.bats index 1309f4f068..187901e8a3 100644 --- a/integration-tests/bats/sql-config.bats +++ b/integration-tests/bats/sql-config.bats @@ -44,7 +44,6 @@ teardown() { [[ "$output" =~ "sqlserver.global.max_connections = 1000" ]] || false } - @test "sql-config: remove persisted variable with cli engine" { skip "TODO parser support for RESET PERSIST" diff --git a/integration-tests/bats/sql-conflicts.bats b/integration-tests/bats/sql-conflicts.bats index 7d24bf4c2c..de17ba8951 100644 --- a/integration-tests/bats/sql-conflicts.bats +++ b/integration-tests/bats/sql-conflicts.bats @@ -94,7 +94,6 @@ SQL [ "$status" -eq 0 ] } - @test "sql-conflicts: modify conflict" { skip_nbf_dolt_1 dolt SQL -q "INSERT INTO one_pk (pk1,c1,c2) VALUES (0,0,0)" diff --git a/integration-tests/bats/sql-create-tables.bats b/integration-tests/bats/sql-create-tables.bats index 49302077c3..3f641d9ca7 100644 --- a/integration-tests/bats/sql-create-tables.bats +++ b/integration-tests/bats/sql-create-tables.bats @@ -213,7 +213,6 @@ SQL [[ "$output" =~ "PRIMARY KEY (\`pk\`)" ]] || false } - @test "sql-create-tables: create a table using sql with a string" { run dolt sql <config.yml <