• Multi-host networking software, autopkgtests

    From Ian Jackson@21:1/5 to All on Fri Jan 6 14:10:01 2023
    I have two packages which do vpn-like things (hippotat, secnet) which
    I want to add autopkgtests for. The two packages have similar kinds
    of requirements for their tests.

    Ideally, I would:

    * Somehow have two test nodes ("hosts")
    * With their own /etc and /var (or, relevant parts thereof,
    but it would be better to have two completely separate hosts
    so I can test that the client package works even if you don't
    have the server package installed, etc.)
    * With their own networking setups
    * With some kind of network connection between them

    All of this would have to be set up from the autopkgtest test script,
    which would need to be able to run commands in either node.

    And ideally it would be easy to run the tests from my normal dev
    environment too (without having to, say, install docker).

    Ideally it would let me properly test the service startup (init
    scripts, etc.) too for a full integration test, but if necessary that
    can be done in a separate one-host test, since the software will
    *start up* just fine even if it doesn't have a peer.

    I guess I could do something ad-hoc with mount and network namespaces
    and overlay filesystems. But it feels like this problem must have
    been solved already ?

    The part I'm not sure how to do ad-hoc is dependency management. An autopkgtest ought to use the packages desired by the autopkgtest test
    runner. So far the best option I can think of is to declare in the
    autopkgtest control file *all* the relevant packages needed for any of
    the two test nodes and the setup scripts; in each node, unshare the
    namespaces enough that I can run apt; manually uninstall the
    not-needed dependencies, and run apt autoremove.

    Ian.

    --
    Ian Jackson <ijackson@chiark.greenend.org.uk> These opinions are my own.

    Pronouns: they/he. If I emailed you from @fyvzl.net or @evade.org.uk,
    that is a private address which bypasses my fierce spamfilter.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)