chore: log full source hostname
This commit is contained in:
@@ -19,6 +19,7 @@ test('directadmin context derives server name from first host label', function (
|
||||
assert_same('mxtest', $ctx->username());
|
||||
assert_same('h4.domena.pl', $ctx->sourceHost());
|
||||
assert_same('h4', $ctx->serverName());
|
||||
assert_same('h4.domena.pl', $ctx->auditServerName());
|
||||
});
|
||||
|
||||
test('directadmin context uses configured source server name and trusts local server name host', function (): void {
|
||||
@@ -33,6 +34,7 @@ test('directadmin context uses configured source server name and trusts local se
|
||||
|
||||
assert_same('h4.domena.pl', $ctx->sourceHost());
|
||||
assert_same('h4', $ctx->serverName());
|
||||
assert_same('h4.domena.pl', $ctx->auditServerName());
|
||||
});
|
||||
|
||||
test('directadmin context fails closed without directadmin username', function (): void {
|
||||
|
||||
@@ -8,7 +8,7 @@ test('plugin metadata and packaging docs match project rules', function (): void
|
||||
assert_contains('name=MX-Autologin', $conf);
|
||||
assert_contains('id=mxautologin', $conf);
|
||||
assert_contains('type=user', $conf);
|
||||
assert_contains('version=1.1.4', $conf);
|
||||
assert_contains('version=1.1.5', $conf);
|
||||
assert_contains('user_run_as=root', $conf);
|
||||
assert_contains('/Users/marek/GPT/ChatGPT/da_plugins/mail-login/src', $packing);
|
||||
assert_contains('/Users/marek/GPT/ChatGPT/da_plugins/mail-login/archives/X.Y.Z/mxautologin.tar.gz', $packing);
|
||||
|
||||
@@ -84,6 +84,14 @@ test('settings do not expose deprecated mail login method switch', function ():
|
||||
assert_not_contains('MAIL_LOGIN_METHOD', $config);
|
||||
});
|
||||
|
||||
test('settings do not expose cosmetic target name setting', function (): void {
|
||||
$defaults = Settings::defaults();
|
||||
$config = file_get_contents(PLUGIN_ROOT . '/plugin-settings.conf') ?: '';
|
||||
|
||||
assert_false(array_key_exists('MAIL_LOGIN_TARGET_NAME', $defaults));
|
||||
assert_not_contains('MAIL_LOGIN_TARGET_NAME', $config);
|
||||
});
|
||||
|
||||
test('settings expose disabled plugin flag through access guard', function (): void {
|
||||
$settings = Settings::fromArray(['DEFAULT_ENABLE' => 'false']);
|
||||
assert_false($settings->defaultEnable());
|
||||
|
||||
Reference in New Issue
Block a user