undo incorrect merge from the master
This commit is contained in:
parent
35a2e45014
commit
b91a264369
|
|
@ -10,6 +10,7 @@ import yaml
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from kubernetes import client, config
|
from kubernetes import client, config
|
||||||
|
|
||||||
|
|
||||||
def to_selector(labels):
|
def to_selector(labels):
|
||||||
return ",".join(["=".join(l) for l in labels.items()])
|
return ",".join(["=".join(l) for l in labels.items()])
|
||||||
|
|
||||||
|
|
@ -216,7 +217,8 @@ class EndToEndTestCase(unittest.TestCase):
|
||||||
k8s = self.k8s
|
k8s = self.k8s
|
||||||
# update infrastructure roles description
|
# update infrastructure roles description
|
||||||
secret_name = "postgresql-infrastructure-roles"
|
secret_name = "postgresql-infrastructure-roles"
|
||||||
roles = "secretname: postgresql-infrastructure-roles-new, userkey: user, rolekey: memberof, passwordkey: password, defaultrolevalue: robot_zmon"
|
roles = "secretname: postgresql-infrastructure-roles-new, \
|
||||||
|
userkey: user, rolekey: memberof, passwordkey: password, defaultrolevalue: robot_zmon"
|
||||||
patch_infrastructure_roles = {
|
patch_infrastructure_roles = {
|
||||||
"data": {
|
"data": {
|
||||||
"infrastructure_roles_secret_name": secret_name,
|
"infrastructure_roles_secret_name": secret_name,
|
||||||
|
|
@ -313,7 +315,8 @@ class EndToEndTestCase(unittest.TestCase):
|
||||||
image0 = k8s.get_effective_pod_image(pod0)
|
image0 = k8s.get_effective_pod_image(pod0)
|
||||||
image1 = k8s.get_effective_pod_image(pod1)
|
image1 = k8s.get_effective_pod_image(pod1)
|
||||||
|
|
||||||
assert_msg = "Disabling lazy upgrade failed: pods still have different images {} and {}".format(image0, image1)
|
assert_msg = "Disabling lazy upgrade failed: pods still have different \
|
||||||
|
images {} and {}".format(image0, image1)
|
||||||
self.assertEqual(image0, image1, assert_msg)
|
self.assertEqual(image0, image1, assert_msg)
|
||||||
|
|
||||||
except timeout_decorator.TimeoutError:
|
except timeout_decorator.TimeoutError:
|
||||||
|
|
@ -710,11 +713,11 @@ class EndToEndTestCase(unittest.TestCase):
|
||||||
time.sleep(10)
|
time.sleep(10)
|
||||||
|
|
||||||
# add annotations to manifest
|
# add annotations to manifest
|
||||||
deleteDate = datetime.today().strftime('%Y-%m-%d')
|
delete_date = datetime.today().strftime('%Y-%m-%d')
|
||||||
pg_patch_delete_annotations = {
|
pg_patch_delete_annotations = {
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"annotations": {
|
"annotations": {
|
||||||
"delete-date": deleteDate,
|
"delete-date": delete_date,
|
||||||
"delete-clustername": "acid-minimal-cluster",
|
"delete-clustername": "acid-minimal-cluster",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -731,22 +734,7 @@ class EndToEndTestCase(unittest.TestCase):
|
||||||
k8s.api.custom_objects_api.delete_namespaced_custom_object(
|
k8s.api.custom_objects_api.delete_namespaced_custom_object(
|
||||||
"acid.zalan.do", "v1", "default", "postgresqls", "acid-minimal-cluster")
|
"acid.zalan.do", "v1", "default", "postgresqls", "acid-minimal-cluster")
|
||||||
|
|
||||||
# wait a little before proceeding
|
# wait until cluster is deleted
|
||||||
time.sleep(10)
|
|
||||||
|
|
||||||
# add annotations to the postgresql object
|
|
||||||
deleteDate = datetime.today().strftime('%Y-%m-%d')
|
|
||||||
pg_patch_delete_annotations = {
|
|
||||||
"metadata": {
|
|
||||||
"annotations": {
|
|
||||||
"delete-date": deleteDate,
|
|
||||||
"delete-clustername": "acid-minimal-cluster",
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
k8s.api.custom_objects_api.patch_namespaced_custom_object(
|
|
||||||
"acid.zalan.do", "v1", "default", "postgresqls", "acid-minimal-cluster", pg_patch_delete_annotations)
|
|
||||||
# wait until cluster is deleted
|
|
||||||
time.sleep(120)
|
time.sleep(120)
|
||||||
|
|
||||||
# check if everything has been deleted
|
# check if everything has been deleted
|
||||||
|
|
@ -762,7 +750,6 @@ class EndToEndTestCase(unittest.TestCase):
|
||||||
print('Operator log: {}'.format(k8s.get_operator_log()))
|
print('Operator log: {}'.format(k8s.get_operator_log()))
|
||||||
raise
|
raise
|
||||||
|
|
||||||
|
|
||||||
def get_failover_targets(self, master_node, replica_nodes):
|
def get_failover_targets(self, master_node, replica_nodes):
|
||||||
'''
|
'''
|
||||||
If all pods live on the same node, failover will happen to other worker(s)
|
If all pods live on the same node, failover will happen to other worker(s)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue