Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds node sdk prefix and unique resource names in tests
Browse files Browse the repository at this point in the history
vijetmahabaleshwar-okta committed Jul 20, 2020
1 parent 19133fa commit d7dbe96
Showing 17 changed files with 44 additions and 24 deletions.
3 changes: 2 additions & 1 deletion test/it/application-get-group-assignment.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const expect = require('chai').expect;
const faker = require('faker');

const okta = require('../../');
const utils = require('../utils');
@@ -23,7 +24,7 @@ describe('Application.getApplicationGroupAssignment()', () => {

const group = {
profile: {
name: 'Application get group'
name: `node-sdk: Application get Group ${faker.random.word()}`.substring(0, 49)
}
};

3 changes: 2 additions & 1 deletion test/it/application-group-assignment-delete.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const expect = require('chai').expect;
const faker = require('faker');

const okta = require('../../');
const utils = require('../utils');
@@ -23,7 +24,7 @@ describe('ApplicationGroupAssignment.delete(:appId)', () => {

const group = {
profile: {
name: 'Application delete group'
name: `node-sdk: Application delete Group ${faker.random.word()}`.substring(0, 49)
}
};

3 changes: 2 additions & 1 deletion test/it/application-list-group-assignments.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const expect = require('chai').expect;
const faker = require('faker');

const okta = require('../../');
const utils = require('../utils');
@@ -23,7 +24,7 @@ describe('Application.listGroupAssignments()', () => {

const group = {
profile: {
name: 'Application list group'
name: `node-sdk: Application list Group ${faker.random.word()}`.substring(0, 49)
}
};

3 changes: 2 additions & 1 deletion test/it/application-update-group-assignment.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const expect = require('chai').expect;
const faker = require('faker');

const okta = require('../../');
const utils = require('../utils');
@@ -23,7 +24,7 @@ describe('Application.createApplicationGroupAssignment()', () => {

const group = {
profile: {
name: 'Application assign group'
name: `node-sdk: Application assign Group ${faker.random.word()}`.substring(0, 49)
}
};

12 changes: 6 additions & 6 deletions test/it/client-create-application.js
Original file line number Diff line number Diff line change
@@ -49,7 +49,7 @@ describe('client.createApplication()', () => {
it('should allow me to create a basic authentication application', async () => {
const application = {
name: 'template_basic_auth',
label: `Sample Basic Auth App - ${faker.random.word()}`,
label: `node-sdk: Sample Basic Auth App - ${faker.random.word()}`.substring(0, 49),
signOnMode: 'BASIC_AUTH',
settings: {
app: {
@@ -86,7 +86,7 @@ describe('client.createApplication()', () => {
it('should allow me to create a SWA plugin application', async () => {
const application = {
name: 'template_swa',
label: `Sample Plugin App - ${faker.random.word()}`,
label: `node-sdk: Sample Plugin App - ${faker.random.word()}`.substring(0, 49),
signOnMode: 'BROWSER_PLUGIN',
settings: {
app: {
@@ -128,7 +128,7 @@ describe('client.createApplication()', () => {
it('should allow me to create a 3-field SWA plugin application', async () => {
const application = {
name: 'template_swa3field',
label: `Sample Plugin App 3-field - ${faker.random.word()}`,
label: `node-sdk: Sample Plugin App 3-field - ${faker.random.word()}`.substring(0, 49),
signOnMode: 'BROWSER_PLUGIN',
settings: {
app: {
@@ -174,7 +174,7 @@ describe('client.createApplication()', () => {
it('should allow me to create a SWA no-plugin application', async () => {
const application = {
name: 'template_sps',
label: `Example SWA App - ${faker.random.word()}`,
label: `node-sdk: Example SWA App - ${faker.random.word()}`.substring(0, 49),
signOnMode: 'SECURE_PASSWORD_STORE',
settings: {
app: {
@@ -351,7 +351,7 @@ describe('client.createApplication()', () => {
it.skip('should allow me to create a custom WS-Fed application', async () => {
const application = {
name: 'template_wsfed',
label: `Sample WS-Fed App - ${faker.random.word()}`,
label: `node-sdk: Sample WS-Fed App - ${faker.random.word()}`.substring(0, 49),
signOnMode: 'WS_FEDERATION',
settings: {
app: {
@@ -407,7 +407,7 @@ describe('client.createApplication()', () => {
it('should allow me to create a OIDC client application', async () => {
const application = {
name: 'oidc_client',
label: `Sample Client - ${faker.random.word()}`,
label: `node-sdk: Sample Client - ${faker.random.word()}`.substring(0, 49),
signOnMode: 'OPENID_CONNECT',
credentials: {
oauthClient: {
3 changes: 2 additions & 1 deletion test/it/client-delete-group-application-assignment.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const expect = require('chai').expect;
const faker = require('faker');

const okta = require('../../');
const utils = require('../utils');
@@ -22,7 +23,7 @@ describe('client.deleteApplicationGroupAssignment()', () => {

const group = {
profile: {
name: 'Application delete assignment group'
name: `node-sdk: Application delete assignment group ${faker.random.word()}`.substring(0, 49)
}
};

3 changes: 2 additions & 1 deletion test/it/client-get-group-application-assignment.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const expect = require('chai').expect;
const faker = require('faker');

const okta = require('../../');
const models = require('../../src/models');
@@ -23,7 +24,7 @@ describe('client.getApplicationGroupAssignment()', () => {

const group = {
profile: {
name: 'Application client get group'
name: `node-sdk: Application client get group ${faker.random.word()}`.substring(0, 49)
}
};

3 changes: 2 additions & 1 deletion test/it/client-list-application-group-assignment.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const expect = require('chai').expect;
const faker = require('faker');

const okta = require('../../');
const models = require('../../src/models');
@@ -23,7 +24,7 @@ describe('client.listApplicationGroupAssignments()', () => {

const group = {
profile: {
name: 'Application list group'
name: `node-sdk: Application list group ${faker.random.word()}`.substring(0, 49)
}
};

3 changes: 2 additions & 1 deletion test/it/client-update-group-application-assignment.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const expect = require('chai').expect;
const faker = require('faker');

const okta = require('../../');
const models = require('../../src/models');
@@ -23,7 +24,7 @@ describe('client.createApplicationGroupAssignment()', () => {

const group = {
profile: {
name: 'Application create assignment group'
name: `node-sdk: Application create assignment group ${faker.random.word()}`.substring(0, 49)
}
};

4 changes: 3 additions & 1 deletion test/it/group-get.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const faker = require('faker');

const utils = require('../utils');
const okta = require('../../');
const expect = require('chai').expect;
@@ -18,7 +20,7 @@ describe('Group API tests', () => {
// 1. Create a new group
const newGroup = {
profile: {
name: 'Get Test Group'
name: `node-sdk: Get test Group ${faker.random.word()}`.substring(0, 49)
}
};

4 changes: 3 additions & 1 deletion test/it/group-list.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const faker = require('faker');

const expect = require('chai').expect;
const utils = require('../utils');
const okta = require('../../');
@@ -18,7 +20,7 @@ describe('Group API tests', () => {
// 1. Create a new group
const newGroup = {
profile: {
name: 'List Test Group'
name: `node-sdk: List test Group ${faker.random.word()}`.substring(0, 49)
}
};

4 changes: 2 additions & 2 deletions test/it/group-rule-operations.js
Original file line number Diff line number Diff line change
@@ -27,7 +27,7 @@ describe('Group-Rule API tests', () => {

const newGroup = {
profile: {
name: 'Group-Rule API Test Group'
name: `node-sdk: Group-Rule API Test Group ${faker.random.word()}`.substring(0, 49),
}
};

@@ -41,7 +41,7 @@ describe('Group-Rule API tests', () => {
// 2. Create a group rule and verify rule executes
const rule = {
type: 'group_rule',
name: faker.random.word(),
name: faker.random.word().substring(0, 49),
conditions: {
people: {
users: {
4 changes: 3 additions & 1 deletion test/it/group-search.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const faker = require('faker');

const expect = require('chai').expect;
const utils = require('../utils');
const okta = require('../../');
@@ -18,7 +20,7 @@ describe('Group API tests', () => {
// 1. Create a new group
const newGroup = {
profile: {
name: 'Search Test Group'
name: `node-sdk: Search test Group ${faker.random.word()}`.substring(0, 49)
}
};

4 changes: 3 additions & 1 deletion test/it/group-update.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const faker = require('faker');

const utils = require('../utils');
const okta = require('../../');
let orgUrl = process.env.OKTA_CLIENT_ORGURL;
@@ -17,7 +19,7 @@ describe('Group API tests', () => {
// 1. Create a new group
let newGroup = {
profile: {
name: 'Update Test Group'
name: `node-sdk: Update test Group ${faker.random.word()}`.substring(0, 49)
}
};

4 changes: 3 additions & 1 deletion test/it/group-user-operations.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const faker = require('faker');

const expect = require('chai').expect;
const utils = require('../utils');
const okta = require('../../');
@@ -26,7 +28,7 @@ describe('Group-Member API Tests', () => {

const newGroup = {
profile: {
name: 'Group-Member API Test Group'
name: `node-sdk: Group-Member API Test Group ${faker.random.word()}`.substring(0, 49)
}
};

2 changes: 1 addition & 1 deletion test/it/policies.js
Original file line number Diff line number Diff line change
@@ -58,7 +58,7 @@ describe('Policy Scenarios', () => {
// 1. Create a new group
const newGroup = {
profile: {
name: `Get Test Group ${faker.random.word()}`
name: `Get Test Group ${faker.random.word()}`.substring(0, 49)
}
};

6 changes: 4 additions & 2 deletions test/it/user-group-target-role.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const faker = require('faker');

const expect = require('chai').expect;
const utils = require('../utils');
const okta = require('../../');
@@ -26,7 +28,7 @@ describe('User Role API Tests', () => {

const newGroup = {
profile: {
name: 'Group-Target Test Group'
name: `node-sdk: Group Target Test Group ${faker.random.word()}`.substring(0, 49)
}
};

@@ -52,7 +54,7 @@ describe('User Role API Tests', () => {
// To get around this, create a new group and add this group target to user admin role
const group = {
profile: {
name: 'Group-Target User Admin Test Group'
name: `node-sdk: Group-Target User Admin Test Group ${faker.random.word()}`.substring(0, 49)
}
};

0 comments on commit d7dbe96

Please sign in to comment.