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

test: add some extra tests for creating datasets including pid with right access groups #910

Merged
merged 9 commits into from
Nov 28, 2023

Conversation

martin-trajanovski
Copy link
Collaborator

@martin-trajanovski martin-trajanovski commented Nov 23, 2023

Description

This PR aims to add the missing API tests for dataset authorization.

ADMIN GROUPS:

  • admin user create valid dataset with PID should success
  • admin user create invalid dataset with pid should fail
  • admin user create valid dataset without PID should success
  • admin user create invalid dataset without pid should fail

CREATE_DATASET_GROUPS:

  • create dataset groups user create valid dataset with PID should success
  • create dataset groups user create invalid dataset with PID should fail
  • create dataset groups user create valid dataset without PID should success
  • create dataset groups user create invalid dataset without PID should fail

CREATE_DATASET_WITH_PID_GROUPS:

  • create dataset with pid groups user create valid dataset with PID should success
  • create dataset with pid groups user create invalid dataset with PID should fail
  • create dataset with pid groups user create valid dataset without PID should fail
  • create dataset with pid groups user create invalid dataset without PID should fail

CREATE_DATASET_PRIVILEGED_GROUPS:

  • create dataset privileged groups user create valid dataset with PID should success
  • create dataset privileged groups user create invalid dataset with PID should fail
  • create dataset privileged groups user create valid dataset without PID should success
  • create dataset privileged groups user create invalid dataset without PID should fail

Motivation

Tests for different dataset creation groups were missing.

Fixes:

Changes:

  • Changes are only in adding more unit tests that cover dataset authorization and creation functionalities

Tests included/Docs Updated?

  • Included for each change/fix?
  • Passing? (Merge will not be approved unless this is checked)
  • Docs updated?
  • New packages used/requires npm install?
  • Toggle added for new features?

@martin-trajanovski martin-trajanovski changed the title test: add some extra tests for creating datasets with right access gr… test: add some extra tests for creating datasets with right access groups Nov 23, 2023
@martin-trajanovski martin-trajanovski changed the title test: add some extra tests for creating datasets with right access groups test: add some extra tests for creating datasets including pid with right access groups Nov 23, 2023
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.

I think there's room for test accuracy improvement with small changes, looks good otherwise

test/DatasetAuthorization.js Outdated Show resolved Hide resolved
test/DatasetAuthorization.js Outdated Show resolved Hide resolved
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.

Looks good to me

@nitrosx nitrosx merged commit 40c5676 into master Nov 28, 2023
7 checks passed
@nitrosx nitrosx deleted the SWAP-3611-add-dataset-creation-with-pid-tests branch November 28, 2023 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants