public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH v2 pve-network 0/9] SDN: Testing VNets as a blackbox.
@ 2024-04-02 16:07 Stefan Lendl
  2024-04-02 16:07 ` [pve-devel] [PATCH v2 pve-network 1/9] sdn: extract function that reads datacenter config Stefan Lendl
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: Stefan Lendl @ 2024-04-02 16:07 UTC (permalink / raw)
  To: pve-devel

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

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

-- 
2.44.0





^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2024-04-05 13:19 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-02 16:07 [pve-devel] [PATCH v2 pve-network 0/9] SDN: Testing VNets as a blackbox Stefan Lendl
2024-04-02 16:07 ` [pve-devel] [PATCH v2 pve-network 1/9] sdn: extract function that reads datacenter config Stefan Lendl
2024-04-02 16:07 ` [pve-devel] [PATCH v2 pve-network 2/9] dnsmasq: extract function to systemctl command Stefan Lendl
2024-04-02 16:07 ` [pve-devel] [PATCH v2 pve-network 3/9] dnsmasq: extract function that generates the ethers file path Stefan Lendl
2024-04-02 16:07 ` [pve-devel] [PATCH v2 pve-network 4/9] dnsmasq: extract function that updates dnsmasq lease via dbus Stefan Lendl
2024-04-02 16:07 ` [pve-devel] [PATCH v2 pve-network 5/9] controllers: extract function that reads network intreaces config Stefan Lendl
2024-04-02 16:07 ` [pve-devel] [PATCH v2 pve-network 6/9] evpn: extract function that reads frr config Stefan Lendl
2024-04-02 16:07 ` [pve-devel] [PATCH v2 pve-network 7/9] api: extract function that creates the sdn directory Stefan Lendl
2024-04-02 16:07 ` [pve-devel] [PATCH v2 pve-network 8/9] tests: test VNets functionality as a blackbox Stefan Lendl
2024-04-02 16:07 ` [pve-devel] [PATCH v2 pve-network 9/9] tests: remove old Vnets tests Stefan Lendl
2024-04-03 11:55 ` [pve-devel] [PATCH v2 pve-network 0/9] SDN: Testing VNets as a blackbox Max Carrara
2024-04-05 13:19 ` Stefan Lendl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal