chore: 🤖 explicitly set secrets to null when missing

This commit is contained in:
Randall Morey committed 2022-02-14 11:50:39 -05:00
1 parent ac215e200f
commit 93fd52954f
2 files changed
+9 -1

No files matched your search

+1 -1
View File
@@ -264,7 +264,7 @@ export default class ApplicationSerializer extends RESTSerializer {
options: { isNestedSecret },
} = attribute;
const value = hash.secrets?.[name];
if (isNestedSecret) hash[name] = value;
if (isNestedSecret) hash[name] = value || null;
});
return hash;
}
@@ -190,6 +190,10 @@ module('Unit | Serializer | host catalog', function (hooks) {
description: 'Test description',
authorized_actions: ['no-op'],
type: 'static',
access_key_id: null,
secret_access_key: null,
secret_id: null,
secret_value: null,
},
relationships: {},
},
@@ -245,6 +249,8 @@ module('Unit | Serializer | host catalog', function (hooks) {
region: 'Illinois',
access_key_id: '0xF3B0a6f8',
secret_access_key: 'zq{2:IVc8@W^',
secret_id: null,
secret_value: null,
},
relationships: {},
},
@@ -304,6 +310,8 @@ module('Unit | Serializer | host catalog', function (hooks) {
client_id: 'client',
tenant_id: 'tenant',
subscription_id: 'subscription',
access_key_id: null,
secret_access_key: null,
},
relationships: {},
},