Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration tests for linked object api okta 288651 #152

Merged
merged 3 commits into from
May 21, 2020

Conversation

shuowu
Copy link
Contributor

@shuowu shuowu commented May 20, 2020

Paths covered in this PR:

  • /api/v1/meta/schemas/user/linkedObjects
  • /api/v1/meta/schemas/user/linkedObjects/${linkedObjectName}
  • /api/v1/users/${userId}/linkedObjects/${relationshipName}
  • /api/v1/users/${associatedUserId}/linkedObjects/${primaryRelationshipName}/${primaryUserId}

@shuowu shuowu changed the title Sw it for linked object api okta 288651 it for linked object api okta 288651 May 20, 2020
@shuowu shuowu changed the title it for linked object api okta 288651 Integration tests for linked object api okta 288651 May 20, 2020
@shuowu shuowu requested review from robertjd and swiftone May 20, 2020 15:45
Copy link
Contributor

@robertjd robertjd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some non-blocking suggestions, approved otherwise

expect(linkedObject).to.be.instanceOf(models.LinkedObject);
});

it('should match name from request', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could these two it() be combined into one?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Combined

expect(linkedObjectFromGet.primary.name).to.equal(mockLinkedObject.primary.name);
});

it('should return LinkedObject by associated name', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same question, can these it statements be combined?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These two test cases match two different scenarios from D.O.C, I would prefer keeping them separate instead of adding comments. The tradeoff is it will take the total running time a bit longer...

@shuowu-okta shuowu-okta force-pushed the sw-it-for-linked-object-api-OKTA-288651 branch from 52be052 to a01b6b5 Compare May 21, 2020 13:33
@shuowu shuowu merged commit 175aa43 into openapi-update May 21, 2020
shuowu-okta pushed a commit that referenced this pull request Jul 6, 2020
* updates integration tests for new openapi

* updates licensing banners

* updated generated code

* build from even updateder openapi

* chore: sync with openapi master

* fix: reference model data  generation (#149)

* chore: sync with openapi master

* chore: sync with openapi master

* chore: sync with openapi master

* add integration tests for idp okta 288649 (#150)

* test: add idp-crud it

* test: it for idp-user operations

* test: refactor idp-crub to use model methods

* refactor: remove commented code in idp-user

* test: it for idp-lifecycle

* test: add list social tokens test for idp-user

* test: it for idp-credential

* fix: remove only and counter

* test: add more assertions for key test suite

* test: add it for user type api - OKTA-288654 (#153)

* Integration tests for linked object api okta 288651 (#152)

* test: add it for group api - OKTA-288652 (#154)

* test: add integration tests for sms template - OKTA-288648 (#145)

* test: add integration tests for sms template - OKTA-288648

* test: add comment and change test file name to map endpoints url

* test: fix async clean & move mock data to mocks folder

* chore(travis): run build before test

* Revert "chore(travis): run build before test"

This reverts commit b256985.

* integration tests for policy api okta 288650 (#151)

* test: it for policy-crud

* test: it for policy-lifecycle

* test: it for policy-rule

* test: add it for user api - OKTA-288653 (#155)

* test: it for user-linked-object

* test: it for applink

* test: it for user-client

* test: it for user-idp

* test: add and merge user lifecycle tests into user-lifecyle

* test: add missing lifecycle tests into user-lifecyle

* fix: idp test name

* test: add it for user grant

* fix: add assert to check if returned linked idp match with created idp

* fix: support x-okta-multi-operation - OKTA-289242 (#156)

* chore: sync with latest openapi master

* chore: sync with openapi master

* chore: sync with openapi master

* fix: pass correct content type for publish csr - OKTA-288634 (#157)

* fix: pass correct content type for publish csr - OKTA-288634

* test: add integration tests for event hook apis - OKTA-288645 (#164)

* test: add integration tests for event hook apis - OKTA-288645

* test: add doc link in comment

* test: add ITs for auth server - OKTA-288644 (#163)

* test: add it for auth server

* fix: template generator to pass body to collection request

* test: enable skipped factor test - OKTA-288643 (#162)

* test: skip csr test suites (#159)

* test: add it for application - OKTA-288642 (#161)

* chore: sync with latest openapi master

* test: add integration tests for feature api - OKTA-288647 (#166)

* test: add integration tests for inline hook api - OKTA-288646 (#165)

* chore: sync with latest openapi

* test: add it for admin role - OKTA-288641 (#158)

* test: add it for admin role - OKTA-288641

* test: update test with openapi updates

* chore: sync with latest openapi master

* chore: drop support for node8 - OKTA-257574 (#167)

* doc: add changelog - OKTA-305277 (#169)

* doc: add changelog

* doc: changelog fix

* doc: update readme with changed method name

* test: re-enable skipped key store tests

* test: refactor mock data with faker (#170)

* chore: sync with openapi master

* chore: sync with openapi

* chore: rename case sensitive files

* test: fix link object fake names

* test: use different user profiles on client-list-users test

* chore: remove generated files before build (#172)

* chore: update openapi version to latest in npm

* doc: add migration guide

Co-authored-by: Shuo Wu <wushuo2010@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants