diff --git a/plugin.conf b/plugin.conf index 09ef20a..7a894f1 100644 --- a/plugin.conf +++ b/plugin.conf @@ -2,7 +2,7 @@ name=alt-mysql id=alt-mysql type=user author=HITME.PL -version=1.2.10 +version=1.2.11 active=no installed=no user_run_as=root diff --git a/tests/package_archive_test.sh b/tests/package_archive_test.sh index 242d075..e7943d3 100644 --- a/tests/package_archive_test.sh +++ b/tests/package_archive_test.sh @@ -2,7 +2,7 @@ set -euo pipefail PLUGIN_DIR="$(cd "$(dirname "$0")/.." && pwd)" -ARCHIVE="${1:-$(cd "$PLUGIN_DIR/.." && pwd)/1.2.10/alt-mysql.tar.gz}" +ARCHIVE="${1:-$(cd "$PLUGIN_DIR/.." && pwd)/archives/1.2.11/alt-mysql.tar.gz}" fail() { echo "FAIL: $*" >&2 @@ -37,7 +37,7 @@ fi CONF="$(tar -xOzf "$ARCHIVE" ./plugin.conf 2>/dev/null || tar -xOzf "$ARCHIVE" plugin.conf)" printf '%s\n' "$CONF" | grep -Fxq "name=alt-mysql" || fail "archive plugin name is not alt-mysql" printf '%s\n' "$CONF" | grep -Fxq "id=alt-mysql" || fail "archive plugin id is not alt-mysql" -printf '%s\n' "$CONF" | grep -Fxq "version=1.2.10" || fail "archive plugin version is not 1.2.10" +printf '%s\n' "$CONF" | grep -Fxq "version=1.2.11" || fail "archive plugin version is not 1.2.11" SETTINGS="$(tar -xOzf "$ARCHIVE" ./plugin-settings.conf 2>/dev/null || tar -xOzf "$ARCHIVE" plugin-settings.conf)" printf '%s\n' "$SETTINGS" | grep -Fxq "PHPMYADMIN_INSTALL_DIR=/var/www/html/alt-mysql-phpmyadmin" \ diff --git a/tests/plugin_identity_test.sh b/tests/plugin_identity_test.sh index c721d72..e94c5f7 100644 --- a/tests/plugin_identity_test.sh +++ b/tests/plugin_identity_test.sh @@ -8,10 +8,13 @@ fail() { exit 1 } -[ "$(basename "$PLUGIN_DIR")" = "alt-mysql" ] || fail "plugin directory name is not alt-mysql" +case "$(basename "$PLUGIN_DIR")" in + alt-mysql|src) ;; + *) fail "plugin directory name is neither alt-mysql nor src" ;; +esac grep -Fxq "name=alt-mysql" "$PLUGIN_DIR/plugin.conf" || fail "plugin.conf name is not alt-mysql" grep -Fxq "id=alt-mysql" "$PLUGIN_DIR/plugin.conf" || fail "plugin.conf id is not alt-mysql" -grep -Fxq "version=1.2.10" "$PLUGIN_DIR/plugin.conf" || fail "plugin.conf version is not 1.2.10" +grep -Fxq "version=1.2.11" "$PLUGIN_DIR/plugin.conf" || fail "plugin.conf version is not 1.2.11" grep -Fq "return '/CMD_PLUGINS/alt-mysql';" "$PLUGIN_DIR/exec/lib/AppContext.php" \ || fail "AppContext base URL is not alt-mysql" grep -Fq "\$pluginId = 'alt-mysql';" "$PLUGIN_DIR/exec/lib/DirectAdminUser.php" \