summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorblizzz <blizzz@arthur-schiwon.de>2018-06-30 00:57:30 +0200
committerGitHub <noreply@github.com>2018-06-30 00:57:30 +0200
commit2f8ebe2b35fd487495a5e2e7a3bea30f54b094d3 (patch)
tree775cd8ea802a2f8cd7c3597e71f5fc3ad0154d10 /tests
parent0f46ba43b3c5c031a08792003173b94a090a96a0 (diff)
parent83339ae10cf4bbcbbdd6ea970f3f4c7b59ce555f (diff)
downloadnextcloud-server-2f8ebe2b35fd487495a5e2e7a3bea30f54b094d3.tar.gz
nextcloud-server-2f8ebe2b35fd487495a5e2e7a3bea30f54b094d3.zip
Merge pull request #10048 from nextcloud/feature/9760/systemd-logger
Systemd Logger
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/Log/LogFactoryTest.php15
-rw-r--r--tests/lib/TestCase.php1
2 files changed, 16 insertions, 0 deletions
diff --git a/tests/lib/Log/LogFactoryTest.php b/tests/lib/Log/LogFactoryTest.php
index 08139f54df4..b9b4c2c218a 100644
--- a/tests/lib/Log/LogFactoryTest.php
+++ b/tests/lib/Log/LogFactoryTest.php
@@ -3,6 +3,7 @@
* @copyright Copyright (c) 2018 Arthur Schiwon <blizzz@arthur-schiwon.de>
*
* @author Arthur Schiwon <blizzz@arthur-schiwon.de>
+ * @author Johannes Ernst <jernst@indiecomputing.com>
*
* @license GNU AGPL version 3 or any later version
*
@@ -26,6 +27,7 @@ use OC\Log\Errorlog;
use OC\Log\File;
use OC\Log\LogFactory;
use OC\Log\Syslog;
+use OC\Log\Systemdlog;
use OC\SystemConfig;
use OCP\IConfig;
use OCP\IServerContainer;
@@ -141,4 +143,17 @@ class LogFactoryTest extends TestCase {
$log = $this->factory->get('syslog');
$this->assertInstanceOf(Syslog::class, $log);
}
+
+ /**
+ * @throws \OCP\AppFramework\QueryException
+ */
+ public function testSystemdLog() {
+ $this->c->expects($this->once())
+ ->method('resolve')
+ ->with(Systemdlog::class)
+ ->willReturn($this->createMock(Systemdlog::class));
+
+ $log = $this->factory->get('systemd');
+ $this->assertInstanceOf(Systemdlog::class, $log);
+ }
}
diff --git a/tests/lib/TestCase.php b/tests/lib/TestCase.php
index 92076580510..96ee0f06f8c 100644
--- a/tests/lib/TestCase.php
+++ b/tests/lib/TestCase.php
@@ -299,6 +299,7 @@ abstract class TestCase extends \PHPUnit\Framework\TestCase {
static protected function tearDownAfterClassCleanStrayDataFiles($dataDir) {
$knownEntries = array(
'nextcloud.log' => true,
+ 'audit.log' => true,
'owncloud.db' => true,
'.ocdata' => true,
'..' => true,