From dca47edb16e874334839fa70e46c6ebc5c1ccf56 Mon Sep 17 00:00:00 2001 From: Nurlan Moldomurov Date: Thu, 17 Oct 2024 17:42:23 +0300 Subject: [PATCH] PMM-11180 fix tests. --- agent/runner/actions/mysql_show_index_action_test.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/agent/runner/actions/mysql_show_index_action_test.go b/agent/runner/actions/mysql_show_index_action_test.go index 2944a79044..7fd6f85c89 100644 --- a/agent/runner/actions/mysql_show_index_action_test.go +++ b/agent/runner/actions/mysql_show_index_action_test.go @@ -89,16 +89,13 @@ func TestMySQLShowIndex(t *testing.T) { assert.Equal(t, []interface{}{"city", "0", "PRIMARY", "1", "ID", "A", "CARDINALITY", nil, nil, "", "BTREE", "", ""}, actual[1]) assert.Equal(t, []interface{}{"city", "1", "CountryCode", "1", "CountryCode", "A", "CARDINALITY", nil, nil, "", "BTREE", "", ""}, actual[2]) - case mySQLVersion.String() == "8.0": + default: // >= MySQL 8.0 assert.Equal(t, []interface{}{ "Table", "Non_unique", "Key_name", "Seq_in_index", "Column_name", "Collation", "Cardinality", "Sub_part", "Packed", "Null", "Index_type", "Comment", "Index_comment", "Visible", "Expression", }, actual[0]) assert.Equal(t, []interface{}{"city", "0", "PRIMARY", "1", "ID", "A", "CARDINALITY", nil, nil, "", "BTREE", "", "", "YES", nil}, actual[1]) assert.Equal(t, []interface{}{"city", "1", "CountryCode", "1", "CountryCode", "A", "CARDINALITY", nil, nil, "", "BTREE", "", "", "YES", nil}, actual[2]) - - default: - t.Fatal("Unhandled version.") } })