If only ``-p`` or ``--password`` is given, the user is prompted for a password.
If not specified at all, the ``KEA_ADMIN_DB_PASSWORD`` environment variable
is checked for a value and used if it exists.
- Otherwise the default value of ``keatest`` is used.
+ Otherwise the default value of ``1234`` is used.
``-n|--name database-name``
Specifies the name of the database to connect to. The
# specific deployment. Also used in unit tests.
db_host='localhost'
db_user='keatest'
-db_password='keatest'
+db_password='1234'
db_name='keatest'
extra_arguments=
+# Set the db_password.
+set_db_password() {
+ db_password=$1
+}
+
# Runs all the given arguments as a single command. Maintains quoting. Places
# output in ${OUTPUT} and exit code in ${EXIT_CODE}. Does not support pipes and
# redirections. Support for them could be added through eval and single
# shellcheck source=src/bin/admin/admin-utils.sh.in
. "@abs_top_builddir@/src/bin/admin/admin-utils.sh"
+# Set the test database password
+set_db_password "keatest"
+
# Set path to the production schema scripts
db_scripts_dir="@abs_top_srcdir@/src/share/database/scripts"
# shellcheck source=src/bin/admin/admin-utils.sh.in
. "@abs_top_builddir@/src/bin/admin/admin-utils.sh"
+# Set the test database password
+set_db_password "keatest"
+
# Set path to the production schema scripts
db_scripts_dir="@abs_top_srcdir@/src/share/database/scripts"
AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
AM_CPPFLAGS += $(BOOST_INCLUDES)
+if HAVE_GTEST
+AM_CPPFLAGS += -DALLOW_KEATEST
+endif
AM_CXXFLAGS = $(KEA_CXXFLAGS)
+
lib_LTLIBRARIES = libkea-cc.la
libkea_cc_la_SOURCES = base_stamped_element.cc base_stamped_element.h
libkea_cc_la_SOURCES += data.cc data.h
const std::list<std::string> DefaultCredentials::DEFAULT_CREDENTIALS = {
#ifndef IGNORE_KEA_DEFAULT_CREDENTIALS
+#ifndef ALLOW_KEATEST
+ "keatest",
+#endif
"1234", "*****"
#endif
#ifdef EXTRA_KEA_DEFAULT_CREDENTIALS
struct DefaultCredentials {
/// @brief Default credentials.
///
- /// @note Using a list as there are only two default credentials.
+ /// @note Using a list as there are only a few default credentials.
static const std::list<std::string> DEFAULT_CREDENTIALS;
/// @brief Check if the value is a default credential.
(no embedded spaces), each pair separated by a space from the others, e.g.
\code
- type=mysql user=keatest password=keatest name=keatest host=localhost
+ type=mysql user=keatest password=1234 name=keatest host=localhost
\endcode
The following keywords are used for all backends: