fix: harden backend synchronization
This commit is contained in:
@@ -6,6 +6,7 @@ test('packing guidelines exclude docs and allow later manual icon', function ():
|
||||
assert_contains('docs/dokumentacja.html', $packing);
|
||||
assert_contains('must not contain `docs/`', $packing);
|
||||
assert_contains('may be added later at `src/images/user_icon.svg`', $packing);
|
||||
assert_contains("scripts/package.sh", $packing);
|
||||
});
|
||||
|
||||
test('plugin metadata runs user level as root on directadmin 1.689 plus', function (): void {
|
||||
@@ -44,3 +45,15 @@ test('backend script protects custom exim config with rollback and exact section
|
||||
assert_contains('if ! awk -v section="$section" -v snippet="$snippet"', $script);
|
||||
assert_contains('if (inserted != 1)', $script);
|
||||
});
|
||||
|
||||
test('lifecycle scripts install cron sync and remove exim integration on uninstall', function (): void {
|
||||
$install = file_get_contents(PLUGIN_ROOT . '/scripts/install.sh') ?: '';
|
||||
$update = file_get_contents(PLUGIN_ROOT . '/scripts/update.sh') ?: '';
|
||||
$uninstall = file_get_contents(PLUGIN_ROOT . '/scripts/uninstall.sh') ?: '';
|
||||
|
||||
assert_contains('/etc/cron.d/global-autoresponder', $install);
|
||||
assert_contains('sync_directadmin_vacations.php', $install);
|
||||
assert_contains('/etc/cron.d/global-autoresponder', $update);
|
||||
assert_contains('sync_directadmin_vacations.php', $update);
|
||||
assert_contains('backend.sh" da', $uninstall);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user