tests: be resiliant to adjusted master zone
This commit is contained in:
parent
4a21b8eb86
commit
123b4c7549
|
@ -280,11 +280,12 @@ class IcingaHostTest extends BaseTestCase
|
||||||
|
|
||||||
$db = $this->getDb();
|
$db = $this->getDb();
|
||||||
$host = $this->host()->setConnection($db);
|
$host = $this->host()->setConnection($db);
|
||||||
|
$masterzone = $db->getMasterZoneName();
|
||||||
|
|
||||||
$config = new IcingaConfig($db);
|
$config = new IcingaConfig($db);
|
||||||
$host->renderToConfig($config);
|
$host->renderToConfig($config);
|
||||||
$this->assertEquals(
|
$this->assertEquals(
|
||||||
array('zones.d/master/hosts.conf'),
|
array('zones.d/' . $masterzone . '/hosts.conf'),
|
||||||
$config->getFileNames()
|
$config->getFileNames()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -313,6 +314,8 @@ class IcingaHostTest extends BaseTestCase
|
||||||
$host->object_type = 'template';
|
$host->object_type = 'template';
|
||||||
$host->zone_id = null;
|
$host->zone_id = null;
|
||||||
|
|
||||||
|
// TODO: this should happen automagically
|
||||||
|
$host->invalidateResolveCache();
|
||||||
$config = new IcingaConfig($db);
|
$config = new IcingaConfig($db);
|
||||||
$host->renderToConfig($config);
|
$host->renderToConfig($config);
|
||||||
$this->assertEquals(
|
$this->assertEquals(
|
||||||
|
|
|
@ -203,8 +203,9 @@ class IcingaServiceTest extends BaseTestCase
|
||||||
|
|
||||||
$config = new IcingaConfig($db);
|
$config = new IcingaConfig($db);
|
||||||
$service->renderToConfig($config);
|
$service->renderToConfig($config);
|
||||||
|
$masterzone = $db->getMasterZoneName();
|
||||||
$this->assertEquals(
|
$this->assertEquals(
|
||||||
array('zones.d/master/services.conf'),
|
array('zones.d/' . $masterzone . '/services.conf'),
|
||||||
$config->getFileNames()
|
$config->getFileNames()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue