Skip to content

Commit

Permalink
clean up clean up everybody lets clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
Monkeychip committed Dec 10, 2024
1 parent 4549c1c commit 3ad60e3
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 12 deletions.
4 changes: 1 addition & 3 deletions ui/app/components/secret-engine/configuration-details.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@
@label={{or attr.options.label (to-label attr.name)}}
@value={{get configModel (or attr.options.fieldValue attr.name)}}
>
{{#if (or attr.options.sensitive (eq attr.name "publicKey"))}}
<MaskedInput @value={{get configModel attr.name}} @name={{attr.name}} @displayOnly={{true}} @allowCopy={{true}} />
{{/if}}
<MaskedInput @value={{get configModel attr.name}} @name={{attr.name}} @displayOnly={{true}} @allowCopy={{true}} />
</InfoTableRow>
{{else}}
<InfoTableRow
Expand Down
2 changes: 1 addition & 1 deletion ui/app/helpers/mountable-secret-engines.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ export function mountableEngines() {
// secret engines that have not other views than the mount view and mount details view
export const UNSUPPORTED_ENGINES = ['alicloud', 'consul', 'gcp', 'gcpkms', 'nomad', 'rabbitmq', 'totp'];

export function unSupportedEngines() {
export function unsupportedEngines() {
return UNSUPPORTED_ENGINES.slice();
}

Expand Down
4 changes: 2 additions & 2 deletions ui/app/models/azure/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ export default class AzureConfig extends Model {
}

get isConfigured() {
const params = this.displayAttrs.map((attr) => attr.name);
return params.some((param) => this[param]);
// if every value is falsy, this engine has not been configured yet
return !this.configurableParams.every((param) => !this[param]);
}

// formFields are iterated through to generate the edit/create view
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ module('Acceptance | Azure | configuration', function (hooks) {
await visit('/vault/settings/mount-secret-backend');
await mountBackend('azure', path);

assert.strictEqual(
currentURL(),
`/vault/secrets/${path}/configuration`,
'navigated to configuration view'
);
assert.dom(GENERAL.emptyStateTitle).hasText('Azure not configured');
assert.dom(GENERAL.emptyStateActions).doesNotContainText('Configure Azure');
// cleanup
Expand All @@ -56,11 +61,6 @@ module('Acceptance | Azure | configuration', function (hooks) {
const path = `azure-${this.uid}`;
await enablePage.enable('azure', path);
assert.dom(SES.configure).doesNotExist('Configure button does not exist.');
assert.strictEqual(
currentURL(),
`/vault/secrets/${path}/configuration`,
'navigated to configuration view'
);
// cleanup
await runCmd(`delete sys/mounts/${path}`);
});
Expand All @@ -82,7 +82,6 @@ module('Acceptance | Azure | configuration', function (hooks) {
});
await enablePage.enable(type, path);
for (const key of expectedConfigKeys('azure-wif')) {
assert.dom(GENERAL.infoRowLabel(key)).exists(`${key} on the ${type} config details exists.`);
const responseKeyAndValue = expectedValueOfConfigKeys(type, key);
assert
.dom(GENERAL.infoRowValue(key))
Expand Down

0 comments on commit 3ad60e3

Please sign in to comment.