Implement /history and /cluster endpoints (#1191)

The /history endpoint shows the content of the `history` key in DCS
The /cluster endpoint show all cluster members and some service info like pending and scheduled restarts or switchovers.

In addition to that implement `patronictl history`

Close #586
Close #675
Close #1133
This commit is contained in:
Alexander Kukushkin
2019-10-22 17:19:02 +02:00
committed by GitHub
parent f4623c4e8e
commit 367d787ff9
11 changed files with 164 additions and 101 deletions
+2
View File
@@ -70,6 +70,7 @@ Scenario: check the switchover via the API in the pause mode
And postgres1 role is the primary after 10 seconds
And postgres0 role is the secondary after 10 seconds
And replication works from postgres1 to postgres0 after 20 seconds
And "members/postgres0" key in DCS has state=running after 10 seconds
When I issue a GET request to http://127.0.0.1:8008/master
Then I receive a response code 503
When I issue a GET request to http://127.0.0.1:8008/replica
@@ -91,6 +92,7 @@ Scenario: check the scheduled switchover
And postgres0 role is the primary after 10 seconds
And postgres1 role is the secondary after 10 seconds
And replication works from postgres0 to postgres1 after 25 seconds
And "members/postgres1" key in DCS has state=running after 10 seconds
When I issue a GET request to http://127.0.0.1:8008/master
Then I receive a response code 200
When I issue a GET request to http://127.0.0.1:8008/replica