From 82a6365993a3c6650c39a1bca3ec3ccba827b763 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 4 May 2024 20:07:29 +0200 Subject: Adding debian version 1:10.5.12-1. Signed-off-by: Daniel Baumann --- debian/tests/smoke | 109 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 debian/tests/smoke (limited to 'debian/tests/smoke') diff --git a/debian/tests/smoke b/debian/tests/smoke new file mode 100644 index 00000000..4469205c --- /dev/null +++ b/debian/tests/smoke @@ -0,0 +1,109 @@ +#!/bin/sh +# dep8 smoke test for mysql-server +# Author: Robie Basak +# +# This test should be declared in debian/tests/control with a dependency +# on the package that provides a configured MariaDB server (eg. +# mariadb-server-10.5). +# +# This test should be declared in debian/tests/control with the +# following restrictions: +# +# needs-root (to be able to log into the database) +# allow-stderr +# +# This test: +# +# 1) Creates a test database and test user as the root user. +# +# 2) Creates a test table and checks it appears to operate normally +# using the test user and test database. +# +# 3) Checks compression support for InnoDB & RocksDB engine. + +echo "Running test 'smoke'" +set -ex + +# Start the daemon if it was not running. For example in Docker testing +# environments there might not be any systemd et al and the service needs to +# be started manually. +if ! which systemctl +then + if ! /etc/init.d/mariadb status + then + echo "Did not find systemctl and daemon was not running, starting it.." + /etc/init.d/mariadb start + fi +else + # If systemd (and systemctl) is available, but the service did not start, then + # this smoke test is supposed to fail if next commands don't work. + echo "Found systemctl, continuing smoke test.." +fi + +mysql <&2 + exit 1 +fi + +mysql --user=testuser --password=testpassword testdatabase <&2 + exit 1 + fi + done +else + ! dpkg-query -W $plugin +fi -- cgit v1.2.3