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 2.0: use default transport to mock http requests #22

Merged
merged 8 commits into from
Mar 25, 2024

Conversation

MatousJobanek
Copy link
Contributor

gock relies on the default transport that mocks

})
}

func NewClientWitTransport(token, apiEndpoint string, transport http.RoundTripper) (runtimeclient.Client, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
func NewClientWitTransport(token, apiEndpoint string, transport http.RoundTripper) (runtimeclient.Client, error) {
func NewClientWithTransport(token, apiEndpoint string, transport http.RoundTripper) (runtimeclient.Client, error) {

Copy link
Contributor

Choose a reason for hiding this comment

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

(small typo)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Friday's morning a2a3c2f

Copy link
Contributor Author

Choose a reason for hiding this comment

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

And thanks for the catch ;-)

Copy link
Contributor

Choose a reason for hiding this comment

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

my pleasure! 😇

Copy link
Contributor Author

@MatousJobanek MatousJobanek Mar 22, 2024

Choose a reason for hiding this comment

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

can you please click on approve now? or is there anything still missing?

Copy link

codecov bot commented Mar 22, 2024

Codecov Report

Merging #22 (5d5e5a0) into master (f92e184) will increase coverage by 0.17%.
Report is 4 commits behind head on master.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #22      +/-   ##
==========================================
+ Coverage   65.28%   65.45%   +0.17%     
==========================================
  Files          38       38              
  Lines        1976     1986      +10     
==========================================
+ Hits         1290     1300      +10     
  Misses        528      528              
  Partials      158      158              
Files Coverage Δ
pkg/client/client.go 49.77% <100.00%> (+0.67%) ⬆️

Copy link
Contributor

@xcoulon xcoulon left a comment

Choose a reason for hiding this comment

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

sorry for the late approval :/

@xcoulon xcoulon merged commit a7e9be9 into kubesaw:master Mar 25, 2024
7 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.

3 participants