]> git.proxmox.com Git - pve-network.git/commitdiff
sdn: fix tests
authorAlexandre Derumier <aderumier@odiso.com>
Fri, 17 Nov 2023 11:39:52 +0000 (12:39 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Sat, 18 Nov 2023 14:59:50 +0000 (15:59 +0100)
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
src/test/run_test_subnets.pl
src/test/run_test_vnets.pl

index f6564e186442609e8ff4707659451568309737dd..c98359a4bcd5822d7608397853b771586f8b5bd2 100755 (executable)
@@ -109,6 +109,12 @@ foreach my $path (@plugins) {
            my $ipam_config = read_sdn_config ("$path/ipam_config");
            return $ipam_config;
        },
+       add_cache_mac_ip => sub {
+           return;
+       },
+       del_cache_mac_ip => sub {
+           return;
+       }
     );
 
     ## add_subnet
@@ -192,7 +198,7 @@ foreach my $path (@plugins) {
     $expected = '{"zones":{"myzone":{"subnets":{"'.$subnet_cidr.'":{"ips":{"'.$ip.'":{"gateway":1},"'.$ipnextfree.'":{},"'.$ip2.'":{}}}}}}}';
 
     eval {
-       $ip3 = PVE::Network::SDN::Subnets::next_free_ip($zone, $subnetid, $subnet, $hostname, $mac, $description);
+       $ip3 = PVE::Network::SDN::Subnets::add_next_free_ip($zone, $subnetid, $subnet, $hostname, $mac, $description);
     };
 
     if ($@) {
index 5aeb6767e1ccdfd20cc024d391c68a802992a7fd..dc9da67f5538163d50dafbc4fe6b5eb271d0cacb 100755 (executable)
@@ -231,7 +231,7 @@ foreach my $path (@plugins) {
     $expected = $ipam ? $cidr3 : undef;
 
     eval {
-       $result = PVE::Network::SDN::Vnets::get_next_free_cidr($vnetid, $hostname, $mac, $description, $ipversion);
+       $result = PVE::Network::SDN::Vnets::add_next_free_cidr($vnetid, $hostname, $mac, $description);
     };
 
     if ($@) {
@@ -309,7 +309,7 @@ foreach my $path (@plugins) {
     $expected = $ipam ? $cidr1 : undef;
 
     eval {
-       $result = PVE::Network::SDN::Vnets::get_next_free_cidr($vnetid, $hostname, $mac, $description, $ipversion);
+       $result = PVE::Network::SDN::Vnets::add_next_free_cidr($vnetid, $hostname, $mac, $description);
     };
 
     if ($@) {