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: add kongintegration test flavor and cover UpdateStrategyInMemory as a reference #4802

Merged
merged 6 commits into from
Oct 12, 2023

Conversation

czeslavo
Copy link
Contributor

@czeslavo czeslavo commented Oct 10, 2023

What this PR does / why we need it:

Adds an integration test for sendconfig.UpdateStrategyInMemory to verify we correctly integrate with Kong's flattened errors.

It also creates a separate "kongintegration" test flavor (name to be discussed, I'm open to suggestions). I think we could benefit from having more coverage in this kind of tests instead of always adding a regular integration or E2E case. They all could be independent and run in parallel with no problems. We could test various Kong settings in them as every test spawns its own Kong instance. Their only dependency is to have a running docker daemon.

Which issue this PR fixes:

Follow up of #4790.

@czeslavo czeslavo force-pushed the narrow-integration-test branch 2 times, most recently from 6bf5b6c to 5519984 Compare October 10, 2023 15:46
@czeslavo czeslavo self-assigned this Oct 10, 2023
@codecov
Copy link

codecov bot commented Oct 10, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (b41cf57) 78.1% compared to head (9b7e3be) 78.0%.
Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##            main   #4802     +/-   ##
=======================================
- Coverage   78.1%   78.0%   -0.1%     
=======================================
  Files        163     163             
  Lines      18544   18537      -7     
=======================================
- Hits       14486   14463     -23     
- Misses      3255    3267     +12     
- Partials     803     807      +4     

see 9 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@programmer04
Copy link
Member

Target test.expression_router can be collapsed into what you're proposing here, ofc in a separate PR

@czeslavo czeslavo force-pushed the narrow-integration-test branch 2 times, most recently from 5cf1c23 to 4417c23 Compare October 10, 2023 21:21
@czeslavo
Copy link
Contributor Author

Target test.expression_router can be collapsed into what you're proposing here, ofc in a separate PR

Yeah, I gave it a shot and it works: #4806

I also tried verifying Parser's golden test outputs in this kind of test: #4805

@czeslavo czeslavo marked this pull request as ready for review October 10, 2023 22:13
@czeslavo czeslavo requested a review from a team as a code owner October 10, 2023 22:13
TESTING.md Show resolved Hide resolved
test/kongintegration/inmemory_update_strategy_test.go Outdated Show resolved Hide resolved
test/kongintegration/inmemory_update_strategy_test.go Outdated Show resolved Hide resolved
test/kongintegration/inmemory_update_strategy_test.go Outdated Show resolved Hide resolved
test/kongintegration/kongintegration.go Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
.github/workflows/_kongintegration_tests.yaml Outdated Show resolved Hide resolved
.github/workflows/_kongintegration_tests.yaml Show resolved Hide resolved
@pmalek
Copy link
Member

pmalek commented Oct 11, 2023

Since the contents of this PR have changed (to introduce a new kind of tests) please change the PR title to reflect this fact.

@czeslavo czeslavo changed the title chore: add integration test for UpdateStrategyInMemory chore: add kongintegration test flavor and cover UpdateStrategyInMemory as a reference Oct 11, 2023
pmalek
pmalek previously approved these changes Oct 11, 2023
test/kongintegration/kongintegration.go Outdated Show resolved Hide resolved
test/kongintegration/kong.go Show resolved Hide resolved
.github/workflows/checks.yaml Show resolved Hide resolved
@czeslavo czeslavo enabled auto-merge (squash) October 12, 2023 16:52
@czeslavo czeslavo merged commit 66f6f4c into main Oct 12, 2023
34 checks passed
@czeslavo czeslavo deleted the narrow-integration-test branch October 12, 2023 17:44
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