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

refactor: replace debugging endpoints integration tests with envtest #4094

Merged
merged 4 commits into from
May 29, 2023

Conversation

pmalek
Copy link
Member

@pmalek pmalek commented May 26, 2023

What this PR does / why we need it:

This PR replaces unnecessary integration tests - that test debugging and readiness endpoints of KIC - with envtest based test.

Which issue this PR fixes:

Special notes for your reviewer:

PR Readiness Checklist:

Complete these before marking the PR as ready to review:

  • the CHANGELOG.md release notes have been updated to reflect any significant (and particularly user-facing) changes introduced by this PR

@pmalek pmalek added area/tests area/maintenance Cleanup, refactoring, and other maintenance improvements that don't change functionality. refactor labels May 26, 2023
@pmalek pmalek self-assigned this May 26, 2023
@codecov
Copy link

codecov bot commented May 26, 2023

Codecov Report

Patch coverage: 92.8% and project coverage change: +0.2 🎉

Comparison is base (d8c1396) 60.1% compared to head (d32c8ca) 60.3%.

Additional details and impacted files
@@           Coverage Diff           @@
##            main   #4094     +/-   ##
=======================================
+ Coverage   60.1%   60.3%   +0.2%     
=======================================
  Files        150     150             
  Lines      16727   16736      +9     
=======================================
+ Hits       10066   10107     +41     
+ Misses      6024    5997     -27     
+ Partials     637     632      -5     
Impacted Files Coverage Δ
internal/cmd/rootcmd/rootcmd.go 13.8% <0.0%> (ø)
internal/cmd/rootcmd/run.go 36.8% <100.0%> (+15.7%) ⬆️
internal/manager/conditions.go 91.6% <100.0%> (-8.4%) ⬇️
internal/manager/config.go 94.9% <100.0%> (+0.2%) ⬆️

... and 5 files 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.

@pmalek pmalek marked this pull request as ready for review May 29, 2023 10:50
@pmalek pmalek requested a review from a team as a code owner May 29, 2023 10:50
Co-authored-by: Jakub Warczarek <jakub.warczarek@konghq.com>
@pmalek pmalek requested a review from programmer04 May 29, 2023 11:08
programmer04
programmer04 previously approved these changes May 29, 2023
Copy link
Contributor

@czeslavo czeslavo left a comment

Choose a reason for hiding this comment

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

I like the intention of ripping things that do not really depend on Kong instance out of integration tests suite. I see the value in being able to run tests locally, quickly, and in isolation (sadly cannot say that about integration tests). 👍

internal/cmd/rootcmd/run_envtest_test.go Outdated Show resolved Hide resolved
internal/cmd/rootcmd/run_envtest_test.go Show resolved Hide resolved
pmalek and others added 2 commits May 29, 2023 14:01
Co-authored-by: Grzegorz Burzyński <czeslavo@gmail.com>
@pmalek pmalek merged commit 5abc699 into main May 29, 2023
28 checks passed
@pmalek pmalek deleted the run-envtest branch May 29, 2023 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/maintenance Cleanup, refactoring, and other maintenance improvements that don't change functionality. area/tests refactor size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants