mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Small test speedup (#11411)
Use Log::event() inside log_event() Mock Log::event() in module tests to prevent writing to the database.
This commit is contained in:
@@ -83,6 +83,12 @@ class OSModulesTest extends DBTestCase
|
||||
{
|
||||
$this->requireSnmpsim(); // require snmpsim for tests
|
||||
|
||||
// stub out Log::event, we don't need to store them for these tests
|
||||
$this->app->bind('log', function ($app) {
|
||||
return \Mockery::mock('\App\Facades\LogManager[event]', [$app])
|
||||
->shouldReceive('event');
|
||||
});
|
||||
|
||||
try {
|
||||
set_debug(false); // avoid all undefined index errors in the legacy code
|
||||
$helper = new ModuleTestHelper($modules, $os, $variant);
|
||||
|
Reference in New Issue
Block a user