UI: PKI OpenAPI attributes update (#27386)

This commit is contained in:
Chelsea Shaw 2024-06-06 14:58:23 -05:00 committed by GitHub
parent 9f5371d3bc
commit 1a9c01ba94
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 34 additions and 19 deletions

View file

@ -76,7 +76,15 @@ function secretEngineHelper(test, secretEngine) {
const helpUrl = model.getHelpUrl(this.backend);
const result = await this.pathHelp.getProps(helpUrl, this.backend);
const expected = engineData[modelName];
assert.deepEqual(result, expected, `getProps returns expected attributes for ${modelName}`);
// Expected values should be updated to match "actual" (result)
assert.deepEqual(
Object.keys(result),
Object.keys(expected),
`getProps returns expected attributes for ${modelName}`
);
Object.keys(expected).forEach((attrName) => {
assert.deepEqual(result[attrName], expected[attrName], `${attrName} attribute details match`);
});
});
});
}
@ -94,7 +102,14 @@ function authEngineHelper(test, authBackend) {
const helpUrl = model.getHelpUrl(this.mount);
const result = await this.pathHelp.getProps(helpUrl, this.mount);
const expected = authData[itemName];
assert.deepEqual(result, expected, `getProps returns expected attributes for ${itemName}`);
assert.deepEqual(
Object.keys(result),
Object.keys(expected),
`getProps returns expected attributes for ${itemName}`
);
Object.keys(expected).forEach((attrName) => {
assert.propEqual(result[attrName], expected[attrName], `${attrName} attribute details match`);
});
});
} else {
test.skip(`generated-${itemName}-${authBackend} model`, async function (assert) {

View file

@ -594,6 +594,14 @@ const pki = {
label: 'DNS/Email Subject Alternative Names (SANs)',
type: 'string',
},
certMetadata: {
editType: 'string',
fieldGroup: 'default',
helpText:
"User supplied metadata to store associated with this certificate's serial number, base64 encoded",
label: 'Certificate Metadata',
type: 'string',
},
commonName: {
editType: 'string',
helpText:
@ -631,14 +639,6 @@ const pki = {
fieldGroup: 'default',
type: 'string',
},
metadata: {
editType: 'string',
fieldGroup: 'default',
helpText:
"User supplied metadata to store associated with this certificate's serial number, base64 encoded",
label: 'Metadata',
type: 'string',
},
notAfter: {
editType: 'string',
helpText:
@ -714,6 +714,14 @@ const pki = {
label: 'DNS/Email Subject Alternative Names (SANs)',
type: 'string',
},
certMetadata: {
editType: 'string',
fieldGroup: 'default',
helpText:
"User supplied metadata to store associated with this certificate's serial number, base64 encoded",
label: 'Certificate Metadata',
type: 'string',
},
commonName: {
editType: 'string',
helpText:
@ -757,14 +765,6 @@ const pki = {
fieldGroup: 'default',
type: 'string',
},
metadata: {
editType: 'string',
fieldGroup: 'default',
helpText:
"User supplied metadata to store associated with this certificate's serial number, base64 encoded",
label: 'Metadata',
type: 'string',
},
notAfter: {
editType: 'string',
helpText:
@ -1071,7 +1071,7 @@ const pki = {
noStoreMetadata: {
editType: 'boolean',
helpText:
'If set, if a client attempts to issue or sign a certificate with attached metadata to store, the issuance / signing instead fails.',
'If set, if a client attempts to issue or sign a certificate with attached cert_metadata to store, the issuance / signing instead fails.',
fieldGroup: 'default',
type: 'boolean',
},