From 24ebcc72f6a25bb8f5cf53d6efe00bdd4e27c890 Mon Sep 17 00:00:00 2001 From: Oleksii Kliukin Date: Tue, 1 Mar 2016 22:07:18 +0100 Subject: [PATCH] Add more tests for the restart and promotion. --- features/patroni_api.feature | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/features/patroni_api.feature b/features/patroni_api.feature index 3649337f..c7779af1 100644 --- a/features/patroni_api.feature +++ b/features/patroni_api.feature @@ -29,3 +29,12 @@ Scenario: check API requests for the primary-replica pair And I receive a response role replica When I issue an empty POST request to http://127.0.0.1:8009/reinitialize Then I receive a response code 200 + Given replication works after 10 seconds + When I issue an empty POST request to http://127.0.0.1:8008/restart + Then I receive a response code 200 + And postgres0 is a leader after 5 seconds + +Scenario: check promotion via the API + Given I issue a POST request to http://127.0.0.1:8008/failover with leader=postgres0,candidate=postgres1 + Then I receive a response code 200 + And postgres1 is a leader after 10 seconds