Skip to content

Commit b8d2b95

Browse files
committed
Only one of azure key or token can be specified in 3rd party tests (#54876)
#54803 introduces more QA tests for Azure storage service, but they fail the build is one of the key or token is missing. It should i nstead work like repository-azure:qa tests.
1 parent 37abc41 commit b8d2b95

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

x-pack/plugin/searchable-snapshots/qa/azure/build.gradle

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,6 @@ if (!azureAccount && !azureKey && !azureContainer && !azureBasePath && !azureSas
5252
azureSasToken = ''
5353
useFixture = true
5454

55-
} else if (!azureAccount || !azureKey || !azureContainer || !azureBasePath || !azureSasToken) {
56-
throw new IllegalArgumentException("not all options specified to run against external Azure service are present")
5755
}
5856

5957
if (useFixture) {
@@ -78,8 +76,12 @@ testClusters.integTest {
7876
}
7977

8078
keystore 'azure.client.searchable_snapshots.account', azureAccount
81-
keystore 'azure.client.searchable_snapshots.key', azureKey
82-
keystore 'azure.client.searchable_snapshots.sas_token', azureSasToken
79+
if (azureKey != null && azureKey.isEmpty() == false) {
80+
keystore 'azure.client.searchable_snapshots.key', azureKey
81+
}
82+
if (azureSasToken != null && azureSasToken.isEmpty() == false) {
83+
keystore 'azure.client.searchable_snapshots.sas_token', azureSasToken
84+
}
8385

8486
setting 'xpack.license.self_generated.type', 'trial'
8587

0 commit comments

Comments
 (0)