Implement reload of config.yml with REST API call

and acceptance tests for that
This commit is contained in:
Alexander Kukushkin
2016-05-26 17:09:40 +02:00
parent 45cbc8ca70
commit 6700cd0aa6
9 changed files with 89 additions and 17 deletions
+8
View File
@@ -8,10 +8,18 @@ Feature: basic replication
When I add the table foo to postgres0
Then table foo is present on postgres1 after 20 seconds
Scenario: check local configuration reload
When I issue an empty POST request to http://127.0.0.1:8008/reload
Then I receive a response code 304
When I add tag new_tag new_value to postgres0 config
And I issue an empty POST request to http://127.0.0.1:8008/reload
Then I receive a response code 200
Scenario: check dynamic configuration change via DCS
When I patch global configuration with {"ttl": 20, "loop_wait": 5, "postgresql": {"parameters": {"max_connections": 101}}}
Then Response on GET http://127.0.0.1:8008/patroni contains restart_pending after 11 seconds
And Response on GET http://127.0.0.1:8009/patroni contains restart_pending after 11 seconds
And Response on GET http://127.0.0.1:8008/patroni contains new_value after 1 seconds
Scenario: check the basic failover
And I kill postgres0