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

Feat: Tests cases for Chaoscenter Rest handler in Chaoscenter #4238

Merged
merged 11 commits into from
Dec 15, 2023

Conversation

Freedisch
Copy link
Contributor

@Freedisch Freedisch commented Oct 20, 2023

Proposed changes

This PR add test cases for Chaoscenter authentication Rest handler

Types of changes

What types of changes does your code introduce to Litmus? Put an x in the boxes that apply

  • New feature (non-breaking change which adds functionality)
  • Bugfix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (if none of the other choices applies)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • I have read the CONTRIBUTING doc
  • I have signed the commit for DCO to be passed.
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works (if appropriate)
  • I have added necessary documentation (if appropriate)

Dependency

  • Please add the links to the dependent PR need to be merged before this (if any).

Special notes for your reviewer:

Signed-off-by: freedisch <freeproduc@gmail.com>
@namkyu1999
Copy link
Member

Can you resolve conflicts?

Signed-off-by: Magnim BATALE <82499435+Freedisch@users.noreply.github.com>
@Freedisch
Copy link
Contributor Author

Can you resolve conflicts?

Done

@Freedisch
Copy link
Contributor Author

image

Copy link
Member

@namkyu1999 namkyu1999 left a comment

Choose a reason for hiding this comment

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

Test failed, Can you check @Freedisch ?
Screenshot 2023-11-30 at 9 16 45 PM

Signed-off-by: freedisch <freeproduc@gmail.com>
@Freedisch
Copy link
Contributor Author

@namkyu1999, I just fixed the falling tests

Copy link
Member

@namkyu1999 namkyu1999 left a comment

Choose a reason for hiding this comment

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

LGTM 🚀 @Freedisch, Can you add more test cases in each unit test? In most unit tests, there is only one test case. Checking code coverage will help you figure out which cases you need to add.

"github.com/stretchr/testify/assert"
)

func TestDexLogin(t *testing.T) {
Copy link
Member

Choose a reason for hiding this comment

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

Can you also add positive case?

Copy link
Member

@vanshBhatia-A4k9 vanshBhatia-A4k9 left a comment

Choose a reason for hiding this comment

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

Thank you for inproving the test suite.
Also please address the review comments left by @namkyu1999

@Freedisch
Copy link
Contributor Author

Thank you for inproving the test suite. Also please address the review comments left by @namkyu1999

Sure I'm working on it

Freedisch and others added 2 commits December 11, 2023 00:53
Signed-off-by: freedisch <freeproduc@gmail.com>
Copy link
Member

@namkyu1999 namkyu1999 left a comment

Choose a reason for hiding this comment

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

Can you check failed cases? I will approve this pr when you fix it 🚀 @Freedisch

Screenshot 2023-12-11 at 4 18 16 PM

Signed-off-by: freedisch <freeproduc@gmail.com>
 into rest_handler_tests

Signed-off-by: freedisch <freeproduc@gmail.com>
@Freedisch
Copy link
Contributor Author

@namkyu1999, I just finished fixing the falling test and added a few ones

Copy link
Member

@namkyu1999 namkyu1999 left a comment

Choose a reason for hiding this comment

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

LGTM🚀

@Saranya-jena Saranya-jena merged commit faa3627 into litmuschaos:master Dec 15, 2023
15 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/unit-test LFX-MENTORSHIP Linux Foundation Mentor ship Issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants