Implement PATCH /config

This commit is contained in:
Alexander Kukushkin
2016-05-27 16:29:33 +02:00
parent 6700cd0aa6
commit 073ef3784f
10 changed files with 100 additions and 83 deletions
+3 -3
View File
@@ -9,14 +9,14 @@ Feature: basic replication
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
Given 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
Then I receive a response code 202
Scenario: check dynamic configuration change via DCS
When I patch global configuration with {"ttl": 20, "loop_wait": 5, "postgresql": {"parameters": {"max_connections": 101}}}
Given I issue a PATCH request to http://127.0.0.1:8008/config 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