Merge pull request #8 from liquidata-inc/aaron/add-failed-import-bad-filename-test

Added failing bats test for a badly named file
This commit is contained in:
Aaron Son
2019-07-25 11:34:16 -07:00
committed by GitHub
2 changed files with 9 additions and 1 deletions

View File

@@ -118,6 +118,12 @@ teardown() {
[[ "$output" =~ "Error creating reader" ]] || false
}
@test "try to create a table with dolt table import with a bad file name" {
run dolt table import -c test `batshelper bad.data`
skip "This panics right now with: panic: Unsupported table format should have failed before reaching here."
[ "$status" -eq 1 ]
}
@test "create a table with two primary keys from csv import" {
run dolt table import -c --pk=pk1,pk2 test `batshelper 2pk5col-ints.csv`
[ "$status" -eq 0 ]
@@ -329,4 +335,4 @@ teardown() {
[ $status -eq 0 ]
[ "${lines[0]}" = "diff --dolt a/test b/test" ]
[ "${lines[1]}" = "added table" ]
}
}

2
bats/helper/bad.data Normal file
View File

@@ -0,0 +1,2 @@
this,is,bad
real,bad,