зеркало из https://github.com/github/vitess-gh.git
[vttestserver] Fix errcheck violations in new tests
Signed-off-by: Andrew Mason <amason@slack-corp.com>
This commit is contained in:
Родитель
6f66a2270f
Коммит
12188233e3
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -177,6 +178,7 @@ func TestForeignKeysAndDDLModes(t *testing.T) {
|
|||
assert.Error(t, err)
|
||||
return nil
|
||||
})
|
||||
assert.NoError(t, err)
|
||||
}
|
||||
|
||||
func TestCanVtGateExecute(t *testing.T) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче