document pod deletion
This commit is contained in:
parent
554fa2b530
commit
6f4ea06584
|
|
@ -212,8 +212,9 @@ class K8s:
|
||||||
def wait_for_logical_backup_job_creation(self):
|
def wait_for_logical_backup_job_creation(self):
|
||||||
self.wait_for_logical_backup_job(expected_num_of_jobs=1)
|
self.wait_for_logical_backup_job(expected_num_of_jobs=1)
|
||||||
|
|
||||||
def delete_operator_pod(self, step="Delete operator deplyment"):
|
def delete_operator_pod(self, step="Delete operator pod"):
|
||||||
self.api.apps_v1.patch_namespaced_deployment("postgres-operator","default", {"spec":{"template":{"metadata":{"annotations":{"step":"{}-{}".format(step, time.time())}}}}})
|
# patching the pod template in the deployment restarts the operator pod
|
||||||
|
self.api.apps_v1.patch_namespaced_deployment("postgres-operator","default", {"spec":{"template":{"metadata":{"annotations":{"step":"{}-{}".format(step, datetime.fromtimestamp(time.time()))}}}}})
|
||||||
self.wait_for_operator_pod_start()
|
self.wait_for_operator_pod_start()
|
||||||
|
|
||||||
def update_config(self, config_map_patch, step="Updating operator deployment"):
|
def update_config(self, config_map_patch, step="Updating operator deployment"):
|
||||||
|
|
|
||||||
|
|
@ -136,8 +136,6 @@ class EndToEndTestCase(unittest.TestCase):
|
||||||
# this tackles the problem when kind is reused
|
# this tackles the problem when kind is reused
|
||||||
# and the Docker image is in fact changed (dirty one)
|
# and the Docker image is in fact changed (dirty one)
|
||||||
|
|
||||||
# patch resync period, this can catch some problems with hanging e2e tests
|
|
||||||
# k8s.update_config({"data": {"resync_period":"30s"}},step="TestSuite setup")
|
|
||||||
k8s.update_config({}, step="TestSuite Startup")
|
k8s.update_config({}, step="TestSuite Startup")
|
||||||
|
|
||||||
actual_operator_image = k8s.api.core_v1.list_namespaced_pod(
|
actual_operator_image = k8s.api.core_v1.list_namespaced_pod(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue