mirror of
https://github.com/hashicorp/vault.git
synced 2026-02-03 20:40:45 -05:00
Namespace banner bug Secrets Sync (#26790)
* replace transitionTo with router.refresh * cleanup * changelog * nice test catch * words are hard
This commit is contained in:
parent
6d0e4f654e
commit
77d10891b3
3 changed files with 7 additions and 3 deletions
3
changelog/26790.txt
Normal file
3
changelog/26790.txt
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
```release-note:bug
|
||||
ui: Refresh model within a namespace on the Secrets Sync overview page.
|
||||
```
|
||||
|
|
@ -75,7 +75,8 @@ export default class SyncSecretsDestinationsPageComponent extends Component<Args
|
|||
yield this.store
|
||||
.adapterFor('application')
|
||||
.ajax('/v1/sys/activation-flags/secrets-sync/activate', 'POST', { namespace: null });
|
||||
this.router.transitionTo('vault.cluster.sync.secrets.overview');
|
||||
// must refresh and not transition because transition does not refresh the model from within a namespace
|
||||
yield this.router.refresh();
|
||||
} catch (error) {
|
||||
this.error = errorMessage(error);
|
||||
this.flashMessages.danger(`Error enabling feature \n ${errorMessage(error)}`);
|
||||
|
|
|
|||
|
|
@ -148,8 +148,8 @@ module('Acceptance | sync | overview', function (hooks) {
|
|||
});
|
||||
|
||||
test('it should make activation-flag requests to correct namespace', async function (assert) {
|
||||
assert.expect(3);
|
||||
|
||||
assert.expect(4);
|
||||
// should call GET activation-flags twice because we need an updated response after activating the feature
|
||||
this.server.get('/sys/activation-flags', (_, req) => {
|
||||
assert.deepEqual(req.requestHeaders, {}, 'Request is unauthenticated and in root namespace');
|
||||
return {
|
||||
|
|
|
|||
Loading…
Reference in a new issue