more rename, mostly in test

This commit is contained in:
Seth Foster
2021-04-29 11:58:41 -04:00
parent a695274cb6
commit 7a63785255
105 changed files with 616 additions and 625 deletions

View File

@@ -29,7 +29,7 @@ def test_create_machine_credential(run_module, admin_user, organization, silence
ct = CredentialType.defaults['ssh']()
ct.save()
# Example from docs
result = run_module('tower_credential', dict(name='Test Machine Credential', organization=organization.name, kind='ssh', state='present'), admin_user)
result = run_module('credential', dict(name='Test Machine Credential', organization=organization.name, kind='ssh', state='present'), admin_user)
assert not result.get('failed', False), result.get('msg', result)
assert result.get('changed'), result
@@ -48,7 +48,7 @@ def test_create_vault_credential(run_module, admin_user, organization, silence_d
ct.save()
result = run_module(
'tower_credential',
'credential',
dict(name='Test Vault Credential', organization=organization.name, kind='vault', vault_id='bar', vault_password='foobar', state='present'),
admin_user,
)
@@ -67,7 +67,7 @@ def test_create_vault_credential(run_module, admin_user, organization, silence_d
@pytest.mark.django_db
def test_ct_precedence_over_kind(run_module, admin_user, organization, cred_type, silence_deprecation):
result = run_module(
'tower_credential', dict(name='A credential', organization=organization.name, kind='ssh', credential_type=cred_type.name, state='present'), admin_user
'credential', dict(name='A credential', organization=organization.name, kind='ssh', credential_type=cred_type.name, state='present'), admin_user
)
assert not result.get('failed', False), result.get('msg', result)
@@ -82,7 +82,7 @@ def test_input_overrides_old_fields(run_module, admin_user, organization, silenc
ct = CredentialType.defaults['vault']()
ct.save()
result = run_module(
'tower_credential',
'credential',
dict(
name='A Vault credential',
organization=organization.name,
@@ -103,7 +103,7 @@ def test_input_overrides_old_fields(run_module, admin_user, organization, silenc
@pytest.mark.django_db
def test_missing_credential_type(run_module, admin_user, organization):
Organization.objects.create(name='test-org')
result = run_module('tower_credential', dict(name='A credential', organization=organization.name, credential_type='foobar', state='present'), admin_user)
result = run_module('credential', dict(name='A credential', organization=organization.name, credential_type='foobar', state='present'), admin_user)
assert result.get('failed', False), result
assert 'credential_type' in result['msg']
assert 'foobar' in result['msg']
@@ -113,7 +113,7 @@ def test_missing_credential_type(run_module, admin_user, organization):
@pytest.mark.django_db
def test_make_use_of_custom_credential_type(run_module, organization, admin_user, cred_type):
result = run_module(
'tower_credential',
'credential',
dict(name='Galaxy Token for Steve', organization=organization.name, credential_type=cred_type.name, inputs={'token': '7rEZK38DJl58A7RxA6EC7lLvUHbBQ1'}),
admin_user,
)
@@ -137,7 +137,7 @@ def test_secret_field_write_twice(run_module, organization, admin_user, cred_typ
val2 = '7rEZ238DJl5837rxA6xxxlLvUHbBQ1'
for val in (val1, val2):
result = run_module(
'tower_credential',
'credential',
dict(
name='Galaxy Token for Steve',
organization=organization.name,