mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-31 01:34:12 +02:00
IcingaObject: fix rendering target and tests
This commit is contained in:
parent
bd937e57c5
commit
1158409eeb
@ -122,7 +122,6 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
private function loadMultiRelation($property)
|
||||
{
|
||||
if ($this->hasBeenLoadedFromDb()) {
|
||||
@ -1129,7 +1128,7 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer
|
||||
}
|
||||
|
||||
$config->configFile(
|
||||
'zones.d/' . $this->getRenderingZone($config)
|
||||
'zones.d/' . $this->getRenderingZone($config) . '/' . $filename
|
||||
)->addObject($this);
|
||||
}
|
||||
|
||||
|
@ -284,7 +284,7 @@ class IcingaHostTest extends BaseTestCase
|
||||
$config = new IcingaConfig($db);
|
||||
$host->renderToConfig($config);
|
||||
$this->assertEquals(
|
||||
array('zones.d/master.conf'),
|
||||
array('zones.d/master/hosts.conf'),
|
||||
$config->getFileNames()
|
||||
);
|
||||
|
||||
@ -295,7 +295,7 @@ class IcingaHostTest extends BaseTestCase
|
||||
$host->zone = '___TEST___zone';
|
||||
$host->renderToConfig($config);
|
||||
$this->assertEquals(
|
||||
array('zones.d/___TEST___zone.conf'),
|
||||
array('zones.d/___TEST___zone/hosts.conf'),
|
||||
$config->getFileNames()
|
||||
);
|
||||
|
||||
@ -306,7 +306,7 @@ class IcingaHostTest extends BaseTestCase
|
||||
$config = new IcingaConfig($db);
|
||||
$host->renderToConfig($config);
|
||||
$this->assertEquals(
|
||||
array('zones.d/___TEST___zone.conf'),
|
||||
array('zones.d/___TEST___zone/hosts.conf'),
|
||||
$config->getFileNames()
|
||||
);
|
||||
|
||||
@ -316,7 +316,7 @@ class IcingaHostTest extends BaseTestCase
|
||||
$config = new IcingaConfig($db);
|
||||
$host->renderToConfig($config);
|
||||
$this->assertEquals(
|
||||
array('zones.d/director-global.conf'),
|
||||
array('zones.d/director-global/host_templates.conf'),
|
||||
$config->getFileNames()
|
||||
);
|
||||
|
||||
|
@ -204,7 +204,7 @@ class IcingaServiceTest extends BaseTestCase
|
||||
$config = new IcingaConfig($db);
|
||||
$service->renderToConfig($config);
|
||||
$this->assertEquals(
|
||||
array('zones.d/master.conf'),
|
||||
array('zones.d/master/services.conf'),
|
||||
$config->getFileNames()
|
||||
);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user