Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
asdine committed Jun 27, 2022
1 parent 35ac656 commit 985d565
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cmd/genji/dbutil/dump_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func TestDump(t *testing.T) {
writeToBuf("\n")
}

q := fmt.Sprintf("CREATE TABLE %s (a INTEGER, ...);", table)
q := fmt.Sprintf("CREATE TABLE %s (a INTEGER, b ANY, c ANY, ...);", table)
err = db.Exec(q)
assert.NoError(t, err)
writeToBuf(q + "\n")
Expand Down
2 changes: 1 addition & 1 deletion cmd/genji/dbutil/exec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func TestExecSQL(t *testing.T) {

var got bytes.Buffer
err = ExecSQL(context.Background(), db, strings.NewReader(`
CREATE TABLE test;
CREATE TABLE test(a, ...);
CREATE INDEX idx_a ON test (a);
INSERT INTO test (a, b) VALUES (1, 2), (2, 2), (3, 2);
SELECT * FROM test;
Expand Down
6 changes: 3 additions & 3 deletions cmd/genji/shell/command_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ func TestIndexesCmd(t *testing.T) {
defer db.Close()

err = db.Exec(`
CREATE TABLE foo;
CREATE TABLE foo(a, b);
CREATE INDEX idx_foo_a ON foo (a);
CREATE INDEX idx_foo_b ON foo (b);
CREATE TABLE bar;
CREATE TABLE bar(a, b);
CREATE INDEX idx_bar_a_b ON bar (a, b);
`)
assert.NoError(t, err)
Expand All @@ -101,7 +101,7 @@ func TestSaveCommand(t *testing.T) {
defer db.Close()

err = db.Exec(`
CREATE TABLE test (a DOUBLE, ...);
CREATE TABLE test (a DOUBLE, b, ...);
CREATE INDEX idx_a_b ON test (a, b);
`)
assert.NoError(t, err)
Expand Down

0 comments on commit 985d565

Please sign in to comment.