Skip to content

Add foreman.target lifecycle tests (stop/start and restart) - #8

Open
pablomh wants to merge 2 commits into
masterfrom
target_tests
Open

Add foreman.target lifecycle tests (stop/start and restart)#8
pablomh wants to merge 2 commits into
masterfrom
target_tests

Conversation

@pablomh

@pablomh pablomh commented Mar 17, 2026

Copy link
Copy Markdown
Owner

Extends foreman_target_test.py with lifecycle tests intended to run at the end of the test suite. Tests that foreman.target can be cleanly stopped and restarted, and that Foreman becomes available again afterwards via the HTTPS endpoint (same curl pattern as test_https_foreman_ping in httpd_test.py).

@pablomh
pablomh force-pushed the target_tests branch 2 times, most recently from a0cba44 to a87cb0e Compare March 17, 2026 16:43
Extends foreman_target_test.py with lifecycle tests intended to run
at the end of the test suite. Tests that foreman.target can be cleanly
stopped and restarted, and that Foreman becomes available again
afterwards via the HTTPS endpoint (same curl pattern as
test_https_foreman_ping in httpd_test.py).
Foreman depends on Candlepin being fully initialised before it can
serve requests reliably. Without this ordering, foreman.service starts
simultaneously with candlepin.service, competing for CPU and disk I/O
during the JVM startup. This pushes Rails loading time close to the
default TimeoutStartSec (90s) and causes intermittent failures on
restart, particularly when the system is under load.

Because candlepin.service already declares:
  After=redis.service postgresql.service

the transitive ordering becomes:

  postgresql --+
               +--> candlepin --> foreman
  redis -------+

so explicit redis.service and postgresql.service dependencies on
foreman.service are not needed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant