Oleksii Kliukin
6c63d32253
zappr config must be .yml.
2016-03-11 16:39:57 +01:00
Oleksii Kliukin
9ca1b754a5
Add zappr configuration.
2016-03-11 16:33:26 +01:00
Alexander Kukushkin
3319c3eeea
replace unused variables with _
2016-03-11 15:36:24 +01:00
Alexander Kukushkin
ba444adb67
make codacy and quantifiedcode happier
2016-03-11 15:32:16 +01:00
Alexander Kukushkin
d3c2b8b2aa
replace unused variables with _
2016-03-11 15:18:58 +01:00
Alexander Kukushkin
ea59692b82
Merge branch 'master' of github.com:zalando/patroni into feature/remove-unused-code
2016-03-11 15:15:13 +01:00
Alexander Kukushkin
5f6beae22f
Enforce data-type checks for step matcher
...
and increase default timeout for patroni start
2016-03-11 14:46:14 +01:00
Alexander Kukushkin
8b81d270bc
BUGFIX: Assertion Failed: Steps must be unicode
2016-03-11 13:47:57 +01:00
Alexander Kukushkin
30d3982d25
Acceptance tests with behave
2016-03-11 12:56:29 +01:00
Oleksii Kliukin
d965d21ada
Unit-tests for clone from the replica.
...
Remove clonefrom function from dcs, since it's not used.
2016-03-11 10:48:58 +01:00
Oleksii Kliukin
805716ed68
Variables and parameters renaming.
...
Previously, "without_leader" suffix was used in the name of methods
and functions that initialize a replica without an active replication
connection, and leader was part of the name for parameters and messages
that require an active replication conneciton. Since we support init
from the members other than the leader, those conventions have to be
changed.
2016-03-11 10:19:00 +01:00
Oleksii Kliukin
da53452a53
Merge pull request #152 from zalando/feature/acceptance_tests_travis
...
Run acceptance tests on travis
2016-03-11 09:32:05 +01:00
Alexander Kukushkin
ad7910c025
Merge branch 'feature/acceptance_tests' of github.com:zalando/patroni into feature/acceptance_tests_travis
2016-03-11 09:04:08 +01:00
Alexander Kukushkin
60997b463d
Merge branch 'master' of github.com:zalando/patroni into feature/acceptance_tests
2016-03-10 20:40:22 +01:00
Alexander Kukushkin
c955e29805
Disable gce boto plugins by overriding BOTO_CONFIG
...
These plugins are not compatible with python 3 and breaking unit tests
2016-03-10 20:02:40 +01:00
Alexander Kukushkin
33a1de7828
Fix .travis.yml
2016-03-10 17:23:44 +01:00
Alexander Kukushkin
c2d1eea7d0
disable clonefrom test
2016-03-10 17:19:43 +01:00
Alexander Kukushkin
42d798a3de
acceptance tests on travis
2016-03-10 17:19:10 +01:00
Alexander Kukushkin
77e6795432
Merge branch 'master' of github.com:zalando/patroni into feature/acceptance_tests_travis
2016-03-10 16:19:06 +01:00
Oleksii Kliukin
9057ddeb7c
First implementation of cloning from the replica.
...
At the moment we just replace the master with the
node at the 'clonefrom' tag if it's present. Master
should be available anyway, otherwise, it will not
even try to do cloning.
Acceptance tests:
https://github.com/zalando/patroni/pull/144/commits
2016-03-10 16:06:31 +01:00
Oleksii Kliukin
998f0da3d8
Add cascading replication (backup from the replica) tests.
2016-03-10 16:05:06 +01:00
Alexander Kukushkin
5decc61fc8
Merge branch 'master' of github.com:zalando/patroni into bugfix/zookeeper-support-for-ctl
2016-03-07 12:02:57 +01:00
Oleksii Kliukin
d65d47b517
Merge pull request #147 from zalando/features/acceptance_test_related_fixes
...
Features/acceptance test related fixes
2016-03-07 11:05:54 +01:00
Oleksii Kliukin
ede5661da3
Remove hard-coded values from the failover code.
2016-03-04 19:21:48 +01:00
Oleksii Kliukin
aa844b63d0
Avoid an unhandled exception in the API thread.
...
When receiving a failover request with no data or
non-JSON data, emit a message to the client instead
of crashing.
2016-03-04 19:21:14 +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
Alexander Kukushkin
b77daffc98
Merge branch 'master' of github.com:zalando/patroni into feature/remove-unused-code
2016-02-26 11:39:28 +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
Alexander Kukushkin
cb38e50ac1
Remove unused code
2016-02-26 08:50:53 +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
9c12eb671d
Fix unit tests
2016-02-24 12:10:58 +01:00
Oleksandr Shulgin
16b321e0a5
Add dummy cluster name to test_ctl / zookeeper
2016-02-23 17:33:15 +01:00
Oleksandr Shulgin
524cfafbbe
Don't mock get_dcs() for ZK, we are trying to test it
2016-02-23 17:18:16 +01:00