Skip to content

Commit

Permalink
Revert remaining incorrect changes with compute_cloud_resources
Browse files Browse the repository at this point in the history
  • Loading branch information
djyasin committed Oct 10, 2024
1 parent 1a3df54 commit 245e483
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions awx/main/tests/functional/api/test_inventory.py
Original file line number Diff line number Diff line change
Expand Up @@ -572,9 +572,9 @@ def test_remove_scm_inv_src(self, delete, scm_inventory, admin_user):
delete(inv_src.get_absolute_url(), admin_user, expect=204)
assert scm_inventory.inventory_sources.count() == 0

def test_adding_inv_src_ok(self, post, compute_cloud_inventory_sources, project, admin_user):
def test_adding_inv_src_ok(self, post, scm_inventory, project, admin_user):
post(
reverse('api:inventory_inventory_sources_list', kwargs={'pk': compute_cloud_inventory_sources.id}),
reverse('api:inventory_inventory_sources_list', kwargs={'pk': scm_inventory.id}),
{
'name': 'new inv src',
'source_project': project.pk,
Expand All @@ -586,10 +586,10 @@ def test_adding_inv_src_ok(self, post, compute_cloud_inventory_sources, project,
expect=201,
)

def test_adding_inv_src_without_proj_access_prohibited(self, post, project, inventory, rando, compute_cloud_inventory_sources):
def test_adding_inv_src_without_proj_access_prohibited(self, post, project, inventory, rando):
inventory.admin_role.members.add(rando)
post(
reverse('api:inventory_inventory_sources_list', kwargs={'pk': compute_cloud_inventory_sources.id}),
reverse('api:inventory_inventory_sources_list', kwargs={'pk': inventory.id}),
{'name': 'new inv src', 'source_project': project.pk, 'source': 'scm', 'overwrite_vars': True, 'source_vars': 'plugin: a.b.c'},
rando,
expect=403,
Expand All @@ -609,12 +609,12 @@ def test_get_constructed_inventory(self, constructed_inventory, admin_user, get)
r = get(url=reverse('api:constructed_inventory_detail', kwargs={'pk': constructed_inventory.pk}), user=admin_user, expect=200)
assert r.data['update_cache_timeout'] == 53

def test_patch_constructed_inventory(self, constructed_inventory, admin_user, patch, compute_cloud_inventory_sources):
def test_patch_constructed_inventory(self, constructed_inventory, admin_user, patch):
inv_src = constructed_inventory.inventory_sources.first()
assert inv_src.update_cache_timeout == 0
assert inv_src.limit == ''
r = patch(
url=reverse('api:constructed_inventory_detail', kwargs={'pk': compute_cloud_inventory_sources.pk}),
url=reverse('api:constructed_inventory_detail', kwargs={'pk': constructed_inventory.pk}),
data=dict(update_cache_timeout=54, limit='foobar'),
user=admin_user,
expect=200,
Expand Down

0 comments on commit 245e483

Please sign in to comment.