From 89f15ed9d3896498b945c89880c9f24b723b4e91 Mon Sep 17 00:00:00 2001 From: Igor Motov Date: Wed, 14 Feb 2018 13:56:40 -0500 Subject: [PATCH] Tests: suppress testIndexUpgradeInfoLicense on release builds (elastic/x-pack-elasticsearch#3930) The testIndexUpgradeInfoLicense test is generating a license, which fails on release builds because they are using production public keys for license verification. relates elastic/x-pack-elasticsearch#3921 Original commit: elastic/x-pack-elasticsearch@e1c37bfd9139d1cd5d8aee1789ff678a969da054 --- .../org/elasticsearch/xpack/upgrade/IndexUpgradeIT.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/plugin/upgrade/src/test/java/org/elasticsearch/xpack/upgrade/IndexUpgradeIT.java b/plugin/upgrade/src/test/java/org/elasticsearch/xpack/upgrade/IndexUpgradeIT.java index 634bfac75a0..ef5c3acc3d2 100644 --- a/plugin/upgrade/src/test/java/org/elasticsearch/xpack/upgrade/IndexUpgradeIT.java +++ b/plugin/upgrade/src/test/java/org/elasticsearch/xpack/upgrade/IndexUpgradeIT.java @@ -5,7 +5,7 @@ */ package org.elasticsearch.xpack.upgrade; -import org.apache.lucene.util.LuceneTestCase; +import org.elasticsearch.Build; import org.elasticsearch.ElasticsearchSecurityException; import org.elasticsearch.action.search.SearchResponse; import org.elasticsearch.action.support.PlainActionFuture; @@ -37,7 +37,6 @@ public class IndexUpgradeIT extends IndexUpgradeIntegTestCase { enableLicensing(); } - @AwaitsFix(bugUrl="https://github.com/elastic/x-pack-elasticsearch/issues/3921") public void testIndexUpgradeInfo() { // Testing only negative case here, the positive test is done in bwcTests assertAcked(client().admin().indices().prepareCreate("test").get()); @@ -46,8 +45,11 @@ public class IndexUpgradeIT extends IndexUpgradeIntegTestCase { assertThat(response.getActions().entrySet(), empty()); } - @AwaitsFix(bugUrl="https://github.com/elastic/x-pack-elasticsearch/issues/3921") public void testIndexUpgradeInfoLicense() throws Exception { + // This test disables all licenses and generates a new one using dev private key + // in non-snapshot builds we are using produciton public key for license verification + // which makes this test to fail + assumeTrue("License is only valid when tested against snapshot/test keys", Build.CURRENT.isSnapshot()); assertAcked(client().admin().indices().prepareCreate("test").get()); ensureYellow("test"); disableLicensing(); @@ -128,7 +130,6 @@ public class IndexUpgradeIT extends IndexUpgradeIntegTestCase { assertTrue(postUpgradeIsCalled.get()); } - @AwaitsFix(bugUrl="https://github.com/elastic/x-pack-elasticsearch/issues/3921") public void testIndexUpgradeInfoOnEmptyCluster() { // On empty cluster asking for all indices shouldn't fail since no indices means nothing needs to be upgraded Response response = client().prepareExecute(IndexUpgradeInfoAction.INSTANCE).setIndices("_all").get();