Skip to content

Commit

Permalink
Remove export_import_repo_with_GPG
Browse files Browse the repository at this point in the history
  • Loading branch information
vsedmik authored Nov 2, 2023
1 parent 3d172ce commit c845ca6
Showing 1 changed file with 0 additions and 67 deletions.
67 changes: 0 additions & 67 deletions tests/foreman/cli/test_satellitesync.py
Original file line number Diff line number Diff line change
Expand Up @@ -1459,73 +1459,6 @@ def test_postive_export_import_ansible_collection_repo(
assert len(import_product['content']) == 1
assert import_product['content'][0]['content-type'] == "ansible_collection"

@pytest.mark.tier3
def test_postive_export_import_repo_with_GPG(
self,
target_sat,
config_export_import_settings,
export_import_cleanup_function,
function_org,
function_synced_custom_repo,
function_import_org,
):
"""Test export and import of a repository with GPG key
:id: a5b455aa-e87e-4ae5-a1c7-4c8e6c7f7af5
:setup:
1. Product with synced custom repository.
:steps:
1. Create a GPG key and add it to the setup repository.
2. Export the repository and import it into another organization.
:expectedresults:
1. Export and import succeeds without any errors.
2. GPG key is imported to the importing org too.
:CaseImportance: Medium
:BZ: 2178645, 2090390
:customerscenario: true
"""
# Create a GPG key and add it to the setup repository.
gpg_key = target_sat.api.GPGKey(
organization=function_org,
content=DataFile.VALID_GPG_KEY_FILE.read_text(),
).create()
target_sat.cli.Repository.update(
{'id': function_synced_custom_repo.id, 'gpg-key-id': gpg_key.id}
)
# Export the repository and import it into another organization.
export = target_sat.cli.ContentExport.completeRepository(
{'id': function_synced_custom_repo.id}
)
import_path = target_sat.move_pulp_archive(function_org, export['message'])
target_sat.cli.ContentImport.repository(
{
'organization-id': function_import_org.id,
'path': import_path,
}
)
# Check the imported repo has the GPG key assigned.
imported_repo = target_sat.cli.Repository.info(
{
'name': function_synced_custom_repo.name,
'product': function_synced_custom_repo.product.name,
'organization-id': function_import_org.id,
}
)
assert int(imported_repo['content-counts']['packages'])
assert imported_repo['gpg-key']['name'] == gpg_key.name
# Check the GPG key is imported to the importing org too.
imported_gpg = target_sat.cli.ContentCredential.info(
{'organization-id': function_import_org.id, 'name': gpg_key.name}
)
assert imported_gpg
assert imported_gpg['content'] == gpg_key.content

@pytest.mark.tier3
@pytest.mark.parametrize(
'function_synced_rhel_repo',
Expand Down

0 comments on commit c845ca6

Please sign in to comment.