Giving operator 1 second to startup.
This commit is contained in:
		
							parent
							
								
									cabb7bc59f
								
							
						
					
					
						commit
						30cd4edd09
					
				|  | @ -69,7 +69,10 @@ class K8s: | |||
|         return m, r | ||||
| 
 | ||||
|     def wait_for_operator_pod_start(self): | ||||
|         self. wait_for_pod_start("name=postgres-operator")         | ||||
|         self.wait_for_pod_start("name=postgres-operator") | ||||
|         # give operator time to subscribe to objects | ||||
|         time.sleep(1) | ||||
|         return True | ||||
| 
 | ||||
|     def get_operator_pod(self): | ||||
|         pods = self.api.core_v1.list_namespaced_pod( | ||||
|  | @ -105,6 +108,7 @@ class K8s: | |||
| 
 | ||||
|             time.sleep(self.RETRY_TIMEOUT_SEC) | ||||
| 
 | ||||
| 
 | ||||
|     def get_service_type(self, svc_labels, namespace='default'): | ||||
|         svc_type = '' | ||||
|         svcs = self.api.core_v1.list_namespaced_service(namespace, label_selector=svc_labels, limit=1).items | ||||
|  |  | |||
|  | @ -860,6 +860,15 @@ class EndToEndTestCase(unittest.TestCase): | |||
|             print('Operator log: {}'.format(k8s.get_operator_log())) | ||||
|             raise | ||||
| 
 | ||||
|         #reset configmap | ||||
|         patch_delete_annotations = { | ||||
|             "data": { | ||||
|                 "delete_annotation_date_key": "", | ||||
|                 "delete_annotation_name_key": "" | ||||
|             } | ||||
|         } | ||||
|         k8s.update_config(patch_delete_annotations) | ||||
| 
 | ||||
|     def get_failover_targets(self, master_node, replica_nodes): | ||||
|         ''' | ||||
|            If all pods live on the same node, failover will happen to other worker(s) | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue