Parcourir la source

Prepare radius test

Olivier Le Brouster il y a 7 ans
Parent
commit
7de07f4ba9

+ 1 - 0
configure.ac

@@ -1641,6 +1641,7 @@ AC_CONFIG_FILES([Makefile
                  src/bin/admin/tests/memfile_tests.sh
                  src/bin/admin/tests/mysql_tests.sh
                  src/bin/admin/tests/pgsql_tests.sh
+                 src/bin/admin/tests/radius_tests.sh
                  src/bin/agent/Makefile
                  src/bin/agent/tests/Makefile
                  src/bin/agent/tests/ca_process_tests.sh

+ 1 - 0
src/bin/admin/tests/.gitignore

@@ -2,3 +2,4 @@
 /mysql_tests.sh
 /pgsql_tests.sh
 /cql_tests.sh
+/radius_tests.sh

+ 6 - 1
src/bin/admin/tests/Makefile.am

@@ -13,6 +13,11 @@ endif
 if HAVE_CQL
 SHTESTS += cql_tests.sh
 endif
+
+if HAVE_RADCLI
+SHTESTS += radius_tests.sh
+endif
+
 noinst_SCRIPTS = $(SHTESTS)
 
 EXTRA_DIST = dhcpdb_create_1.0.mysql
@@ -20,7 +25,7 @@ EXTRA_DIST += dhcpdb_create_1.0.pgsql
 EXTRA_DIST += dhcpdb_create_1.0.cql
 
 CLEANFILES = *.log
-DISTCLEANFILES = memfile_tests.sh mysql_tests.sh pgsql_tests.sh cql_tests.sh
+DISTCLEANFILES = memfile_tests.sh mysql_tests.sh pgsql_tests.sh cql_tests.sh radius_tests.sh
 
 # Execute all test scripts.
 check-local:

+ 26 - 0
src/bin/admin/tests/radius_tests.sh.in

@@ -0,0 +1,26 @@
+#!/bin/sh
+
+# Copyright (C) 2014-2017 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 http://mozilla.org/MPL/2.0/.
+
+# Include common test library.
+. @abs_top_builddir@/src/lib/testutils/dhcp_test_lib.sh
+
+# Include admin utilities
+. @abs_top_srcdir@/src/bin/admin/admin-utils.sh
+
+# Set path to the production schema scripts
+db_scripts_dir=@abs_top_srcdir@/src/share/database/scripts
+
+db_user="keatest"
+db_password="keatest"
+db_name="keatest"
+
+# Set location of the kea-admin.
+keaadmin=@abs_top_builddir@/src/bin/admin/kea-admin
+
+# TODO: radius test. Be happy!
+assert_eq 0 1 "You need to write radius test. Be happy ! (expected status code %d, returned %d)"