Code

integration/config.sh: Add a test to load and reload a plugin.
authorSebastian Harl <sh@tokkee.org>
Fri, 16 Jan 2015 20:26:17 +0000 (21:26 +0100)
committerSebastian Harl <sh@tokkee.org>
Fri, 16 Jan 2015 20:26:17 +0000 (21:26 +0100)
t/integration/config.sh

index b25e9502988bf310664b4f39365e22c39e1146df..7f0ab959e964b6f70ab07a00f8c5d23a32750cf5 100755 (executable)
@@ -82,13 +82,38 @@ run_sysdbd -D -C "$SYSDBD_CONF"
 wait_for_sysdbd
 
 # reconfigure
-SOCKET_FILE="$SOCKET_FILE-2"
+ORIG_SOCKET="$SOCKET_FILE"
+SOCKET_FILE="$ORIG_SOCKET-2"
 cat <<EOF > "$SYSDBD_CONF"
 Listen "${SOCKET_FILE}"
 EOF
 kill -HUP $SYSDBD_PID
 wait_for_sysdbd
 
+# load plugin
+SOCKET_FILE="$ORIG_SOCKET-3"
+cat <<EOF > "$SYSDBD_CONF"
+Listen "${SOCKET_FILE}"
+PluginDir "$PLUGIN_DIR"
+LoadBackend mock_plugin
+<Backend "mock_plugin">
+</Backend>
+EOF
+kill -HUP $SYSDBD_PID
+wait_for_sysdbd
+
+# reload plugin
+SOCKET_FILE="$ORIG_SOCKET-4"
+cat <<EOF > "$SYSDBD_CONF"
+Listen "${SOCKET_FILE}"
+PluginDir "$PLUGIN_DIR"
+LoadBackend mock_plugin
+<Backend "mock_plugin">
+</Backend>
+EOF
+kill -HUP $SYSDBD_PID
+wait_for_sysdbd
+
 stop_sysdbd
 
 # vim: set tw=78 sw=4 ts=4 noexpandtab :