Skip to content

Commit

Permalink
partition table fix (#14808)
Browse files Browse the repository at this point in the history
  • Loading branch information
pondrejk authored Apr 22, 2024
1 parent 546bc75 commit 6817de4
Showing 1 changed file with 4 additions and 18 deletions.
22 changes: 4 additions & 18 deletions tests/foreman/cli/test_partitiontable.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def test_positive_create_with_one_character_name(self, name, target_sat):
strict=True,
)
)
)
),
)
def test_positive_crud_with_name(self, name, new_name, module_target_sat):
"""Create, read, update and delete Partition Tables with different names
Expand Down Expand Up @@ -86,23 +86,9 @@ def test_positive_create_with_content(self, module_target_sat):
:CaseImportance: Critical
"""
content = 'Fake ptable'
ptable = module_target_sat.cli_factory.make_partition_table({'content': content})
ptable_content = module_target_sat.cli.PartitionTable().dump({'id': ptable['id']})
assert content in ptable_content

@pytest.mark.tier1
@pytest.mark.upgrade
def test_positive_create_with_content_length(self, module_target_sat):
"""Create a Partition Table with content length more than 4096 chars
:id: 59e6f9ef-85c2-4229-8831-00edb41b19f4
:expectedresults: Partition Table is created and has correct content
:BZ: 1270181
"""
content = gen_string('alpha', 5000)
ptable = module_target_sat.cli_factory.make_partition_table({'content': content})
filename = gen_string('alpha', 10)
module_target_sat.execute(f'echo {content} > {filename}')
ptable = module_target_sat.cli_factory.make_partition_table({'file': filename})
ptable_content = module_target_sat.cli.PartitionTable().dump({'id': ptable['id']})
assert content in ptable_content

Expand Down

0 comments on commit 6817de4

Please sign in to comment.