Skip to content

Commit e54532c

Browse files
Add the test for decrypted password
1 parent 1169b5c commit e54532c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

core/src/test/python/alias_password_test.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ class AliasPasswordTestCase(unittest.TestCase):
3030
_encrypted_password_bytes = jarray.array(_encrypted_password, 'b')
3131

3232
def setUp(self):
33-
model_context = ModelContext("test", {CommandLineArgUtil.PASSPHRASE_SWITCH: self._passphrase})
33+
model_context = ModelContext("test", {CommandLineArgUtil.USE_ENCRYPTION_SWITCH: 'true',
34+
CommandLineArgUtil.PASSPHRASE_SWITCH: self._passphrase})
3435
self.aliases = Aliases(model_context, wlst_mode=WlstModes.OFFLINE, wls_version=self._wls_version)
3536
self.online_aliases = Aliases(model_context, wlst_mode=WlstModes.ONLINE, wls_version=self._wls_version)
3637

@@ -72,6 +73,7 @@ def testOfflineWlstNames(self):
7273
wlst_name, wlst_value = \
7374
self.aliases.get_wlst_attribute_name_and_value(self.location, PASSWORD_ENCRYPTED, self._encrypted_password)
7475
self.assertEqual(wlst_name, self._wlst_password_encrypted_name)
76+
self.assertEqual(wlst_value, self._password)
7577

7678
# using unencrypted password
7779
wlst_name, wlst_value = \
@@ -87,6 +89,7 @@ def testOnlineWlstNames(self):
8789
self.online_aliases.get_wlst_attribute_name_and_value(self.location, PASSWORD_ENCRYPTED,
8890
self._encrypted_password)
8991
self.assertEqual(wlst_name, self._wlst_password_encrypted_name)
92+
self.assertEqual(wlst_value, self._password)
9093

9194
# using unencrypted password
9295
wlst_name, wlst_value = \

0 commit comments

Comments
 (0)