mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-09-26 11:19:16 +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;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private function loadMultiRelation($property)
|
private function loadMultiRelation($property)
|
||||||
{
|
{
|
||||||
if ($this->hasBeenLoadedFromDb()) {
|
if ($this->hasBeenLoadedFromDb()) {
|
||||||
@ -1129,7 +1128,7 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer
|
|||||||
}
|
}
|
||||||
|
|
||||||
$config->configFile(
|
$config->configFile(
|
||||||
'zones.d/' . $this->getRenderingZone($config)
|
'zones.d/' . $this->getRenderingZone($config) . '/' . $filename
|
||||||
)->addObject($this);
|
)->addObject($this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -284,7 +284,7 @@ class IcingaHostTest extends BaseTestCase
|
|||||||
$config = new IcingaConfig($db);
|
$config = new IcingaConfig($db);
|
||||||
$host->renderToConfig($config);
|
$host->renderToConfig($config);
|
||||||
$this->assertEquals(
|
$this->assertEquals(
|
||||||
array('zones.d/master.conf'),
|
array('zones.d/master/hosts.conf'),
|
||||||
$config->getFileNames()
|
$config->getFileNames()
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -295,7 +295,7 @@ class IcingaHostTest extends BaseTestCase
|
|||||||
$host->zone = '___TEST___zone';
|
$host->zone = '___TEST___zone';
|
||||||
$host->renderToConfig($config);
|
$host->renderToConfig($config);
|
||||||
$this->assertEquals(
|
$this->assertEquals(
|
||||||
array('zones.d/___TEST___zone.conf'),
|
array('zones.d/___TEST___zone/hosts.conf'),
|
||||||
$config->getFileNames()
|
$config->getFileNames()
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -306,7 +306,7 @@ class IcingaHostTest extends BaseTestCase
|
|||||||
$config = new IcingaConfig($db);
|
$config = new IcingaConfig($db);
|
||||||
$host->renderToConfig($config);
|
$host->renderToConfig($config);
|
||||||
$this->assertEquals(
|
$this->assertEquals(
|
||||||
array('zones.d/___TEST___zone.conf'),
|
array('zones.d/___TEST___zone/hosts.conf'),
|
||||||
$config->getFileNames()
|
$config->getFileNames()
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -316,7 +316,7 @@ class IcingaHostTest extends BaseTestCase
|
|||||||
$config = new IcingaConfig($db);
|
$config = new IcingaConfig($db);
|
||||||
$host->renderToConfig($config);
|
$host->renderToConfig($config);
|
||||||
$this->assertEquals(
|
$this->assertEquals(
|
||||||
array('zones.d/director-global.conf'),
|
array('zones.d/director-global/host_templates.conf'),
|
||||||
$config->getFileNames()
|
$config->getFileNames()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -204,7 +204,7 @@ class IcingaServiceTest extends BaseTestCase
|
|||||||
$config = new IcingaConfig($db);
|
$config = new IcingaConfig($db);
|
||||||
$service->renderToConfig($config);
|
$service->renderToConfig($config);
|
||||||
$this->assertEquals(
|
$this->assertEquals(
|
||||||
array('zones.d/master.conf'),
|
array('zones.d/master/services.conf'),
|
||||||
$config->getFileNames()
|
$config->getFileNames()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user