Skip to content

Commit 9604670

Browse files
committed
Fix Discovery provisioning tests
1 parent b5a75e6 commit 9604670

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

pytest_fixtures/core/broker.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import pytest
66

77
from robottelo.config import settings
8+
from robottelo.enums import NetworkType
89
from robottelo.exceptions import ContentHostError
910
from robottelo.hosts import Satellite, lru_sat_ready_rhel
1011

@@ -112,4 +113,9 @@ def module_discovery_sat(
112113
discovery_auto.value = 'true'
113114
discovery_auto.update(['value'])
114115

116+
# Clear stale DHCP leases from provisioning setup workflow
117+
if sat.network_type == NetworkType.IPV4:
118+
assert sat.execute('cat /dev/null > /var/lib/dhcpd/dhcpd.leases').status == 0
119+
assert sat.execute('systemctl restart dhcpd').status == 0
120+
115121
return Box(sat=sat, iso=disc_img_name)

0 commit comments

Comments
 (0)