aboutsummaryrefslogtreecommitdiffstats
path: root/it/it-plugins/settings-encryption-plugin/src
diff options
context:
space:
mode:
authorJulien HENRY <julien.henry@sonarsource.com>2015-10-05 10:42:44 +0200
committerJulien HENRY <julien.henry@sonarsource.com>2015-10-05 14:27:51 +0200
commitb48ef5a6aaa8f93f768efeac447bbbf365aa4428 (patch)
treed1479c3927136036cbcdd5ed0271a4ae9bc66887 /it/it-plugins/settings-encryption-plugin/src
parent2205d5242d2d2ebb579f4a20c7c2dc1a17fbe1a8 (diff)
downloadsonarqube-b48ef5a6aaa8f93f768efeac447bbbf365aa4428.tar.gz
sonarqube-b48ef5a6aaa8f93f768efeac447bbbf365aa4428.zip
Move all batch ITs in the same suite
Diffstat (limited to 'it/it-plugins/settings-encryption-plugin/src')
-rw-r--r--it/it-plugins/settings-encryption-plugin/src/main/java/EncryptionVerifier.java12
1 files changed, 7 insertions, 5 deletions
diff --git a/it/it-plugins/settings-encryption-plugin/src/main/java/EncryptionVerifier.java b/it/it-plugins/settings-encryption-plugin/src/main/java/EncryptionVerifier.java
index c3ea7361c64..a4bafa7b6ae 100644
--- a/it/it-plugins/settings-encryption-plugin/src/main/java/EncryptionVerifier.java
+++ b/it/it-plugins/settings-encryption-plugin/src/main/java/EncryptionVerifier.java
@@ -11,11 +11,13 @@ public class EncryptionVerifier implements BatchExtension {
}
public void start() {
- System.out.println("Start EncryptionVerifier");
-
- String decryptedValue = settings.getString("encryptedProperty");
- if (!"this is a secret".equals(decryptedValue)) {
- throw new IllegalStateException("The property 'encryptedProperty' can not be decrypted");
+ if (settings.hasKey("encryptedProperty")) {
+ System.out.println("Start EncryptionVerifier");
+
+ String decryptedValue = settings.getString("encryptedProperty");
+ if (!"this is a secret".equals(decryptedValue)) {
+ throw new IllegalStateException("The property 'encryptedProperty' can not be decrypted");
+ }
}
}
}