Skip to content

Commit

Permalink
Add CU scenario for puma worker count
Browse files Browse the repository at this point in the history
  • Loading branch information
Griffin-Sullivan committed Dec 21, 2023
1 parent 8d0d3ff commit 4261498
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions tests/foreman/destructive/test_installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,3 +147,39 @@ def test_positive_installer_certs_regenerate(target_sat):
)
assert result.status == 0
assert 'FAIL' not in target_sat.cli.Base.ping()


def test_positive_installer_puma_worker_count(target_sat):
"""Installer should set the puma worker count and thread max without having to manually
restart the foreman service.
:id: d0e7d958-dd3e-4962-bf5a-8d7ec36f3485
:steps:
1. Check how many puma workers there are by default (9)
2. Change answer's file to have 5 puma workers
3. Run satellite-installer --foreman-foreman-service-puma-workers 5 --foreman-foreman-service-puma-threads-max 5
:expectedresults: aux should show there are only 5 puma workers after installer runs
:BZ: 2025760
:customerscenario: true
"""
result = target_sat.execute('ps aux | grep -v grep | grep -e USER -e puma')
for i in range(len(9)):
assert f'cluster worker {i}' in result.stdout
target_sat.execute(f'sed -i "/foreman_service_puma_workers: / s/$/5/" {SATELLITE_ANSWER_FILE}')
result = target_sat.install(
InstallerCommand(
foreman_foreman_service_puma_workers='5',
foreman_foreman_service_puma_threads_max='5',
)
)
assert result.status == 0
result = target_sat.execute('ps aux | grep -v grep | grep -e USER -e puma')
for i in range(len(9)):
if i < 5:
assert f'cluster worker {i}' in result.stdout
else:
assert f'cluster worker {i}' not in result.stdout

0 comments on commit 4261498

Please sign in to comment.