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(crd-generator): Add approval tests for crd-generator #5943

Merged
merged 5 commits into from
Apr 27, 2024

Conversation

baloo42
Copy link
Contributor

@baloo42 baloo42 commented Apr 23, 2024

Description

Add approval tests for crd-generator

Fixes #5850

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change
  • Chore (non-breaking change which doesn't affect codebase;
    test, version modification, documentation, etc.)

Checklist

  • Code contributed by me aligns with current project license: Apache 2.0
  • I have implemented unit tests to cover my changes
  • I have added/updated the javadocs and other documentation accordingly
  • No new bugs, code smells, etc. in SonarCloud report

@baloo42
Copy link
Contributor Author

baloo42 commented Apr 24, 2024

@manusa @shawkins @andreaTP: I need some initial feedback here:

  1. Keep or remove the old tests (atm marked as deprecated)?
  2. Structure ok?
    • Keep and reuse the examples package (which are also used by other unit tests)
    • Approval files next to test source files? (instead of somewhere in resources)
  3. Other thoughts?

I would suggest to create such a test for each of the existing examples.

If you know some missing edge cases, please let me know ;)

@manusa
Copy link
Member

manusa commented Apr 24, 2024

@manusa @shawkins @andreaTP: I need some initial feedback here:

1. Keep or remove the old tests (atm marked as deprecated)?

If the approval tests make those redundant and no production code is being touched, then remove them.

2. Structure ok?
   
   * Keep and reuse the examples package (which are also used by other unit tests)

Please, create specific test samples so we can keep a narrowed scope and purpose for the files.

   * Approval files next to test source files? (instead of somewhere in resources)

Whatever, we're doing at the moment in other modules (keep consistent).

If you know some missing edge cases, please let me know ;)

Yes, it would be good to have a thorough set of tests to ensure nothing breaks during upcoming refactors. I'm not a user of the crd-generator, but I encourage anyone else using it to ensure their use cases are being covered.

@baloo42 baloo42 force-pushed the iss_5850_2 branch 3 times, most recently from 82e6e9d to d6a5d4d Compare April 24, 2024 14:45
@baloo42

This comment was marked as outdated.

@baloo42 baloo42 marked this pull request as ready for review April 24, 2024 15:24
@manusa
Copy link
Member

manusa commented Apr 25, 2024

Is this PR affected by the changes introduced in #5954?

@baloo42
Copy link
Contributor Author

baloo42 commented Apr 25, 2024

Is this PR affected by the changes introduced in #5954?

I think yes. I'm rebasing and testing it atm.

@manusa
Copy link
Member

manusa commented Apr 25, 2024

OK, I'll probably add some changes on top and send you a PR

@manusa
Copy link
Member

manusa commented Apr 26, 2024

@baloo42 I've added some changes on top of your branch, please take a look and merge if you think it's OK:
baloo42#6

Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@manusa manusa added this to the 6.13.0 milestone Apr 27, 2024 — with automated-tasks
Copy link
Member

@manusa manusa left a comment

Choose a reason for hiding this comment

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

LGTM, thx!

@manusa manusa merged commit 8d98cb8 into fabric8io:main Apr 27, 2024
20 checks passed
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.

CRDGenerator: Replace assertions with ApprovalTests
2 participants