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

remove nested structure in tests authorization #1350

Merged
merged 5 commits into from
Jul 30, 2024

Conversation

sofyalaski
Copy link
Contributor

@sofyalaski sofyalaski commented Jul 30, 2024

Description

As commented by @sbliven in PR #1286, the extraction of token for each user is implemented within a very nested structure. This PR removes nested structure

Motivation

Improve readability of extraction of authorization token

Changes:

almost all test/*.js

  • test/LoginUtils.js: the first two functions getToken and getIdAndToken are rewritten to return a promise.
  • in the rest of test files the pyramid structure is replaced by async mechanism to retrieve the authorization token

Tests included

  • Included for each change/fix?
  • Passing? (Merge will not be approved unless this is checked)

Documentation

  • swagger documentation updated [required]
  • official documentation updated [nice-to-have]

@sofyalaski sofyalaski mentioned this pull request Jul 30, 2024
2 tasks
@despadam despadam self-requested a review July 30, 2024 11:19
Copy link
Contributor

@Junjiequan Junjiequan left a comment

Choose a reason for hiding this comment

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

Nice cleanup. Just one minor issue I've found

test/DatasetLifecycle.js Outdated Show resolved Hide resolved
Copy link

@despadam despadam left a comment

Choose a reason for hiding this comment

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

Great work, I only left comments for some small details.

test/DerivedDatasetDatablock.js Outdated Show resolved Hide resolved
test/DerivedDatasetOrigDatablock.js Outdated Show resolved Hide resolved
test/RawDatasetDatablock.js Outdated Show resolved Hide resolved
test/RawDatasetOrigDatablock.js Outdated Show resolved Hide resolved
test/UserAuthorization.js Outdated Show resolved Hide resolved
test/Users.js Outdated Show resolved Hide resolved
@despadam despadam merged commit 9153eeb into SciCatProject:master Jul 30, 2024
7 checks passed
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.

3 participants