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: introduce unit test for non-blocking lifecycle operator mode #3581

Merged
merged 4 commits into from
Jul 19, 2024

Conversation

Jay179-sudo
Copy link
Contributor

Description

Added a unit test for the non-blocking lifecycle operator mode.

I used the manifest provided in the docs as the template for the unit test.

Since the non-blocking mode does not introduce any errors in the controller, we can write a unit test with a mock handler that does not return any errors when using the manifest provided in the docs.
Partially Fixes # (#3121)

How to test

Please describe how to run the tests that you ran to verify your changes.
Provide instructions so we can reproduce.
Please also provide information about any automatic tests that you added.

I use the run test option in VSCode to verify that my tests works.

  • Manual Test A
  • Unit Test B
  • Integration Test C

Checklist

  • My PR fulfills the Definition of Done of the corresponding issue and not more (or parts if the issue is separated
    into multiple PRs)
  • I used descriptive commit messages to help reviewers understand my thought process
  • I signed off all my commits according to the Developer Certificate of Origin (DCO)
    see Contribution Guide
  • My PR title is formatted according to the semantic PR conventions described in
    the Contribution Guide
  • My code follows the style guidelines of this project (golangci-lint passes, YAMLLint passes)
  • I regenerated the auto-generated docs for Helm and the CRD documentation (if applicable)
  • I have performed a self-review of my code
  • I have made corresponding changes to the documentation (if needed)
  • My changes result in all-green PR checks (first-time contributors need to ask a maintainer to approve their test runs)
  • New and existing unit and integration tests pass locally with my changes

Signed-off-by: Jay179-sudo <jayprasad2002@gmail.com>
@Jay179-sudo Jay179-sudo requested a review from a team as a code owner July 11, 2024 08:38
@odubajDT odubajDT changed the title Unit Test for the non-blocking lifecycle operator mode chore: introduce unit test for non-blocking lifecycle operator mode Jul 12, 2024
Signed-off-by: Jay179-sudo <jayprasad2002@gmail.com>
Signed-off-by: Jay179-sudo <jayprasad2002@gmail.com>
Copy link

codecov bot commented Jul 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.51%. Comparing base (b45e2f3) to head (9b0abb5).
Report is 19 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3581      +/-   ##
==========================================
+ Coverage   85.28%   85.51%   +0.22%     
==========================================
  Files         167      167              
  Lines        7414     7414              
==========================================
+ Hits         6323     6340      +17     
+ Misses        801      789      -12     
+ Partials      290      285       -5     

see 5 files with indirect coverage changes

Flag Coverage Δ
certificate-operator 69.23% <ø> (ø)
component-tests 58.77% <ø> (+0.97%) ⬆️
lifecycle-operator 84.69% <ø> (+1.26%) ⬆️
metrics-operator 88.32% <ø> (ø)
scheduler 34.90% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Signed-off-by: Jay179-sudo <jayprasad2002@gmail.com>
Copy link
Contributor

@odubajDT odubajDT 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 your contribution!

@odubajDT odubajDT merged commit d62f4ea into keptn:main Jul 19, 2024
36 checks passed
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.

None yet

3 participants