Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[6.15.z] Preserve Capsule host for build sanity failures #17099

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 7 additions & 12 deletions pytest_fixtures/core/xdist.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import pytest

from robottelo.config import configure_airgun, configure_nailgun, settings
from robottelo.hosts import Capsule, Satellite
from robottelo.hosts import ContentHost, Satellite
from robottelo.logging import logger


Expand All @@ -17,17 +17,12 @@ def align_to_satellite(request, worker_id, satellite_factory):
settings.set("server.hostname", None)
yield
# Checkout Sanity Capsule finally
if settings.capsule.hostname:
sanity_cap = Capsule.get_host_by_hostname(settings.capsule.hostname)
sanity_cap.unregister()
Broker(hosts=[sanity_cap]).checkin()
# Checkout Sanity Satellite finally
if settings.server.hostname:
sanity_sat = Satellite(settings.server.hostname)
sanity_sat.unregister()
if settings.server.auto_checkin:
broker_sat = Satellite.get_host_by_hostname(sanity_sat.hostname)
Broker(hosts=[broker_sat]).checkin()
for host in [settings.capsule.hostname, settings.server.hostname]:
if host:
sanity_host = ContentHost.get_host_by_hostname(host)
if settings.server.auto_checkin:
sanity_host.unregister()
Broker(hosts=[sanity_host]).checkin()
else:
# clear any hostname that may have been previously set
settings.set("server.hostname", None)
Expand Down
Loading