2222from acktest .k8s import resource as k8s
2323
2424CONDITION_TYPE_ADOPTED = "ACK.Adopted"
25- CONDITION_TYPE_RESOURCE_SYNCED = "ACK.ResourceSynced "
25+ CONDITION_TYPE_READY = "Ready "
2626CONDITION_TYPE_TERMINAL = "ACK.Terminal"
2727CONDITION_TYPE_RECOVERABLE = "ACK.Recoverable"
2828CONDITION_TYPE_ADVISORY = "ACK.Advisory"
3131
3232def assert_type_status (
3333 ref : k8s .CustomResourceReference ,
34- cond_type_match : str = CONDITION_TYPE_RESOURCE_SYNCED ,
34+ cond_type_match : str = CONDITION_TYPE_READY ,
3535 cond_status_match : bool = True ,
3636):
3737 """Asserts that the supplied resource has a condition of type
38- ACK.ResourceSynced and that the Status of this condition is True.
38+ Ready and that the Status of this condition is True.
3939
4040 Usage:
4141 from acktest.k8s import resource as k8s
@@ -50,7 +50,7 @@ def assert_type_status(
5050 k8s.wait_resource_consumed_by_controller(ref)
5151 condition.assert_type_status(
5252 ref,
53- condition.CONDITION_TYPE_RESOURCE_SYNCED ,
53+ condition.CONDITION_TYPE_READY ,
5454 False)
5555
5656 Raises:
@@ -75,7 +75,7 @@ def assert_synced_status(
7575 cond_status_match : bool ,
7676):
7777 """Asserts that the supplied resource has a condition of type
78- ACK.ResourceSynced and that the Status of this condition is True.
78+ Ready and that the Status of this condition is True.
7979
8080 Usage:
8181 from acktest.k8s import resource as k8s
@@ -91,15 +91,15 @@ def assert_synced_status(
9191 condition.assert_synced_status(ref, False)
9292
9393 Raises:
94- pytest.fail when ACK.ResourceSynced condition is not found or is not in
94+ pytest.fail when Ready condition is not found or is not in
9595 a True status.
9696 """
97- assert_type_status (ref , CONDITION_TYPE_RESOURCE_SYNCED , cond_status_match )
97+ assert_type_status (ref , CONDITION_TYPE_READY , cond_status_match )
9898
9999
100- def assert_synced (ref : k8s .CustomResourceReference ):
100+ def assert_ready (ref : k8s .CustomResourceReference ):
101101 """Asserts that the supplied resource has a condition of type
102- ACK.ResourceSynced and that the Status of this condition is True.
102+ Ready and that the Status of this condition is True.
103103
104104 Usage:
105105 from acktest.k8s import resource as k8s
@@ -112,18 +112,18 @@ def assert_synced(ref: k8s.CustomResourceReference):
112112 )
113113 k8s.create_custom_resource(ref, resource_data)
114114 k8s.wait_resource_consumed_by_controller(ref)
115- condition.assert_synced (ref)
115+ condition.assert_ready (ref)
116116
117117 Raises:
118- pytest.fail when ACK.ResourceSynced condition is not found or is not in
118+ pytest.fail when Ready condition is not found or is not in
119119 a True status.
120120 """
121121 return assert_synced_status (ref , True )
122122
123123
124- def assert_not_synced (ref : k8s .CustomResourceReference ):
124+ def assert_not_ready (ref : k8s .CustomResourceReference ):
125125 """Asserts that the supplied resource has a condition of type
126- ACK.ResourceSynced and that the Status of this condition is False.
126+ Ready and that the Status of this condition is False.
127127
128128 Usage:
129129 from acktest.k8s import resource as k8s
@@ -136,10 +136,10 @@ def assert_not_synced(ref: k8s.CustomResourceReference):
136136 )
137137 k8s.create_custom_resource(ref, resource_data)
138138 k8s.wait_resource_consumed_by_controller(ref)
139- condition.assert_not_synced (ref)
139+ condition.assert_not_ready (ref)
140140
141141 Raises:
142- pytest.fail when ACK.ResourceSynced condition is not found or is not in
142+ pytest.fail when Ready condition is not found or is not in
143143 a False status.
144144 """
145145 return assert_synced_status (ref , False )
0 commit comments