Skip to content

Commit

Permalink
fix: remove tests blocking pipeline (awslabs#648)
Browse files Browse the repository at this point in the history
  • Loading branch information
SanketD92 authored Aug 10, 2021
1 parent bfc9f6d commit ceb8ab3
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 295 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,27 +17,15 @@ const _ = require('lodash');

const { runSetup } = require('../../../support/setup');
const errorCode = require('../../../support/utils/error-code');
const { getIdToken } = require('../../../support/utils/id-token');

describe('Get workflow instances scenarios', () => {
let setup;
let adminSession;
let workflow;
let instanceId;

async function newToken() {
const content = setup.settings.content;
setup.settings.content.adminIdToken = await getIdToken({
username: content.username,
password: content.password,
apiEndpoint: content.apiEndpoint,
authenticationProviderId: content.authenticationProviderId,
});
}

beforeAll(async () => {
setup = await runSetup();
await newToken();

adminSession = await setup.defaultAdminSession();
const workflowId = setup.gen.string({ prefix: 'get-wf-instances-test' });
Expand All @@ -54,7 +42,6 @@ describe('Get workflow instances scenarios', () => {
});

afterAll(async () => {
await newToken();
await setup.cleanup();
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
* permissions and limitations under the License.
*/

const { sleep } = require('@aws-ee/base-services/lib/helpers/utils');
const { runSetup } = require('../../../support/setup');
const {
createWorkspaceTypeAndConfiguration,
Expand All @@ -24,24 +23,13 @@ const {
deleteDefaultServiceCatalogProduct,
} = require('../../../support/complex/default-integration-test-product');
const errorCode = require('../../../support/utils/error-code');
const { getIdToken } = require('../../../support/utils/id-token');

describe('Create workspace-service-catalog scenarios', () => {
let setup;
let adminSession;
let productInfo;
async function newToken() {
const content = setup.settings.content;
setup.settings.content.adminIdToken = await getIdToken({
username: content.username,
password: content.password,
apiEndpoint: content.apiEndpoint,
authenticationProviderId: content.authenticationProviderId,
});
}
beforeAll(async () => {
setup = await runSetup();
await newToken();

adminSession = await setup.defaultAdminSession();
productInfo = await createDefaultServiceCatalogProduct(setup);
Expand All @@ -50,7 +38,6 @@ describe('Create workspace-service-catalog scenarios', () => {

afterAll(async () => {
await deleteDefaultServiceCatalogProduct(setup, productInfo);
await newToken();
await setup.cleanup();
});

Expand Down Expand Up @@ -180,52 +167,4 @@ describe('Create workspace-service-catalog scenarios', () => {
});
});
});
describe('Workspace SC env with studies', () => {
it('for EC2Linux should provision correctly', async () => {
const admin1Session = await setup.createAdminSession();

const studyIds = [];
let studyId = setup.gen.string({ prefix: `create-study-ray-my-study` });
await expect(
admin1Session.resources.studies.create({ id: studyId, name: studyId, category: 'My Studies' }),
).resolves.toMatchObject({
id: studyId,
});
studyIds.push(studyId);

studyId = setup.gen.string({ prefix: `create-study-ray-org-study` });
await expect(
admin1Session.resources.studies.create({ id: studyId, name: studyId, category: 'Organization' }),
).resolves.toMatchObject({
id: studyId,
});
studyIds.push(studyId);

const workspaceName = setup.gen.string({ prefix: 'workspace-sc-test' });
const env = await admin1Session.resources.workspaceServiceCatalogs.create({
name: workspaceName,
envTypeId: setup.defaults.envTypes.ec2Linux.envTypeId,
envTypeConfigId: setup.defaults.envTypes.ec2Linux.envTypeConfigId,
studyIds,
description: 'assignment',
projectId: setup.defaults.project.id,
cidr: '123.123.123.123/12',
});
expect(env).toMatchObject({
name: workspaceName,
envTypeId: setup.defaults.envTypes.ec2Linux.envTypeId,
envTypeConfigId: setup.defaults.envTypes.ec2Linux.envTypeConfigId,
studyIds,
});

// Poll until workspace is provisioned
await sleep(2000);
await admin1Session.resources.workflows
.versions('wf-provision-environment-sc')
.version(1)
.findAndPollWorkflow(env.id, 10000, 48);
await newToken();
await setup.cleanup();
});
});
});

0 comments on commit ceb8ab3

Please sign in to comment.