Kernel::Test::Role::Environment::HandlesDaemonState

NAME

Kernel::Test::Role::Environment::HandlesDaemonState – role to check the daemon is/isn't running.

PUBLIC INTERFACE

has 'NeedsRunningDaemon'

this attribute controls if the daemon is expected to be running or not running (default) during the execution of the test case. Override it to change the default value like this:

    has '+NeedsRunningDaemon' => (
        default => 1,
    );

around 'StartHook'

starts or stops the daemon at the beginning of the test, if needed.

around 'FinishHook'

stops the daemon at the end of the test, if it was started.

IsDaemonRunning()

Checks if the OTRS daemon is currently running

    my $DaemonRuns = $Self->IsDaemonRunning();

StartDaemon()

Tries to start the OTRS daemon.

    my $Success = $Self->StartDaemon();

StopDaemon()

Tries to stop the OTRS daemon.

    my $Success = $Self->StopDaemon();
Scroll to Top