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

feat(load-balancer): Add health status to list output #542

Merged
merged 2 commits into from
Sep 20, 2023

Conversation

cedi
Copy link
Contributor

@cedi cedi commented Sep 13, 2023

This commit adds the health status of a loadbalancer to the list command to display the loadbalancer health in a similar style as in the browser

This commit adds the health status of a loadbalancer to the list command
to display the loadbalancer health in a similar style as in the browser
Copy link
Member

@apricote apricote left a comment

Choose a reason for hiding this comment

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

Very nice!

Could you add some simple tests for loadBalancerHealth to verify that it outputs what we expect it to?

internal/cmd/loadbalancer/list.go Outdated Show resolved Hide resolved
@cedi cedi requested a review from a team as a code owner September 19, 2023 11:21
@cedi
Copy link
Contributor Author

cedi commented Sep 19, 2023

Could you add some simple tests for loadBalancerHealth to verify that it outputs what we expect it to?

I did consider adding a test, but given that the whole application isn't unit-tested at all made me skip this part. I added one test for the loadBalancerHealth.

Wold you consider a pull-request in the future where I add unit-testing more broadly?

@apricote
Copy link
Member

Thank you very much @cedi! Merging now.

I did consider adding a test, but given that the whole application isn't unit-tested at all made me skip this part. I added one test for the loadBalancerHealth.

There are some tests, e.g. server create, but yes. In general this repo would do good with a better test suite.

Wold you consider a pull-request in the future where I add unit-testing more broadly?

Definitely!

@apricote apricote changed the title Add HealthStatus to loadbalancer list output feat(load-balancer): Add health status to list output Sep 20, 2023
@apricote apricote merged commit 272cc63 into hetznercloud:main Sep 20, 2023
2 of 3 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.

2 participants