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

Improve the upstream testing helper #101

Open
sxgunchenko opened this issue Mar 23, 2021 · 0 comments
Open

Improve the upstream testing helper #101

sxgunchenko opened this issue Mar 23, 2021 · 0 comments
Labels
Enhancement New feature or request

Comments

@sxgunchenko
Copy link
Contributor

sxgunchenko commented Mar 23, 2021

For now, we have 2 issues with the helper (ag::err_string ag::test_upstream(...)):

  1. it returns the optional error string as the result of the test
  2. it does both the validation of an upstream URL and testing if it is alive

To address these issues the following should be done:

  1. add an enum with a few error codes, like OK, INVALID_ADDRESS, and NETWORK_ERROR (maybe something else), and make the helper return the error code
  2. there are 2 options:
    • add some parameter to the helper which identifies if the health check is needed, or
    • extract the validation logic to a separate method
@sxgunchenko sxgunchenko added the Enhancement New feature or request label Mar 23, 2021
@sxgunchenko sxgunchenko changed the title Return the error code as a result of the upstream test Improve the upstream testing helper Mar 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant