Commit 3427d99e authored by Tomek Mrugalski's avatar Tomek Mrugalski 🛰
Browse files

[gitlab1] shell tests for kea-netconf implemented.

parent 1740704a
# Copyright (C) 2018 Internet Systems Consortium, Inc. ("ISC")
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at
# Path to the temporary configuration file.
# Path to the Kea log file.
# Path to the Kea lease file.
# Expected version
# Kea-netconf configuration to be stored in the configuration file.
// some configuration will be stored here eventually.
\"loggers\": [
\"name\": \"kea-netconf\",
\"output_options\": [
\"output\": \"$LOG_FILE\"
\"severity\": \"INFO\"
# Set the location of the executable.
# Import common test library.
. @abs_top_builddir@/src/lib/testutils/
# This test verifies that help can be printed out.
usage_test() {
local TESTNAME="${1}"
local PARAMS="${2}"
local EXP_CODE="${3}"
# Log the start of the test and print test name.
test_start $TESTNAME
# Remove dangling Kea instances and remove log files.
# Create correct configuration file.
create_config "${CONFIG}"
# Check it
printf "Running command %s.\n" "\"${bin_path}/${bin} -t ${CFG_FILE}\""
${bin_path}/${bin} ${PARAMS}
if [ ${exit_code} -ne $EXP_CODE ]; then
printf "ERROR: expected exit code ${EXP_CODE}, got ${exit_code}\n"
clean_exit 1
test_finish 0
version_test "netconf.version"
usage_test "netconf.invalid-param" "-f" 1
usage_test "netconf.dash-h" "-h" 1
usage_test "netconf.dash-v" "-v" 0
# The following tests are currently disabled. Once we have a parser that is
# able to understand logger configuration, those tests (imported from DHCPv4)
# should work.
#shutdown_test "netconf.sigterm_test" 15
#shutdown_test "netconf.sigint_test" 2
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment