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

Add test script for authentication #1307

Merged
merged 5 commits into from
Nov 25, 2024

Conversation

khansaad
Copy link
Contributor

@khansaad khansaad commented Oct 1, 2024

Description

This PR adds a new script to test the authentication feature.

Fixes # (1286)

Type of change

  • Bug fix
  • New feature
  • Docs update
  • Breaking change (What changes might users need to make in their application due to this PR?)
  • Requires DB changes

How has this been tested?

Please describe the tests that were run to verify your changes and steps to reproduce. Please specify any test configuration required.

  • New Test X
  • Functional testsuite

Test Configuration

  • Kubernetes clusters tested on: Openshift

Checklist 🎯

  • Followed coding guidelines
  • Comments added
  • Dependent changes merged
  • Documentation updated
  • Tests added or updated

Additional information

Include any additional information such as links, test results, screenshots here

@khansaad khansaad added the test label Oct 1, 2024
@khansaad khansaad added this to the Kruize 0.0.26 Release milestone Oct 1, 2024
@khansaad khansaad self-assigned this Oct 1, 2024
@rbadagandi1 rbadagandi1 requested a review from chandrams October 1, 2024 05:09
@khansaad khansaad marked this pull request as ready for review November 25, 2024 02:04
@@ -182,3 +182,13 @@ Else, you can change the workload name and namespace name in the test to match w

Note: The test will fail if it's run as is if there are no matching workloads that the test looks for. This test result can be ignored in case of a non-gpu workload

### Authentication Test:

Kruize 0.1.1 supports the authentication which provides the user an option to pass authentication details in the yaml for the service they are using.
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be 0.2 instead of 0.1.1. Also describe the scenarios added here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@@ -51,97 +33,149 @@ tokens=(
["invalid"]="random-invalid-token-string"
["empty"]=""
)
# Tests to validate authentication types in Kruize
function authentication_tests() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you share the results run

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
Contributor

Choose a reason for hiding this comment

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

@khansaad - Expired token I think is same as invalid token here, we need to check how to simulate expired token. We cannot do this later.

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, I think it will be good to invoke some code that makes use of the token along with checking the pod log, you can add it as an enhancement to the test.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Created #1386 to track this

Copy link
Contributor

@chandrams chandrams left a comment

Choose a reason for hiding this comment

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

LGTM

@chandrams chandrams merged commit b9e71c4 into kruize:mvp_demo Nov 25, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants