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

Refactored code inside healthy_endpoints_test.go to reduce repetitions #2999

Merged
merged 1 commit into from
Apr 4, 2024

Conversation

RomanZavodskikh
Copy link
Contributor

Signed-off-by: Roman Zavodskikh roman.zavodskikh@zalando.de

Signed-off-by: Roman Zavodskikh <roman.zavodskikh@zalando.de>
@RomanZavodskikh RomanZavodskikh added the minor no risk changes, for example new filters label Mar 26, 2024
@szuecs
Copy link
Member

szuecs commented Mar 26, 2024

👍


ps := httptest.NewServer(tp.proxy)

return tp, ps
Copy link
Member

Choose a reason for hiding this comment

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

You can use

t.Cleanup(tp.Close)
t.Cleanup(ps.Close)

here

Copy link
Member

Choose a reason for hiding this comment

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

Oh that's great.

@szuecs
Copy link
Member

szuecs commented Apr 4, 2024

👍

1 similar comment
@RomanZavodskikh
Copy link
Contributor Author

👍

@RomanZavodskikh RomanZavodskikh merged commit 1eeaab1 into master Apr 4, 2024
14 checks passed
@RomanZavodskikh RomanZavodskikh deleted the refactorHealthyEndpointsTest branch April 4, 2024 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor no risk changes, for example new filters
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants