Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typo in OpenShiftObject.committed #139

Merged
merged 1 commit into from
Oct 26, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions testsuite/openshift/objects/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def _func(self):

@functools.wraps(func)
def _wrap(self, *args, **kwargs):
if self.commited:
if self.committed:
result, _ = self.modify_and_apply(_custom_partial(func, *args, **kwargs))
assert result.status
else:
Expand All @@ -31,15 +31,15 @@ class OpenShiftObject(APIObject):
"""Custom APIObjects which tracks if the object was already committed to the server or not"""
def __init__(self, dict_to_model=None, string_to_model=None, context=None):
super().__init__(dict_to_model, string_to_model, context)
self.commited = False
self.committed = False

def commit(self):
"""
Creates object on the server and returns created entity.
It will be the same class but attributes might differ, due to server adding/rejecting some of them.
"""
self.create(["--save-config=true"])
self.commited = True
self.committed = True
return self.refresh()

def delete(self, ignore_not_found=True, cmd_args=None):
Expand Down