mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-17 18:50:20 +02:00
* Make lazy upgrade test work reliable
* Allow Docker image to take parameters to overwrite unittest execution * Add documentation for running individual tests * Fixed String encoding in Patorni state check and error case
This commit is contained in:
@@ -1069,7 +1069,10 @@ class K8s:
|
||||
stderr=subprocess.PIPE)
|
||||
|
||||
def get_patroni_state(self, pod):
|
||||
return json.loads(self.exec_with_kubectl(pod, "patronictl list -f json").stdout)
|
||||
r = self.exec_with_kubectl(pod, "patronictl list -f json")
|
||||
if not r.returncode == 0 or not r.stdout.decode()[0:1]=="[":
|
||||
return []
|
||||
return json.loads(r.stdout.decode())
|
||||
|
||||
def get_patroni_running_members(self, pod):
|
||||
result = self.get_patroni_state(pod)
|
||||
|
||||
Reference in New Issue
Block a user