From 77a8a17d27f2399b97270113dad1b19026a4c3e0 Mon Sep 17 00:00:00 2001 From: santosh Date: Sat, 19 Dec 2020 17:30:42 +0530 Subject: [PATCH] #2048[WIP] - Skip TestIndexRollover_FailIfILMNotPresent test for es versions less than 7 Signed-off-by: santosh --- plugin/storage/integration/es_index_rollover_test.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/plugin/storage/integration/es_index_rollover_test.go b/plugin/storage/integration/es_index_rollover_test.go index 64e8f693402..7369daf5ad8 100644 --- a/plugin/storage/integration/es_index_rollover_test.go +++ b/plugin/storage/integration/es_index_rollover_test.go @@ -36,6 +36,11 @@ const ( func TestIndexRollover_FailIfILMNotPresent(t *testing.T) { client, err := createESClient() require.NoError(t, err) + esVersion, err := getVersion(client) + require.NoError(t, err) + if esVersion != 7 { + t.Skip("Integration test - " + t.Name() + " against ElasticSearch skipped for ES version " + fmt.Sprint(esVersion)) + } // make sure ES is clean cleanES(t, client, "jaeger-ilm-policy") envVars := []string{"ES_USE_ILM=true"} @@ -51,8 +56,8 @@ func TestIndexRollover_CreateIndicesWithILM(t *testing.T) { client, err := createESClient() require.NoError(t, err) - esVersion, ev := getVersion(client) - require.NoError(t, ev) + esVersion, err := getVersion(client) + require.NoError(t, err) if esVersion != 7 { er := runEsRollover("init", []string{"ES_USE_ILM=true"})