mirror of
https://github.com/hashicorp/vault.git
synced 2025-12-01 07:31:32 +01:00
* Create app-footer component with tests * glimmerize vault route + controller * Add dev mode badge to new footer * Fix version on dashboard * update app-footer tests * update version title component * Handle case for chroot namespace fail on health check * cleanup * fix ent tests * add missing headers * extra version fetch on login success, clear version on logout and seal * Add coverage for clearing version on seal * rename isOSS to isCommunity * remove is-version helper * test version in footer on unseal flow * fix enterprise test * VAULT-21399 test coverage * VAULT-21400 test coverage
40 lines
1.2 KiB
JavaScript
40 lines
1.2 KiB
JavaScript
/**
|
|
* Copyright (c) HashiCorp, Inc.
|
|
* SPDX-License-Identifier: BUSL-1.1
|
|
*/
|
|
|
|
import { module, test } from 'qunit';
|
|
import { setupTest } from 'ember-qunit';
|
|
|
|
module('Unit | Service | version', function (hooks) {
|
|
setupTest(hooks);
|
|
|
|
test('setting type computes isCommunity properly', function (assert) {
|
|
const service = this.owner.lookup('service:version');
|
|
service.type = 'community';
|
|
assert.true(service.isCommunity);
|
|
assert.false(service.isEnterprise);
|
|
});
|
|
|
|
test('setting type computes isEnterprise properly', function (assert) {
|
|
const service = this.owner.lookup('service:version');
|
|
service.type = 'enterprise';
|
|
assert.false(service.isCommunity);
|
|
assert.true(service.isEnterprise);
|
|
});
|
|
|
|
test('hasPerfReplication', function (assert) {
|
|
const service = this.owner.lookup('service:version');
|
|
assert.false(service.hasPerfReplication);
|
|
service.features = ['Performance Replication'];
|
|
assert.true(service.hasPerfReplication);
|
|
});
|
|
|
|
test('hasDRReplication', function (assert) {
|
|
const service = this.owner.lookup('service:version');
|
|
assert.false(service.hasDRReplication);
|
|
service.features = ['DR Replication'];
|
|
assert.true(service.hasDRReplication);
|
|
});
|
|
});
|