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

[tests-only][full-ci] adding test for creating auth-app token using user-id #10987

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nirajacharya2
Copy link
Contributor

@nirajacharya2 nirajacharya2 commented Feb 11, 2025

Description

This PR adds test for creating auth-app token using user-id

Related Issue

Motivation and Context

How Has This Been Tested?

  • test environment:
  • test case 1:
  • test case 2:
  • ...

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

@nirajacharya2 nirajacharya2 force-pushed the create-auth-app-usr-id branch 2 times, most recently from 348c7f3 to c511739 Compare February 26, 2025 06:20
Comment on lines +260 to +272
Given the config "AUTH_APP_ENABLE_IMPERSONATION" has been set to "true"
And user "Brian" has been created with default attributes
When user "Brian" creates app token with user-id for user "Alice" with expiration time "72h" using the auth-app API
Then the HTTP status code should be "403"

@issue-11063
Scenario: non-admin user tries to creates auth-app token with user-id for an another user without impersonation enabled
Copy link
Member

Choose a reason for hiding this comment

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

same needs to be done for username as well. check if they exist or not.
also please update all of them in the QA ticket.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Member

@saw-jan saw-jan Feb 26, 2025

Choose a reason for hiding this comment

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

just make sure the similar test scenarios exist while using username as well

@nirajacharya2 nirajacharya2 force-pushed the create-auth-app-usr-id branch 2 times, most recently from 3397edf to d6c32e8 Compare February 27, 2025 09:38
@nirajacharya2 nirajacharya2 force-pushed the create-auth-app-usr-id branch 2 times, most recently from 3d63142 to 5a9f79f Compare February 28, 2025 11:04
@nirajacharya2 nirajacharya2 force-pushed the create-auth-app-usr-id branch from 5a9f79f to dccdbf7 Compare March 4, 2025 03:38
Copy link

sonarqubecloud bot commented Mar 4, 2025

Copy link
Contributor

@amrita-shrestha amrita-shrestha left a comment

Choose a reason for hiding this comment

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

lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants