Commit Graph
833 Commits
Author SHA1 Message Date
Oleksii Kliukin 998f0da3d8 Add cascading replication (backup from the replica) tests. 2016-03-10 16:05:06 +01:00
Oleksii Kliukin 3f1c34f557 Add tests for the scheduled failover.
The actual amount of time to establish the master and the replication
after the scheduled failover seems sufficient (15 seconds with the
failover in 10 seconds), but occasionally leads to test failures.
This is unlikely the test issue and should be investigated inside
the patroni.
2016-03-02 19:39:12 +01:00
Oleksii Kliukin 58749b1dd6 Merge branch 'master' into feature/acceptance_tests 2016-03-02 16:17:21 +01:00
Oleksii Kliukin 069440be15 Improve the "replication work" sentence definition.
Add an ability to specify the origin and the destination for
the replication works clause. Use this ability in the API
promotion test to ensure the replication from the former
replica to the former master.
2016-03-02 15:43:44 +01:00
Oleksii Kliukin 24ebcc72f6 Add more tests for the restart and promotion. 2016-03-01 22:07:18 +01:00
Oleksii Kliukin ed15f7cd73 Improve tests start/stop, add etcd logging.
Toggle the etcd debug logging and write the log to the test dir.

Make sure etcd and patroni are terminated when the tests finish
by sending SIGKILL in case SIGTERM does not work.

Make sure before.all code does the proper cleanup when the exception
is thrown.
2016-03-01 22:03:38 +01:00
Oleksii Kliukin fa1a7687e5 Correct the step definition, randomize the table.
Make sure the step definition does not include "command" worlds.
Use the table name that includes current timestamp in the tests.
2016-03-01 22:00:30 +01:00
Oleksii Kliukin 0d44e3eb7c Add simple API tests for 2 nodes, to be extended. 2016-02-26 18:00:11 +01:00
Oleksii Kliukin 4e9ebf48a8 Add API tests for a stand-alone node. Bugfixes.
Add tests for patroni API.
Fix test failures when an already running etcd is used.
2016-02-26 17:37:37 +01:00
Oleksii Kliukin 45cb3f9696 Merge branch 'master' of https://github.com/zalando/patroni 2016-02-26 10:54:18 +01:00
Oleksii Kliukin e564fa7f08 Update DCS status right after acquiring the lock.
This commit only handles the initial bootstrap case, uncovered
by the upcoming lettuce tests
2016-02-26 10:53:00 +01:00
Oleksii Kliukin 83b7c34b00 Do not try to close an already closed file. 2016-02-25 15:35:15 +01:00
Oleksii Kliukin a84a3fc5e1 Changeset missing in the previous commit. 2016-02-25 15:16:35 +01:00
Oleksii Kliukin 67f55b4606 Stylistic issues: clearly mark unused variables. 2016-02-25 15:11:48 +01:00
Oleksii Kliukin 4a8edf44e6 Convert normal methods to static methods when possible. 2016-02-25 14:55:29 +01:00
Oleksii Kliukin 481a80a3ce Fix another couple of warnings from the QuantifiedCode and Co. 2016-02-25 14:39:22 +01:00
Oleksii Kliukin 4986db5c6a Code refactoring, no functional changes.
Move etcd code into a separate class.
Reduce the number of global interdependencies.
Clearly define private members of PatroniController and EtcdController.

It would not make the QuantifiedCode entirely happy, since lettuce
passes the step argument to the step definition, that is not used
in the client code, but internally (via the @steps decorator on
the steps class), but that's the issue of the tool used.
2016-02-25 12:52:45 +01:00
Oleksii Kliukin 53b5dfe39e Remove an unused function. 2016-02-24 19:24:46 +01:00
Oleksii Kliukin c9b8c2d3a9 Bugfixes, add a function to kill patroni daemon, make the feature description more concise. 2016-02-24 19:22:42 +01:00
Oleksii Kliukin 6f03953268 Merge basic failover and basic replication scenarios in one feature. 2016-02-24 17:12:45 +01:00
Oleksii Kliukin 6ec3523748 Collect test output, add basic failover test. 2016-02-24 16:30:52 +01:00
Alexander Kukushkin 70742e6aba Merge pull request #139 from zalando/codequality
remove unused code
2016-02-23 13:24:53 +01:00
Oleksii Kliukin 6ebfbd241a Merge pull request #141 from jankeirse/master
sample systemd service file
2016-02-23 12:35:37 +01:00
Alexander Kukushkin ec85e2eb49 make quantifiedcode happier 2016-02-23 12:05:02 +01:00
Alexander Kukushkin 756158a735 make codacy and quantifiedcode happier 2016-02-23 11:59:02 +01:00
Alexander Kukushkin 6b3c4697fc Remove unused code 2016-02-23 11:49:22 +01:00
Alexander Kukushkin ce33090c0d Mock dcs.watch directly instead of using wraper 2016-02-23 11:48:52 +01:00
Alexander Kukushkin dd20fc7e71 Refactor follow method 2016-02-23 11:47:47 +01:00
Alexander Kukushkin 641cc4013e Mock a few of methods in Postgresql class instead of the whole class 2016-02-23 11:46:49 +01:00
Alexander Kukushkin dbb3e8308b Merge branch 'master' of github.com:zalando/patroni into codequality 2016-02-22 19:20:23 +01:00
Oleksii Kliukin cde61187c2 Merge pull request #134 from zalando/feature/scheduled_failover_squashed
Feature/scheduled failover squashed
2016-02-22 16:40:17 +01:00
Oleksii Kliukin 287c0b3125 Fix the call to the function that was forgotten to be renamed. 2016-02-22 14:31:29 +01:00
Oleksii Kliukin 26e1586288 Make the patronictl test provide an input for the schedule, even if it's empty. 2016-02-22 12:20:20 +01:00
Jan Keirse 753ba835f1 wrong comment about restart 2016-02-18 11:08:18 +01:00
Jan Keirse e68e253d16 Add patroni.service file documentation. 2016-02-18 11:06:40 +01:00
Jan Keirse eb1e678820 sample systemd service file 2016-02-18 11:04:41 +01:00
Alexander Kukushkin 4038d94c5a Fix more codacy issues 2016-02-17 14:59:17 +01:00
Alexander Kukushkin a210cfd1ab Fix more codacy issues 2016-02-17 14:51:59 +01:00
Alexander Kukushkin f7d60c61b6 remove unused code 2016-02-17 14:09:00 +01:00
Alexander Kukushkin 61feb47da8 Merge pull request #137 from LappleApple/patch-2
Rename LICENCE to LICENSE
2016-02-17 13:33:05 +01:00
Lauri at Zalando 602b21ac7d Rename LICENCE to LICENSE
spelling error
2016-02-17 13:15:41 +01:00
Alexander Kukushkin f079a9f308 remove unused code 2016-02-17 12:34:22 +01:00
Alexander Kukushkin 1b9e77fe83 pep8 formatting 2016-02-17 12:34:04 +01:00
Alexander Kukushkin 1b14229da4 Catch TypeError within ha loop not in the unit test
In addition to that use sleep function from patroni.utils instead of
time.sleep which is interruptable
2016-02-17 12:18:50 +01:00
Alexander Kukushkin a875e93f2e Merge branch 'master' of github.com:zalando/patroni into feature/scheduled_failover_squashed 2016-02-17 12:14:10 +01:00
Alexander Kukushkin f131961d8b Merge pull request #136 from zalando/codequality
Improve quality of code by resolving issues found by quantifiedcode and codacy
2016-02-17 09:26:21 +01:00
Oleksii Kliukin f781d0b9fe Address the code review by Alex Shulgin. 2016-02-16 16:50:50 +01:00
Alexander Kukushkin 0710bdfead directory could disappear after successfull call of isdir 2016-02-15 16:01:11 +01:00
Alexander Kukushkin 1bc22727d5 patroni/postgresql.py
directory could disappear after successfull call of isdir
2016-02-15 14:50:59 +01:00
Alexander Kukushkin 3d4fdea8d5 remove unused import 2016-02-15 13:46:53 +01:00