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

[ETCM-48] Add json rpc http healthcheck #713

Merged
merged 3 commits into from
Oct 1, 2020

Conversation

mirkoAlic
Copy link
Contributor

@mirkoAlic mirkoAlic commented Sep 30, 2020

Description

This healthcheck functionality needs to be back ported from the other project, given is needed for testnet cluster purposes.

How to test

Manually run the node and use:

curl --request GET \
  --url http://127.0.0.1:8546/healthcheck \
  --header 'cache-control: no-cache'

Expected response

{
  "checks": [
    {
      "description": "listening",
      "status": "OK"
    },
    {
      "description": "peerCount",
      "status": "OK"
    },
    {
      "description": "earliestBlock",
      "status": "OK"
    },
    {
      "description": "latestBlock",
      "status": "OK"
    },
    {
      "description": "pendingBlock",
      "status": "OK"
    }
  ]
}

@mirkoAlic mirkoAlic requested a review from manveru September 30, 2020 17:41
@mirkoAlic mirkoAlic marked this pull request as ready for review September 30, 2020 17:41
@mirkoAlic mirkoAlic force-pushed the ETCM-48-add-json-rpc-http-healthcheck branch 3 times, most recently from 2d728c4 to 9e9a5f6 Compare September 30, 2020 19:41
@mirkoAlic mirkoAlic force-pushed the ETCM-48-add-json-rpc-http-healthcheck branch from 9e9a5f6 to 575f8f9 Compare September 30, 2020 20:04
@mirkoAlic mirkoAlic requested a review from mmrozek October 1, 2020 11:59
Copy link
Contributor

@mmrozek mmrozek left a comment

Choose a reason for hiding this comment

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

Do we have any tests for failing healthcheck scenario?
Apart from that LGTM!

@mirkoAlic
Copy link
Contributor Author

Do we have any tests for failing healthcheck scenario?
Apart from that LGTM!

There is no tests for healthcheck at all. As this is required with some rush, i will add some in a future PR.

@mirkoAlic mirkoAlic merged commit 7cb9800 into develop Oct 1, 2020
@mirkoAlic mirkoAlic deleted the ETCM-48-add-json-rpc-http-healthcheck branch October 1, 2020 12:54
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