Skip to content

Commit

Permalink
Delete Certificates related tests as part of component refactor task
Browse files Browse the repository at this point in the history
  • Loading branch information
jameerpathan111 committed Apr 25, 2024
1 parent 320ff99 commit 5a07469
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 44 deletions.
2 changes: 1 addition & 1 deletion tests/foreman/api/test_discoveredhost.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ def test_positive_auto_provision_all(
:expectedresults: All discovered hosts should be auto-provisioned
successfully
:CaseAutomation: NotAutomated
:CaseAutomation: Automated
:CaseImportance: High
"""
Expand Down
2 changes: 1 addition & 1 deletion tests/foreman/api/test_operatingsystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
:Requirement: Provisioning
:CaseAutomation: NotAutomated
:CaseAutomation: Automated
:CaseComponent: Provisioning
Expand Down
4 changes: 3 additions & 1 deletion tests/foreman/api/test_provisioning.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
:Requirement: Provisioning
:CaseAutomation: NotAutomated
:CaseAutomation: Automated
:CaseComponent: Provisioning
Expand Down Expand Up @@ -733,4 +733,6 @@ def test_rhel_provisioning_using_realm():
3. Host installs right version of RHEL
4. Satellite is able to run REX job on the host
5. Host is registered to Satellite and subscription status is 'Success'
:CaseAutomation: NotAutomated
"""
41 changes: 1 addition & 40 deletions tests/foreman/sys/test_katello_certs_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,28 +157,6 @@ def test_positive_validate_katello_certs_check_output(self, cert_setup_teardown)
result = target_sat.execute(command)
self.validate_output(result, cert_data)

@pytest.mark.tier1
def test_katello_certs_check_output_wildcard_inputs(self, cert_setup_teardown):
"""Validate that katello-certs-check generates correct output with wildcard certs.
:id: 7f9da806-5b23-11eb-b7ea-d46d6dd3b5b2
:steps:
1. Get valid wildcard certs from generate_certs
2. Run katello-certs-check with the required valid arguments
katello-certs-check -c CERT_FILE -k KEY_FILE -r REQ_FILE
-b CA_BUNDLE_FILE
3. Assert the output has correct commands with options
:expectedresults: katello-certs-check should generate correct commands
with options.
"""
cert_data, target_sat = cert_setup_teardown
command = 'katello-certs-check -c certs/wildcard.crt -k certs/wildcard.key -b certs/ca.crt'
result = target_sat.execute(command)
self.validate_output(result, cert_data)

@pytest.mark.parametrize(('error', 'cert_file', 'key_file', 'ca_file'), invalid_inputs)
@pytest.mark.tier1
def test_katello_certs_check_output_invalid_input(
Expand Down Expand Up @@ -234,7 +212,7 @@ def test_negative_check_expiration_of_certificate(self, cert_setup_teardown):
:expectedresults: Checking expiration of certificate check should fail.
:CaseAutomation: NotAutomated
:CaseAutomation: Automated
"""
cert_data, target_sat = cert_setup_teardown
hostname = target_sat.hostname
Expand Down Expand Up @@ -275,20 +253,3 @@ def test_negative_validate_certificate_subject(self):
:CaseAutomation: NotAutomated
"""

@pytest.mark.stubbed
@pytest.mark.tier1
def test_negative_check_private_key_match(self):
"""Validate private key match with certificate.
:id: 358edbb3-08b0-47d7-856b-ce0d5ea95979
:steps:
1. Have KEY_FILE with invalid private key
2. Run katello-certs-check with the required arguments
:expectedresults: Private key match with the certificate should fail.
:CaseAutomation: NotAutomated
"""
26 changes: 25 additions & 1 deletion tests/upgrades/test_role.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
:Requirement: UpgradedSatellite
:CaseAutomation: NotAutomated
:CaseAutomation: Automated
:CaseComponent: UsersRoles
Expand Down Expand Up @@ -31,6 +31,8 @@ class TestOverriddenFilter:
1. The Filter should be have set override flag postupgrade
2. The locations and organizations of filter should be unchanged
postupgrade
:CaseAutomation: NotAutomated
"""

@pytest.mark.pre_upgrade
Expand All @@ -47,6 +49,8 @@ def test_pre_existing_overriden_filter(self):
:expectedresults: The role with taxonomies associated to them should
be created
:CaseAutomation: NotAutomated
"""

@pytest.mark.post_upgrade
Expand All @@ -66,6 +70,8 @@ def test_post_existing_overriden_filter(self):
1. The Filter should be have set override flag postupgrade
2. The locations and organizations of filter should be unchanged
postupgrade
:CaseAutomation: NotAutomated
"""


Expand All @@ -82,6 +88,8 @@ class TestBuiltInRolesLocked:
1. Builtin roles of satellite should be locked and non-editable
2. Built in roles of satellite should be allowed to clone
:CaseAutomation: NotAutomated
"""

@pytest.mark.post_upgrade
Expand All @@ -96,6 +104,8 @@ def test_post_builtin_roles_are_cloned(self):
1. Builtin roles of satellite should be locked and non-editable
2. Built in roles of satellite should be allowed to clone
:CaseAutomation: NotAutomated
"""


Expand All @@ -117,6 +127,8 @@ class TestNewOrganizationAdminRole:
non-editable
4. Organization Admin role of satellite should be allowed to clone
5. Taxonomies should be assigned to cloned org admin role
:CaseAutomation: NotAutomated
"""

@pytest.mark.post_upgrade
Expand All @@ -138,6 +150,8 @@ def test_post_builtin_roles_are_cloned(self):
non-editable
4. Organization Admin role of satellite should be allowed to clone
5. Taxonomies should be assigned to cloned org admin role
:CaseAutomation: NotAutomated
"""


Expand All @@ -153,6 +167,8 @@ class TestRoleAddPermission:
:expectedresults: The added permission in existing 'Default role' is intact
post upgrade
:CaseAutomation: NotAutomated
"""

@pytest.mark.pre_upgrade
Expand All @@ -165,6 +181,7 @@ def test_pre_default_role_added_permission(self, target_sat):
:expectedresults: Permission is added to existing 'Default role'.
:CaseAutomation: Automated
"""
default_role = target_sat.api.Role().search(query={'search': 'name="Default role"'})[0]
subnet_filter = target_sat.api.Filter(
Expand All @@ -183,6 +200,8 @@ def test_post_default_role_added_permission(self, target_sat):
:expectedresults: The added permission in existing 'Default role' is
intact post upgrade
:CaseAutomation: Automated
"""
default_role = target_sat.api.Role().search(query={'search': 'name="Default role"'})[0]
subnet_filter = target_sat.api.Filter().search(
Expand All @@ -207,6 +226,8 @@ class TestRoleAddPermissionWithFilter:
:expectedresults: The added permission with filter in existing
'Default role' is intact post upgrade
:CaseAutomation: NotAutomated
"""

@pytest.mark.pre_upgrade
Expand All @@ -220,6 +241,7 @@ def test_pre_default_role_added_permission_with_filter(self, target_sat):
:expectedresults: Permission with filter is added to existing
'Default role'
:CaseAutomation: Automated
"""
default_role = target_sat.api.Role().search(query={'search': 'name="Default role"'})[0]
domain_filter = target_sat.api.Filter(
Expand All @@ -241,6 +263,8 @@ def test_post_default_role_added_permission_with_filter(self, target_sat):
:expectedresults: The added permission with filter in existing
'Default role' is intact post upgrade
:CaseAutomation: Automated
"""
default_role = target_sat.api.Role().search(query={'search': 'name="Default role"'})[0]
domain_filter = target_sat.api.Filter().search(
Expand Down

0 comments on commit 5a07469

Please sign in to comment.