]>
Commit | Line | Data |
---|---|---|
7cd87abc CH |
1 | # -*- coding: utf-8 eval: (blacken-mode 1) -*- |
2 | # SPDX-License-Identifier: ISC | |
3 | # | |
4 | # May 2 2023, Christian Hopps <chopps@labn.net> | |
5 | # | |
6 | # Copyright (c) 2023, LabN Consulting, L.L.C. | |
7 | # | |
8 | ||
9 | """ | |
10 | Verify routes present when staticd (backend client) is started after it's startup | |
11 | config, contained inside a unified configuration file, is present during launch. | |
12 | """ | |
13 | import pytest | |
14 | from lib.topogen import Topogen | |
15 | from util import _test_staticd_late_start | |
16 | ||
17 | # pytestmark = [pytest.mark.staticd, pytest.mark.mgmtd] | |
18 | pytestmark = [pytest.mark.staticd] | |
19 | ||
20 | ||
21 | @pytest.fixture(scope="module") | |
22 | def tgen(request): | |
23 | "Setup/Teardown the environment and provide tgen argument to tests" | |
24 | ||
25 | topodef = { | |
26 | "s1": ("r4",), | |
27 | } | |
28 | ||
29 | tgen = Topogen(topodef, request.module.__name__) | |
30 | tgen.start_topology() | |
31 | ||
32 | # configure mgmtd using current mgmtd config file | |
33 | tgen.gears["r4"].load_frr_config("frr.conf") | |
34 | ||
35 | # Explicit disable staticd now.. | |
36 | tgen.gears["r4"].net.daemons["staticd"] = 0 | |
37 | ||
38 | tgen.start_router() | |
39 | yield tgen | |
40 | tgen.stop_topology() | |
41 | ||
42 | ||
43 | def test_staticd_late_start(tgen): | |
44 | return _test_staticd_late_start(tgen, tgen.routers()["r4"]) |