UI: Restore Connect proxy tag tests (#6275)
These are the tests skipped in #6271.
This commit is contained in:
parent
f152738545
commit
dc43dbdad2
|
@ -1,7 +1,7 @@
|
|||
import { run } from '@ember/runloop';
|
||||
import { currentURL } from '@ember/test-helpers';
|
||||
import { assign } from '@ember/polyfills';
|
||||
import { module, skip, test } from 'qunit';
|
||||
import { module, test } from 'qunit';
|
||||
import { setupApplicationTest } from 'ember-qunit';
|
||||
import setupMirage from 'ember-cli-mirage/test-support/setup-mirage';
|
||||
import Allocation from 'nomad-ui/tests/pages/allocations/detail';
|
||||
|
@ -140,16 +140,24 @@ module('Acceptance | allocation detail', function(hooks) {
|
|||
assert.ok(Allocation.firstUnhealthyTask().hasUnhealthyDriver, 'Warning is shown');
|
||||
});
|
||||
|
||||
skip('proxy task has a proxy tag', async function(assert) {
|
||||
allocation = server.create('allocation', 'withTaskWithPorts', 'withAllocatedResources', {
|
||||
clientStatus: 'running',
|
||||
test('proxy task has a proxy tag', async function(assert) {
|
||||
// Must create a new job as existing one has loaded and it contains the tasks
|
||||
job = server.create('job', {
|
||||
groupsCount: 1,
|
||||
withGroupServices: true,
|
||||
createAllocations: false,
|
||||
});
|
||||
|
||||
allocation.task_states.models.forEach(task => {
|
||||
task.kind = 'connect-proxy:task';
|
||||
task.save();
|
||||
allocation = server.create('allocation', 'withTaskWithPorts', 'withAllocatedResources', {
|
||||
clientStatus: 'running',
|
||||
jobId: job.id,
|
||||
});
|
||||
|
||||
const taskState = allocation.task_states.models[0];
|
||||
const task = server.schema.tasks.findBy({ name: taskState.name });
|
||||
task.update('kind', 'connect-proxy:task');
|
||||
task.save();
|
||||
|
||||
await Allocation.visit({ id: allocation.id });
|
||||
|
||||
assert.ok(Allocation.tasks[0].hasProxyTag);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { currentURL } from '@ember/test-helpers';
|
||||
import { module, skip, test } from 'qunit';
|
||||
import { module, test } from 'qunit';
|
||||
import { setupApplicationTest } from 'ember-qunit';
|
||||
import setupMirage from 'ember-cli-mirage/test-support/setup-mirage';
|
||||
import Task from 'nomad-ui/tests/pages/allocations/task/detail';
|
||||
|
@ -317,15 +317,16 @@ module('Acceptance | proxy task detail', function(hooks) {
|
|||
server.create('node');
|
||||
server.create('job', { createAllocations: false });
|
||||
allocation = server.create('allocation', 'withTaskWithPorts', { clientStatus: 'running' });
|
||||
task = allocation.task_states.models[0];
|
||||
|
||||
task.kind = 'connect-proxy:task';
|
||||
const taskState = allocation.task_states.models[0];
|
||||
const task = server.schema.tasks.findBy({ name: taskState.name });
|
||||
task.update('kind', 'connect-proxy:task');
|
||||
task.save();
|
||||
|
||||
await Task.visit({ id: allocation.id, name: task.name });
|
||||
await Task.visit({ id: allocation.id, name: taskState.name });
|
||||
});
|
||||
|
||||
skip('a proxy tag is shown', async function(assert) {
|
||||
test('a proxy tag is shown', async function(assert) {
|
||||
assert.ok(Task.title.proxyTag.isPresent);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue