mirror of
https://github.com/ansible/awx.git
synced 2026-05-17 14:27:42 -02:30
substitute "$encrypted$" for actual password on logging config test
see: #6780
This commit is contained in:
@@ -161,6 +161,12 @@ class SettingLoggingTest(GenericAPIView):
|
||||
obj = type('Settings', (object,), defaults)()
|
||||
serializer = self.get_serializer(obj, data=request.data)
|
||||
serializer.is_valid(raise_exception=True)
|
||||
|
||||
if request.data.get('LOG_AGGREGATOR_PASSWORD', '').startswith('$encrypted$'):
|
||||
serializer.validated_data['LOG_AGGREGATOR_PASSWORD'] = getattr(
|
||||
settings, 'LOG_AGGREGATOR_PASSWORD', ''
|
||||
)
|
||||
|
||||
try:
|
||||
class MockSettings:
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user