Skip to content

Commit

Permalink
SatelliteQE#808 Ignore mirror_on_sync (SatelliteQE#809)
Browse files Browse the repository at this point in the history
* Ignore mirror_on_sync

Parameter mirror_on_sync has been added to API
in Katello PR 9834.
This is not returned as part of JSON on entity creation.
Consequently, read() fails.
It could be workarounded by ignoring errors when reading
non-required parameters. Also, this would be fixed if
Satellite started returning that value.
This solves the issue without unnecessary changes
in Nailgun's guts that might break something.

* Update test
  • Loading branch information
lhellebr authored and jyejare committed Feb 24, 2022
1 parent 67dcdaa commit 76033ec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions nailgun/entities.py
Original file line number Diff line number Diff line change
Expand Up @@ -6259,6 +6259,7 @@ def read(self, entity=None, attrs=None, ignore=None, params=None):
ignore = set()
ignore.add('organization')
ignore.add('upstream_password')
ignore.add('mirror_on_sync')
return super().read(entity, attrs, ignore, params)

def create_missing(self):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_entities.py
Original file line number Diff line number Diff line change
Expand Up @@ -1278,7 +1278,7 @@ def test_ignore_arg_v1(self):
{'discovery', 'remote_execution_proxy', 'subnet_parameters_attributes'},
),
(entities.Subscription, {'organization'}),
(entities.Repository, {'organization', 'upstream_password'}),
(entities.Repository, {'organization', 'upstream_password', 'mirror_on_sync'}),
(entities.User, {'password'}),
(entities.ScapContents, {'scap_file'}),
(entities.TailoringFile, {'scap_file'}),
Expand Down

0 comments on commit 76033ec

Please sign in to comment.