[pve-devel] [PATCH v2 pve-network 0/9] SDN: Testing VNets as a blackbox.
Max Carrara
m.carrara at proxmox.com
Wed Apr 3 13:55:01 CEST 2024
On Tue Apr 2, 2024 at 6:07 PM CEST, Stefan Lendl wrote:
> This add several tests for SDN VNets.
> State setup as well as testing results is done only via the API to test on the
> API boundaries and not against the internal state. Internal state and config
> files are mocked to avoid requiring access to system files or pmxcfs.
>
> The first 7 commits extract various functions to allow mocking them in the
> tests. The tests are then added as the test_vnets_blackbox test.
> The last commit removes the old vnets tests which are not working anyway.
>
> Tests validate the events of a nic joining a Vnet or a nic staring on a vnet
> with different subnet configurations. Further descriptions in the commit.
>
> *Several of the tests fail due to known bugs and limitations.*
> These bugs where discussed off-list with @s.hanreich and due to be fixed with
> the next set of SDN patches.
> Applying the tests first would allow fixing them with already existing
> tests.
>
> Differences v1 -> v2:
> * Add tests that expect a failure when no IP can be allocated
> * Removed commented out debug stuff
Just to be sure I've looked over the individual patches again - LGTM!
I've got no complaints at all. Nice work!
I'll leave the remaining things regarding the failing tests to you and
@s.hanreich, as that's your domain ;)
>
> Stefan Lendl (9):
> sdn: extract function that reads datacenter config
> dnsmasq: extract function to systemctl command.
> dnsmasq: extract function that generates the ethers file path
> dnsmasq: extract function that updates dnsmasq lease via dbus
> controllers: extract function that reads network intreaces config
> evpn: extract function that reads frr config.
> api: extract function that creates the sdn directory.
> tests: test VNets functionality as a blackbox
> tests: remove old Vnets tests
>
> src/PVE/API2/Network/SDN/Zones.pm | 6 +-
> src/PVE/Network/SDN/Controllers.pm | 16 +-
> src/PVE/Network/SDN/Controllers/EvpnPlugin.pm | 10 +-
> src/PVE/Network/SDN/Dhcp/Dnsmasq.pm | 47 +-
> src/PVE/Network/SDN/Zones/EvpnPlugin.pm | 3 +-
> src/PVE/Network/SDN/Zones/Plugin.pm | 5 +
> src/PVE/Network/SDN/Zones/SimplePlugin.pm | 2 +-
> src/test/Makefile | 5 +-
> src/test/run_test_vnets.pl | 343 -------
> src/test/run_test_vnets_blackbox.pl | 859 ++++++++++++++++++
> 10 files changed, 925 insertions(+), 371 deletions(-)
> delete mode 100755 src/test/run_test_vnets.pl
> create mode 100755 src/test/run_test_vnets_blackbox.pl
More information about the pve-devel
mailing list