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

fix: unbreak NewAPIErrorWithRaw and NewAPIError-related tests #267

Merged
merged 8 commits into from
Jan 23, 2023

Conversation

rainest
Copy link
Contributor

@rainest rainest commented Jan 19, 2023

In retrospect from #237, we actually do want to break the exported NewAPIError function. AFAICT we use this in one place only, and that place is a test within KIC that we can change trivially (searched through deck and don't see any use there).

Introducing the separate one apparently broke all sorts of other things in go-kong's internal test expectations and apparently this repo is not configured to block auto-merge on that 😭

https://github.com/Kong/go-kong/actions/runs/3962834113/jobs/6790000801 suggests that the skipped test-passed actually satisfies the branch protection requirements, somehow.

@rainest rainest force-pushed the feat/raw-nah-lets-break-it branch 2 times, most recently from 7781803 to 1ef0606 Compare January 19, 2023 22:24
@codecov-commenter
Copy link

codecov-commenter commented Jan 19, 2023

Codecov Report

Base: 52.84% // Head: 52.87% // Increases project coverage by +0.03% 🎉

Coverage data is based on head (24c5862) compared to base (21ef700).
Patch coverage: 61.90% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #267      +/-   ##
==========================================
+ Coverage   52.84%   52.87%   +0.03%     
==========================================
  Files          51       51              
  Lines        4627     4647      +20     
==========================================
+ Hits         2445     2457      +12     
- Misses       1659     1665       +6     
- Partials      523      525       +2     
Flag Coverage Δ
2.1.4 35.82% <61.90%> (+0.10%) ⬆️
2.2.1.3 45.92% <61.90%> (+0.06%) ⬆️
2.2.2 35.82% <61.90%> (+0.10%) ⬆️
2.3.3 37.55% <61.90%> (+0.09%) ⬆️
2.3.3.4 45.92% <61.90%> (+0.06%) ⬆️
2.4.0 37.63% <61.90%> (+0.09%) ⬆️
2.4.1.3 45.92% <61.90%> (+0.06%) ⬆️
2.5.1 37.63% <61.90%> (+0.09%) ⬆️
2.5.1.2 45.92% <61.90%> (+0.06%) ⬆️
2.6.0 37.63% <61.90%> (+0.09%) ⬆️
2.6.0.2 45.92% <61.90%> (+0.06%) ⬆️
2.7.0 37.63% <61.90%> (+0.09%) ⬆️
2.7.0.0 47.60% <61.90%> (+0.05%) ⬆️
2.8.0 37.63% <61.90%> (+0.09%) ⬆️
2.8.2.2 47.60% <61.90%> (+0.05%) ⬆️
3.0.1 37.03% <61.90%> (+0.09%) ⬆️
3.0.1.0 48.09% <61.90%> (+0.05%) ⬆️
3.1.0 38.67% <61.90%> (+0.09%) ⬆️
3.1.0.0 49.73% <61.90%> (+0.04%) ⬆️
community 39.27% <61.90%> (+0.08%) ⬆️
enterprise 50.33% <61.90%> (+0.04%) ⬆️
integration 52.87% <61.90%> (+0.03%) ⬆️

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

Impacted Files Coverage Δ
kong/response.go 79.31% <53.84%> (-20.69%) ⬇️
kong/error.go 89.65% <75.00%> (-5.59%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

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

@rainest rainest marked this pull request as ready for review January 19, 2023 22:32
@rainest rainest requested a review from a team as a code owner January 19, 2023 22:32
@pmalek
Copy link
Member

pmalek commented Jan 20, 2023

I think I'd just try to address the failing test rather than doing that.

Or perhaps change the API to accept options like WithBody([]byte)? Passing nil in places where an argument is "not really necessary" feels like a design flaw to me.

@rainest rainest force-pushed the feat/raw-nah-lets-break-it branch 3 times, most recently from 5c1a72f to 156762a Compare January 20, 2023 22:42
@rainest
Copy link
Contributor Author

rainest commented Jan 20, 2023

Yah, sorry, my bad, was overthinking it and mixed up the tests.

@rainest rainest changed the title fix: actually do break NewAPIError fix: unbreak NewAPIErrorWithRaw and NewAPIError-related tests Jan 20, 2023
kong/response.go Outdated Show resolved Hide resolved
@rainest rainest requested a review from pmalek January 23, 2023 19:55
@rainest rainest enabled auto-merge (squash) January 23, 2023 19:57
kong/response.go Outdated Show resolved Hide resolved
@rainest rainest merged commit e0450d3 into main Jan 23, 2023
@rainest rainest deleted the feat/raw-nah-lets-break-it branch January 23, 2023 20:30
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.

3 participants