Alexander Kukushkin
9f5276dd2b
patronictl will send authorization header if it is configured
...
username:password can be configured in the 'restapi' section of config
file or via environment
2016-06-16 12:16:16 +02:00
Alexander Kukushkin
5f4e582660
Merge branch 'master' of github.com:zalando/patroni into feature/dynamic-configuration
2016-06-09 11:04:28 +02:00
Alexander Kukushkin
50d118c3aa
Split ZooKeeper and Exhibitor
...
Originally Exhibitor was supported in the ZooKeeper class and
configuration for Exhibitor was taken also from `zookeeper` section in
the yaml config file. In fact, Exhibitor just extends ZooKeeper and now
it is reflected in the code and also Exhibitor got it's own section in
the config.yaml file. It will make it easier to configure Exhibitor
hosts and port via environment variables when PR#211 will be merged.
2016-06-08 19:21:18 +02:00
Alexander Kukushkin
b3ada161cf
Implement possibility to configure retry_timeout globally
...
Previously it was hardcoded all over the place.
2016-05-31 10:30:53 +02:00
Alexander Kukushkin
7827951c8c
Dynamic configuration
2016-05-25 14:17:05 +02:00
Alexander Kukushkin
6a4793bba8
Find and load dcs class implementation dynamically
2016-05-19 12:42:19 +02:00
Alexander Kukushkin
1741fa7e0f
Mininize number of references to dcs implementations from tests
...
where it is not necessary (test_ha, test_ctl, etc...)
It will simplyfy further refactoring and make it possible to install
implementations of AbstractDCS independant of each other.
2016-05-19 10:00:32 +02:00
Feike Steenbergen
9a79ba25ef
Fix tests
...
Remove unnecessary patching of functions.
Update mocked response to be inline with introduced config change.
2016-04-22 16:28:00 +02:00
Feike Steenbergen
c7ebe4aa63
Unify Patroni and Patronictl configuration
...
A Patroni configuration should be enough for Patronictl
The previous dcs_api url style is still supported.
To remove duplicate magic variables a DCS_DEFAULTS was introduced.
Some behaviour has changed: If you do not specify a DCS at all
(not in configuration, not on commandline, not in environment), it will
not default to etcd://localhost:4001
More test coverage for patronictl
2016-04-22 16:04:41 +02:00
Alexander Kukushkin
e4005ac76c
Join multiline string with \n
2016-04-19 10:30:04 +02:00
Alexander Kukushkin
cd6537c4d3
Refactor patroni/ctl.py
...
Until now get_dcs method was doing absolutely the same job as method
from Patroni class.
In addition to that I did small refactoring and clean up of unit tests
2016-04-18 17:36:30 +02:00
Alexander Kukushkin
3a7d2c3874
Remove unused code from unit tests
2016-03-21 20:48:17 +01:00
Alexander Kukushkin
0e0c8ed8d7
Implement delete_cluster interface in for all available dcs
...
In addition to that rename confusing `Etcd.client` and
`ZooKeeper.client` into `_client`. This attribute is available from
AbstractDCS and people had wrong impression that it provides the same
interface for different DCS implementations, which is obviously not the
case. For Etcd it has type etcd.Client and for ZooKeeper - KazooClient.
2016-03-15 16:25:48 +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
Oleksandr Shulgin
c630b60ca9
Merge remote-tracking branch 'origin/master' into bugfix/zookeeper-support-for-ctl
2016-02-23 17:12:41 +01:00
Oleksandr Shulgin
a1417875a2
Add dummy patronictl tests with ZooKeeper
2016-02-23 17:04:16 +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
dbb3e8308b
Merge branch 'master' of github.com:zalando/patroni into codequality
2016-02-22 19:20:23 +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
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
a875e93f2e
Merge branch 'master' of github.com:zalando/patroni into feature/scheduled_failover_squashed
2016-02-17 12:14:10 +01:00
Alexander Kukushkin
ab0ef91f24
Improve quality of code by resolving issues found by quantifiedcode and codacy
2016-02-12 14:52:23 +01:00
Alexander Kukushkin
36aef07738
Merge branch 'master' of github.com:zalando/patroni into codequality
2016-02-12 12:33:02 +01:00
Alexander Kukushkin
df9b8fed2e
Improve quality of code by resolving issues found by quantifiedcode and codacy
2016-02-12 12:23:49 +01:00
Feike Steenbergen
d530133f62
Fixes #133
2016-02-10 16:33:47 +01:00
Feike Steenbergen
1e2fdac891
Scheduled Failover tests
...
Add tests for the scheduled failover feature, also add more and better tests for patronictl.
2016-02-10 14:19:41 +01:00
Feike Steenbergen
29668556db
Merge pull request #112 from zalando/feature/patronictl_password
...
Feature/patronictl password
2016-02-03 17:03:49 +01:00
Alexander Kukushkin
42a5cf70e6
mock socket.getaddrinfo for patroni-ctl unit tests
2015-12-24 09:49:58 +01:00
Feike Steenbergen
6568c56c85
Patronictl: Add tests to increase coverage, fix regression issue.
2015-12-22 16:21:19 +01:00
Feike Steenbergen
f081f9d67e
Bugfix for Patronictl tests
2015-11-18 12:55:11 +01:00
Feike Steenbergen
cae025c3fb
Testing patronictl: Mock configuration and bugfix
2015-11-18 12:50:36 +01:00
Feike Steenbergen
4bb1e060c0
Bugfix for patronictl tests
2015-11-18 12:00:51 +01:00
Feike Steenbergen
ca4d9eaaf9
Patronictl: Expand tests to increase coverage
2015-11-18 11:51:24 +01:00
Feike Steenbergen
e920416114
Patronictl: Extend test cases and create own Exception class.
2015-11-16 12:36:15 +01:00
Feike Steenbergen
dcb5113f9d
Refactoring from patronicli to patronictl
2015-11-13 12:55:38 +01:00