testlib: default nix fixture to also test all daemon protocols (3/3)
This is the real deal. The new tests have surfaced one bug in the test suite itself, and one in the RPC legacy protocol wrapper. Co-authored-by: eldritch horrors <pennae@lix.systems> Change-Id: Id75b671c10b45655d3627abd88563e2d41719446
This commit is contained in:
committed by
eldritch horrors
co-authored by
eldritch horrors
parent
12c1132f07
commit
7ef274600d
@@ -898,6 +898,7 @@ static void processLegacyRequests(
|
||||
debug("performing daemon worker op: %d", op);
|
||||
|
||||
try {
|
||||
KJ_DEFER(aio.blockOn(logger->flush()));
|
||||
performOp(aio, tunnelLogger, store, trusted, clientVersion, from, to, op);
|
||||
} catch (Error & e) {
|
||||
/* If we're not in a state where we can send replies, then
|
||||
|
||||
@@ -12,6 +12,7 @@ def test_legacy_sockets_always_appear(nix: Nix, daemon: NixDaemon):
|
||||
assert (sockets_dir / "socket").is_socket()
|
||||
|
||||
|
||||
@pytest.mark.no_daemon # We do the daemon config ourselves here
|
||||
@pytest.mark.parametrize("daemon", ["legacy"], indirect=True)
|
||||
def test_xp_sockets_dont_always_appear(nix: Nix, daemon: NixDaemon):
|
||||
sockets_dir = nix.env.dirs.nix_state_dir / "daemon-socket"
|
||||
|
||||
@@ -445,9 +445,7 @@ def pytest_generate_tests(metafunc: pytest.Metafunc):
|
||||
if "nix" not in metafunc.fixturenames or "daemon" in metafunc.fixturenames:
|
||||
return
|
||||
if not list(metafunc.definition.iter_markers("no_daemon")):
|
||||
protocols = [None, "legacy-combined", "legacy"]
|
||||
# do not enable them the protocols for now
|
||||
# protocols += daemon_protocols # noqa ERA001
|
||||
protocols = [None, *daemon_protocols]
|
||||
ids = protocols
|
||||
metafunc.parametrize("nix", protocols, indirect=True, ids=ids)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user