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

chore: Tests for NewReloginCommand #14186

Merged
merged 2 commits into from
Jun 26, 2023

Conversation

zhaque44
Copy link
Contributor

We are continuing the effort to increase test coverage for the ArgoCD project, one of the key things to focus on here is we are trying our hardest not to do a lot of mocking. We isolated the specific function being tested NewReloginCommand and aimed to test its behavior independently:

TestNewReloginCommandWithGlobalClientOptions: test focuses on testing the NewReloginCommand function when provided with specific global client options. It ensures that the command is created correctly and that the provided options are reflected in the command's properties.

TestNewReloginCommand: focuses on testing the default behavior of the NewReloginCommand func when minimal global client options are provided.

Note on DCO:

If the DCO action in the integration test fails, one or more of your commits are not signed off. Please click on the Details link next to the DCO action for instructions on how to resolve this.

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this does not need to be in the release notes.
  • The title of the PR states what changed and the related issues number (used for the release note).
  • The title of the PR conforms to the Toolchain Guide
  • I've included "Closes [ISSUE #]" or "Fixes [ISSUE #]" in the description to automatically close the associated issue.
  • I've updated both the CLI and UI to expose my feature, or I plan to submit a second PR with them.
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • Optional. My organization is added to USERS.md.
  • I have signed off all my commits as required by DCO
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My build is green (troubleshooting builds).
  • My new feature complies with the feature status guidelines.
  • I have added a brief description of why this PR is necessary and/or what this PR solves.

Please see Contribution FAQs if you have questions about your pull-request.

Signed-off-by: zubair.haque <zubair.haque@cpap.com>
@zhaque44 zhaque44 changed the title Tests for NewReloginCommand chore: Tests for NewReloginCommand Jun 23, 2023
@codecov
Copy link

codecov bot commented Jun 23, 2023

Codecov Report

Patch coverage has no change and project coverage change: +0.02 🎉

Comparison is base (057e156) 49.61% compared to head (2b583e4) 49.64%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #14186      +/-   ##
==========================================
+ Coverage   49.61%   49.64%   +0.02%     
==========================================
  Files         258      258              
  Lines       44192    44192              
==========================================
+ Hits        21928    21940      +12     
+ Misses      20104    20091      -13     
- Partials     2160     2161       +1     

see 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@pasha-codefresh pasha-codefresh left a comment

Choose a reason for hiding this comment

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

LGTM

@pasha-codefresh pasha-codefresh merged commit 62b1afe into argoproj:master Jun 26, 2023
24 checks passed
@zhaque44 zhaque44 deleted the relogin-cov branch June 26, 2023 23:14
yyzxw pushed a commit to yyzxw/argo-cd that referenced this pull request Aug 9, 2023
Signed-off-by: zubair.haque <zubair.haque@cpap.com>
Co-authored-by: zubair.haque <zubair.haque@cpap.com>
Co-authored-by: pasha-codefresh <pavel@codefresh.io>
tesla59 pushed a commit to tesla59/argo-cd that referenced this pull request Dec 16, 2023
Signed-off-by: zubair.haque <zubair.haque@cpap.com>
Co-authored-by: zubair.haque <zubair.haque@cpap.com>
Co-authored-by: pasha-codefresh <pavel@codefresh.io>
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.

None yet

2 participants