diff options
author | Julien HENRY <julien.henry@sonarsource.com> | 2015-10-05 10:42:44 +0200 |
---|---|---|
committer | Julien HENRY <julien.henry@sonarsource.com> | 2015-10-05 14:27:51 +0200 |
commit | b48ef5a6aaa8f93f768efeac447bbbf365aa4428 (patch) | |
tree | d1479c3927136036cbcdd5ed0271a4ae9bc66887 /it/it-plugins/settings-encryption-plugin/src | |
parent | 2205d5242d2d2ebb579f4a20c7c2dc1a17fbe1a8 (diff) | |
download | sonarqube-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.java | 12 |
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"); + } } } } |