Skip to content

Commit

Permalink
more functional tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mnaser committed Feb 19, 2025
1 parent 30242c7 commit cb9900b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions magnum_cluster_api/tests/functional/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ def _setUp(self):
self.api, namespace=self.namespace.name
)

original_get_object = self.cluster_class.get_object
original_get_resource = self.cluster_class.get_resource

def get_object_override():
resource = original_get_object()
resource = original_get_resource()
if self.mutate_callback:
self.mutate_callback(resource)
return resource
Expand Down
6 changes: 3 additions & 3 deletions magnum_cluster_api/tests/functional/test_resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,10 @@ def _test_disable_api_server_floating_ip(
)
).cluster

capi_cluster_obj = capi_cluster.get_object()
capi_cluster_obj = capi_cluster.get_resource()
capi_cluster_variables = {
item["name"]: item["value"]
for item in capi_cluster_obj.obj["spec"]["topology"]["variables"]
for item in capi_cluster_obj["spec"]["topology"]["variables"]
}

self.assertIn("disableAPIServerFloatingIP", capi_cluster_variables)
Expand Down Expand Up @@ -192,7 +192,7 @@ def setUp(self):
self.assertNotIn("extraTestVariable", cc.variable_names)

def mutate_cluster_class_extra_var(resource):
resource["metadata"] = {"name": resource.name + "-extra-var"}
resource["metadata"]["name"] += "-extra-var"
resource["spec"]["variables"].append(
{
"name": "extraTestVariable",
Expand Down

0 comments on commit cb9900b

Please sign in to comment.