Skip to content

Commit

Permalink
change a way to upload content into satellite (#14393)
Browse files Browse the repository at this point in the history
  • Loading branch information
vijaysawant authored Mar 14, 2024
1 parent d6e3d7f commit b950e48
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/foreman/api/test_repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -2295,13 +2295,14 @@ def test_positive_upload_file_to_file_repo(self, repo, target_sat):
:CaseAutomation: Automated
"""
repo.upload_content(files={'content': DataFile.RPM_TO_UPLOAD.read_bytes()})
with open(DataFile.FAKE_FILE_NEW_NAME, 'rb') as handle:
repo.upload_content(files={'content': handle})
assert repo.read().content_counts['file'] == 1

filesearch = target_sat.api.File().search(
query={"search": f"name={constants.RPM_TO_UPLOAD}"}
query={"search": f"name={constants.FAKE_FILE_NEW_NAME}"}
)
assert filesearch[0].name == constants.RPM_TO_UPLOAD
assert filesearch[0].name == constants.FAKE_FILE_NEW_NAME

@pytest.mark.tier1
@pytest.mark.upgrade
Expand Down

0 comments on commit b950e48

Please sign in to comment.