test: wait for interface to come online before checking DNS scopes

The current test is flaky because it creates a new interface definition,
calls networkctl reload, and then calls resolvectl show-cache. If
resolved has not received the changes and setup the DNS scopes for the
interface, show-cache will be empty for that interface.

Part 2 of #39602
This commit is contained in:
Nick Rosbrook
2025-11-14 09:37:21 -05:00
committed by Yu Watanabe
parent 1569b1e25f
commit 3d6eb1ed42

View File

@@ -828,6 +828,7 @@ testcase_09_resolvectl_showcache() {
} > /run/systemd/network/10-dns2.network
networkctl reload
networkctl reconfigure dns2
/usr/lib/systemd/systemd-networkd-wait-online --timeout=60 --dns --interface=dns2
mkdir -p /run/systemd/resolved.conf.d/
{