Skip to content

Commit

Permalink
[vttestserver] Fix errcheck violations in new tests
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Mason <[email protected]>
  • Loading branch information
ajm188 committed Aug 26, 2021
1 parent 6f66a22 commit 1218823
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions go/cmd/vttestserver/vttestserver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ func TestForeignKeysAndDDLModes(t *testing.T) {
assert.NoError(t, err)
defer cluster.TearDown()

execOnCluster(cluster, "test_keyspace", func(conn *mysql.Conn) error {
err = execOnCluster(cluster, "test_keyspace", func(conn *mysql.Conn) error {
_, err := conn.ExecuteFetch(`CREATE TABLE test_table_2 (
id BIGINT,
test_table_id BIGINT,
Expand All @@ -154,13 +154,14 @@ func TestForeignKeysAndDDLModes(t *testing.T) {
assert.NoError(t, err)
return nil
})
assert.NoError(t, err)

cluster.TearDown()
cluster, err = startCluster("-foreign_key_mode=disallow", "-enable_online_ddl=false", "-enable_direct_ddl=false")
assert.NoError(t, err)
defer cluster.TearDown()

execOnCluster(cluster, "test_keyspace", func(conn *mysql.Conn) error {
err = execOnCluster(cluster, "test_keyspace", func(conn *mysql.Conn) error {
_, err := conn.ExecuteFetch(`CREATE TABLE test_table_2 (
id BIGINT,
test_table_id BIGINT,
Expand All @@ -177,6 +178,7 @@ func TestForeignKeysAndDDLModes(t *testing.T) {
assert.Error(t, err)
return nil
})
assert.NoError(t, err)
}

func TestCanVtGateExecute(t *testing.T) {
Expand Down

0 comments on commit 1218823

Please sign in to comment.