Skip to content

Commit 1b12a63

Browse files
committed
Log to indicate which authentication method we're using
1 parent aa7ecfb commit 1b12a63

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

modules/repository-azure/src/internalClusterTest/java/org/elasticsearch/repositories/azure/AzureStorageCleanupThirdPartyTests.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
import org.elasticsearch.common.unit.ByteSizeUnit;
3131
import org.elasticsearch.common.unit.ByteSizeValue;
3232
import org.elasticsearch.core.Booleans;
33+
import org.elasticsearch.logging.LogManager;
34+
import org.elasticsearch.logging.Logger;
3335
import org.elasticsearch.plugins.Plugin;
3436
import org.elasticsearch.repositories.AbstractThirdPartyRepositoryTestCase;
3537
import org.elasticsearch.repositories.blobstore.BlobStoreRepository;
@@ -46,6 +48,7 @@
4648
import static org.hamcrest.Matchers.not;
4749

4850
public class AzureStorageCleanupThirdPartyTests extends AbstractThirdPartyRepositoryTestCase {
51+
private static final Logger logger = LogManager.getLogger(AzureStorageCleanupThirdPartyTests.class);
4952
private static final boolean USE_FIXTURE = Booleans.parseBoolean(System.getProperty("test.azure.fixture", "true"));
5053

5154
private static final String AZURE_ACCOUNT = System.getProperty("test.azure.account");
@@ -89,8 +92,10 @@ protected SecureSettings credentials() {
8992
MockSecureSettings secureSettings = new MockSecureSettings();
9093
secureSettings.setString("azure.client.default.account", System.getProperty("test.azure.account"));
9194
if (hasSasToken) {
95+
logger.info("Using SAS token authentication");
9296
secureSettings.setString("azure.client.default.sas_token", System.getProperty("test.azure.sas_token"));
9397
} else {
98+
logger.info("Using key authentication");
9499
secureSettings.setString("azure.client.default.key", System.getProperty("test.azure.key"));
95100
}
96101
return secureSettings;

0 commit comments

Comments
 (0)