Skip to content

Commit

Permalink
Fix Puppet tests (#12893)
Browse files Browse the repository at this point in the history
Signed-off-by: Shubham Ganar <[email protected]>
(cherry picked from commit b1150c8)
  • Loading branch information
shubhamsg199 authored and web-flow committed Oct 13, 2023
1 parent cebd2d9 commit 98214d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion robottelo/hosts.py
Original file line number Diff line number Diff line change
Expand Up @@ -1956,7 +1956,7 @@ def delete_puppet_class(self, puppetclass_name):
for hostgroup in puppet_class.read().hostgroup:
hostgroup.delete_puppetclass(data={'puppetclass_id': puppet_class.id})
# Search and remove puppet class from affected hosts
for host in self.api.Host().search(query={'search': f'class={puppet_class.name}'}):
for host in self.api.Host(puppetclass=f'{puppet_class.name}').search():
host.delete_puppetclass(data={'puppetclass_id': puppet_class.id})
# Remove puppet class entity
puppet_class.delete()
Expand Down

0 comments on commit 98214d4

Please sign in to comment.