From 49dedbe704a51b41b9eb19ceed74c19d9c668bd0 Mon Sep 17 00:00:00 2001 From: Tanguy Leroux Date: Tue, 7 Apr 2020 13:51:24 +0200 Subject: [PATCH] Only one of azure key or token can be specified in 3rd party tests --- .../plugin/searchable-snapshots/qa/azure/build.gradle | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/x-pack/plugin/searchable-snapshots/qa/azure/build.gradle b/x-pack/plugin/searchable-snapshots/qa/azure/build.gradle index ad5007a7cbc7f..d9dbb26be31c7 100644 --- a/x-pack/plugin/searchable-snapshots/qa/azure/build.gradle +++ b/x-pack/plugin/searchable-snapshots/qa/azure/build.gradle @@ -52,8 +52,6 @@ if (!azureAccount && !azureKey && !azureContainer && !azureBasePath && !azureSas azureSasToken = '' useFixture = true -} else if (!azureAccount || !azureKey || !azureContainer || !azureBasePath || !azureSasToken) { - throw new IllegalArgumentException("not all options specified to run against external Azure service are present") } if (useFixture) { @@ -78,8 +76,12 @@ testClusters.integTest { } keystore 'azure.client.searchable_snapshots.account', azureAccount - keystore 'azure.client.searchable_snapshots.key', azureKey - keystore 'azure.client.searchable_snapshots.sas_token', azureSasToken + if (azureKey != null && azureKey.isEmpty() == false) { + keystore 'azure.client.searchable_snapshots.key', azureKey + } + if (azureSasToken != null && azureSasToken.isEmpty() == false) { + keystore 'azure.client.searchable_snapshots.sas_token', azureSasToken + } setting 'xpack.license.self_generated.type', 'trial'