* 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:
Jan Mußler
2020-10-20 19:20:38 +02:00
parent 4fc8ca384d
commit c6c4c4cc8a
4 changed files with 32 additions and 8 deletions
+4 -1
View File
@@ -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)