mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-07 00:55:55 +00:00
Fix cli/batch test (and make sure it's not excluded from CI)
The logic in our Makefile was exluding from tests any package with `/batch` in the package name. This excluded `/cli/batch`, which is not good. This commit changes the exclusion logic to include the `/v3` portion of the package name, so `/v3/batch`.
This commit is contained in:
parent
c2105e3199
commit
e8fc445e69
2 changed files with 5 additions and 5 deletions
2
Makefile
2
Makefile
|
|
@ -51,7 +51,7 @@ version:
|
|||
|
||||
# We build a list of packages that omits the IDK and batch packages because
|
||||
# those packages require fancy environment setup.
|
||||
GOPACKAGES := $(shell $(GO) list ./... | grep -v "/idk" | grep -v "/batch")
|
||||
GOPACKAGES := $(shell $(GO) list ./... | grep -v "/v3/idk" | grep -v "/v3/batch")
|
||||
|
||||
# Run test suite
|
||||
test:
|
||||
|
|
|
|||
|
|
@ -39,9 +39,9 @@ func TestBatchSQL(t *testing.T) {
|
|||
s, err := buildBulkInsert(tbl, fields, ids, rows)
|
||||
assert.NoError(t, err)
|
||||
|
||||
exp := `BULK INSERT INTO foo (_id,name,age) MAP (0 int,1 string,2 int) FROM x'0,Alice,11
|
||||
1,Bob,22
|
||||
2,"Carl,Comma",33
|
||||
' WITH BATCHSIZE 3 FORMAT 'CSV' INPUT 'STREAM'`
|
||||
exp := `BULK INSERT INTO foo (_id,name,age) MAP ('$._id' id,'$.col_0' string,'$.col_1' int) FROM x'{"_id":0,"col_0":["Alice",11]}
|
||||
{"_id":1,"col_0":["Bob",22]}
|
||||
{"_id":2,"col_0":["Carl,Comma",33]}
|
||||
' WITH BATCHSIZE 3 FORMAT 'NDJSON' INPUT 'STREAM'`
|
||||
assert.Equal(t, exp, s)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue