Skip to content

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

Merged
mirkoAlic merged 3 commits intodevelopfrom
ETCM-48-add-json-rpc-http-healthcheck
Oct 1, 2020
Merged

[ETCM-48] Add json rpc http healthcheck#713
mirkoAlic merged 3 commits intodevelopfrom
ETCM-48-add-json-rpc-http-healthcheck

Conversation

@mirkoAlic
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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