Skip to content

Commit

Permalink
Change authorization reference parameter name route->target
Browse files Browse the repository at this point in the history
  • Loading branch information
averevki committed Dec 5, 2023
1 parent 43db72e commit 244b2a5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions testsuite/openshift/objects/auth_config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def create_instance(
cls,
openshift: OpenShiftClient,
name,
route,
target,
labels: Dict[str, str] = None,
):
"""Creates base instance"""
Expand All @@ -52,7 +52,7 @@ def create_instance(
"spec": {"hosts": []},
}
obj = cls(model, context=openshift.context)
route.add_auth_config(obj)
target.add_auth_config(obj)
return obj

@modify
Expand Down
8 changes: 4 additions & 4 deletions testsuite/openshift/objects/auth_config/auth_policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,12 @@ class AuthPolicy(AuthConfig):
def auth_section(self):
return self.model.spec.setdefault("rules", {})

# pylint: disable=unused-argument
@classmethod
def create_instance( # type: ignore
def create_instance(
cls,
openshift: OpenShiftClient,
name,
route: Referencable,
target: Referencable,
labels: Dict[str, str] = None,
):
"""Creates base instance"""
Expand All @@ -30,7 +29,8 @@ def create_instance( # type: ignore
"kind": "AuthPolicy",
"metadata": {"name": name, "namespace": openshift.project, "labels": labels},
"spec": {
"targetRef": route.reference,
"targetRef": target.reference,
"rules": {},
},
}

Expand Down

0 comments on commit 244b2a5

Please sign in to comment.