mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-08-30 13:37:55 +00:00
[#899] fixed unittests
This commit is contained in:
@@ -45,5 +45,103 @@ RunScriptImpl::runScript(const ProcessArgs& args, const ProcessEnvVars& vars) {
|
||||
ProcessSpawn process(name_, args, vars);
|
||||
}
|
||||
|
||||
void
|
||||
RunScriptImpl::extractBoolean(isc::util::ProcessEnvVars& vars,
|
||||
const bool value,
|
||||
const std::string prefix,
|
||||
const std::string sufix) {
|
||||
}
|
||||
|
||||
void
|
||||
RunScriptImpl::extractInteger(isc::util::ProcessEnvVars& vars,
|
||||
const uint32_t value,
|
||||
const std::string prefix,
|
||||
const std::string sufix) {
|
||||
}
|
||||
|
||||
void
|
||||
RunScriptImpl::extractString(isc::util::ProcessEnvVars& vars,
|
||||
const bool value,
|
||||
const std::string prefix,
|
||||
const std::string sufix) {
|
||||
}
|
||||
|
||||
void
|
||||
RunScriptImpl::extractHWAddr(isc::util::ProcessEnvVars& vars,
|
||||
const isc::dhcp::HWAddrPtr& hwaddr,
|
||||
const std::string prefix,
|
||||
const std::string sufix) {
|
||||
}
|
||||
|
||||
void
|
||||
RunScriptImpl::extractClientID(isc::util::ProcessEnvVars& vars,
|
||||
const isc::dhcp::ClientIdPtr clientid,
|
||||
const std::string prefix,
|
||||
const std::string sufix) {
|
||||
}
|
||||
|
||||
void
|
||||
RunScriptImpl::extractOptionIA(isc::util::ProcessEnvVars& vars,
|
||||
const isc::dhcp::Option6IAPtr option6IA,
|
||||
const std::string prefix,
|
||||
const std::string sufix) {
|
||||
}
|
||||
|
||||
void
|
||||
RunScriptImpl::extractSubnet4(isc::util::ProcessEnvVars& vars,
|
||||
const isc::dhcp::Subnet4Ptr subnet4,
|
||||
const std::string prefix,
|
||||
const std::string sufix) {
|
||||
}
|
||||
|
||||
void
|
||||
RunScriptImpl::extractSubnet6(isc::util::ProcessEnvVars& vars,
|
||||
const isc::dhcp::Subnet6Ptr subnet6,
|
||||
const std::string prefix,
|
||||
const std::string sufix) {
|
||||
}
|
||||
|
||||
void
|
||||
RunScriptImpl::extractLease4(isc::util::ProcessEnvVars& vars,
|
||||
const isc::dhcp::Lease4Ptr& lease4,
|
||||
const std::string prefix,
|
||||
const std::string sufix) {
|
||||
}
|
||||
|
||||
void
|
||||
RunScriptImpl::extractLease6(isc::util::ProcessEnvVars& vars,
|
||||
const isc::dhcp::Lease6Ptr& lease6,
|
||||
const std::string prefix,
|
||||
const std::string sufix) {
|
||||
}
|
||||
|
||||
void
|
||||
RunScriptImpl::extractLeases4(isc::util::ProcessEnvVars& vars,
|
||||
const isc::dhcp::Lease4CollectionPtr& leases4,
|
||||
const std::string prefix,
|
||||
const std::string sufix) {
|
||||
}
|
||||
|
||||
void
|
||||
RunScriptImpl::extractLeases6(isc::util::ProcessEnvVars& vars,
|
||||
const isc::dhcp::Lease6CollectionPtr& leases6,
|
||||
const std::string prefix,
|
||||
const std::string sufix) {
|
||||
}
|
||||
|
||||
void
|
||||
RunScriptImpl::extractPkt4(isc::util::ProcessEnvVars& vars,
|
||||
const isc::dhcp::Pkt4Ptr& pkt4,
|
||||
const std::string prefix,
|
||||
const std::string sufix) {
|
||||
}
|
||||
|
||||
void
|
||||
RunScriptImpl::extractPkt6(isc::util::ProcessEnvVars& vars,
|
||||
const isc::dhcp::Pkt6Ptr& pkt6,
|
||||
const std::string prefix,
|
||||
const std::string sufix) {
|
||||
}
|
||||
|
||||
} // end of namespace run_script
|
||||
} // end of namespace isc
|
||||
|
@@ -4,6 +4,7 @@ AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
|
||||
AM_CPPFLAGS += -I$(top_builddir)/src/hooks/dhcp/run_script -I$(top_srcdir)/src/hooks/dhcp/run_script
|
||||
AM_CPPFLAGS += $(BOOST_INCLUDES)
|
||||
AM_CPPFLAGS += -DRUN_SCRIPT_LIB_SO=\"$(abs_top_builddir)/src/hooks/dhcp/run_script/.libs/libdhcp_run_script.so\"
|
||||
AM_CPPFLAGS += -DTEST_LOG_FILE=\"$(abs_top_builddir)/src/hooks/dhcp/run_script/tests/test.log\"
|
||||
AM_CPPFLAGS += -DINSTALL_PROG=\"$(abs_top_srcdir)/install-sh\"
|
||||
|
||||
AM_CXXFLAGS = $(KEA_CXXFLAGS)
|
||||
|
@@ -10,46 +10,77 @@
|
||||
# used.
|
||||
set -eu
|
||||
|
||||
LOG_FILE="@abs_top_builddir@/src/hooks/dhcp/run_script/tests/test.log"
|
||||
|
||||
ECHO_TO_FILE() {
|
||||
echo ${@} > ${LOG_FILE}
|
||||
}
|
||||
|
||||
ASSERT_EQ() {
|
||||
if ! test $EXPECTED = $ACTUAL; then
|
||||
ECHO_TO_FILE "Values differ:\n:
|
||||
ECHO_TO_FILE "\texpected: ${EXPECTED}\n"
|
||||
ECHO_TO_FILE "\tactual: ${ACTUAL}\n"
|
||||
ECHO_TO_FILE "FAILED"
|
||||
exit 123
|
||||
fi
|
||||
}
|
||||
|
||||
unknown_handle() {
|
||||
ECHO_TO_FILE "Unhandled function call\n"
|
||||
exit 123
|
||||
}
|
||||
|
||||
lease4_renew () {
|
||||
ECHO_TO_FILE "SUCCESS"
|
||||
}
|
||||
|
||||
lease4_expire () {
|
||||
ECHO_TO_FILE "SUCCESS"
|
||||
}
|
||||
|
||||
lease4_recover () {
|
||||
ECHO_TO_FILE "SUCCESS"
|
||||
}
|
||||
|
||||
leases4_committed () {
|
||||
ECHO_TO_FILE "SUCCESS"
|
||||
}
|
||||
|
||||
lease4_release () {
|
||||
ECHO_TO_FILE "SUCCESS"
|
||||
}
|
||||
|
||||
lease4_decline () {
|
||||
ECHO_TO_FILE "SUCCESS"
|
||||
}
|
||||
|
||||
lease6_renew () {
|
||||
ECHO_TO_FILE "SUCCESS"
|
||||
}
|
||||
|
||||
lease6_rebind () {
|
||||
ECHO_TO_FILE "SUCCESS"
|
||||
}
|
||||
|
||||
lease6_expire () {
|
||||
ECHO_TO_FILE "SUCCESS"
|
||||
}
|
||||
|
||||
lease6_recover () {
|
||||
ECHO_TO_FILE "SUCCESS"
|
||||
}
|
||||
|
||||
leases6_committed () {
|
||||
ECHO_TO_FILE "SUCCESS"
|
||||
}
|
||||
|
||||
lease6_release () {
|
||||
ECHO_TO_FILE "SUCCESS"
|
||||
}
|
||||
|
||||
lease6_decline () {
|
||||
ECHO_TO_FILE "SUCCESS"
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
|
Reference in New Issue
Block a user