Add /node/health endpoint (#1197)

* Start adding health endpoint

* Use psutil more

* Add get_health test

* Expose health to Prom

* Update comments

* Add /node/health to docs

* Update Prom naming
This commit is contained in:
Paul Hauner
2020-05-28 11:24:24 +10:00
committed by GitHub
parent 58a9f979e0
commit ea4a52984c
9 changed files with 181 additions and 4 deletions

View File

@@ -1252,3 +1252,15 @@ mod validator_attestation {
);
}
}
#[test]
fn get_health() {
let mut env = build_env();
let node = build_node(&mut env, testing_client_config());
let remote_node = node.remote_node().expect("should produce remote node");
env.runtime()
.block_on(remote_node.http.node().get_health())
.unwrap();
}