2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-31 14:05:33 +00:00

[#1405] regenerated and fixed unittests

This commit is contained in:
Razvan Becheriu
2020-11-11 23:35:42 +02:00
parent fbeb246d06
commit 8ee04fac55
6 changed files with 915 additions and 1723 deletions

View File

@@ -1481,7 +1481,7 @@ mysql_reservation_mode_upgrade_test() {
run_statement "#4_shared_global" "$qry" 1
# Test ALL (3) -> false, true, false
qry="select count(id) from dhcp4_shared_network where reservation_global = false and reservations_in_subnet = true and reservations_out_of_pool = false name = 'test3';"
qry="select count(id) from dhcp4_shared_network where reservations_global = false and reservations_in_subnet = true and reservations_out_of_pool = false and name = 'test3';"
run_statement "#4_shared_all" "$qry" 1
# Test DISABLED (0) -> false, false, false

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -535,7 +535,8 @@ isAllocated(const asiolink::IOAddress& prefix, const uint8_t prefix_len) const {
ConstHostPtr
AllocEngine::ClientContext6::currentHost() const {
Subnet6Ptr subnet = host_subnet_ ? host_subnet_ : subnet_;
if (subnet && subnet->getReservationsInSubnet()) {
if (subnet && (subnet->getReservationsInSubnet() ||
subnet->getReservationsOutOfPool())) {
auto host = hosts_.find(subnet->getID());
if (host != hosts_.cend()) {
return (host->second);
@@ -3242,7 +3243,8 @@ AllocEngine::ClientContext4::ClientContext4(const Subnet4Ptr& subnet,
ConstHostPtr
AllocEngine::ClientContext4::currentHost() const {
if (subnet_ && subnet_->getReservationsInSubnet()) {
if (subnet_ && (subnet_->getReservationsInSubnet() ||
subnet_->getReservationsOutOfPool())) {
auto host = hosts_.find(subnet_->getID());
if (host != hosts_.cend()) {
return (host->second);

View File

@@ -1,4 +1,4 @@
// File created from ../../../src/lib/dhcpsrv/dhcpsrv_messages.mes on Fri Oct 23 2020 14:07
// File created from ../../../src/lib/dhcpsrv/dhcpsrv_messages.mes on Wed Nov 11 2020 19:52
#include <cstddef>
#include <log/message_types.h>
@@ -87,6 +87,7 @@ extern const isc::log::MessageID DHCPSRV_CQL_LEASE_EXCEPTION_THROWN = "DHCPSRV_C
extern const isc::log::MessageID DHCPSRV_CQL_ROLLBACK = "DHCPSRV_CQL_ROLLBACK";
extern const isc::log::MessageID DHCPSRV_CQL_UPDATE_ADDR4 = "DHCPSRV_CQL_UPDATE_ADDR4";
extern const isc::log::MessageID DHCPSRV_CQL_UPDATE_ADDR6 = "DHCPSRV_CQL_UPDATE_ADDR6";
extern const isc::log::MessageID DHCPSRV_DEPRECATED_RESERVATION_MODE = "DHCPSRV_DEPRECATED_RESERVATION_MODE";
extern const isc::log::MessageID DHCPSRV_DHCP4O6_RECEIVED_BAD_PACKET = "DHCPSRV_DHCP4O6_RECEIVED_BAD_PACKET";
extern const isc::log::MessageID DHCPSRV_DHCP_DDNS_ERROR_EXCEPTION = "DHCPSRV_DHCP_DDNS_ERROR_EXCEPTION";
extern const isc::log::MessageID DHCPSRV_DHCP_DDNS_HANDLER_NULL = "DHCPSRV_DHCP_DDNS_HANDLER_NULL";
@@ -336,6 +337,7 @@ const char* values[] = {
"DHCPSRV_CQL_ROLLBACK", "rolling back Cassandra database.",
"DHCPSRV_CQL_UPDATE_ADDR4", "updating IPv4 lease for address %1",
"DHCPSRV_CQL_UPDATE_ADDR6", "updating IPv6 lease for address %1",
"DHCPSRV_DEPRECATED_RESERVATION_MODE", "deprecated reservation-mode parameter; use reservations-global, reservations-in-subnet and reservations-out-of-pool instead.",
"DHCPSRV_DHCP4O6_RECEIVED_BAD_PACKET", "received bad DHCPv4o6 packet: %1",
"DHCPSRV_DHCP_DDNS_ERROR_EXCEPTION", "error handler for DHCP_DDNS IO generated an expected exception: %1",
"DHCPSRV_DHCP_DDNS_HANDLER_NULL", "error handler for DHCP_DDNS IO is not set.",

View File

@@ -1,4 +1,4 @@
// File created from ../../../src/lib/dhcpsrv/dhcpsrv_messages.mes on Fri Oct 23 2020 14:07
// File created from ../../../src/lib/dhcpsrv/dhcpsrv_messages.mes on Wed Nov 11 2020 19:52
#ifndef DHCPSRV_MESSAGES_H
#define DHCPSRV_MESSAGES_H
@@ -88,6 +88,7 @@ extern const isc::log::MessageID DHCPSRV_CQL_LEASE_EXCEPTION_THROWN;
extern const isc::log::MessageID DHCPSRV_CQL_ROLLBACK;
extern const isc::log::MessageID DHCPSRV_CQL_UPDATE_ADDR4;
extern const isc::log::MessageID DHCPSRV_CQL_UPDATE_ADDR6;
extern const isc::log::MessageID DHCPSRV_DEPRECATED_RESERVATION_MODE;
extern const isc::log::MessageID DHCPSRV_DHCP4O6_RECEIVED_BAD_PACKET;
extern const isc::log::MessageID DHCPSRV_DHCP_DDNS_ERROR_EXCEPTION;
extern const isc::log::MessageID DHCPSRV_DHCP_DDNS_HANDLER_NULL;