mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-29 08:44:11 +02:00
IcingaServiceSet: fix tests
This commit is contained in:
parent
18d171991e
commit
a3ac1b8eef
@ -276,7 +276,11 @@ class IcingaServiceSet extends IcingaObject
|
|||||||
// checking if template object_name is unique
|
// checking if template object_name is unique
|
||||||
// TODO: Move to IcingaObject
|
// TODO: Move to IcingaObject
|
||||||
if (! $this->hasBeenLoadedFromDb() && $this->isTemplate() && static::exists($name, $this->connection)) {
|
if (! $this->hasBeenLoadedFromDb() && $this->isTemplate() && static::exists($name, $this->connection)) {
|
||||||
throw new DuplicateKeyException('%s template "%s" already existing in database!', $this->getType(), $name);
|
throw new DuplicateKeyException(
|
||||||
|
'%s template "%s" already existing in database!',
|
||||||
|
$this->getType(),
|
||||||
|
$name
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -67,7 +67,7 @@ class IcingaServiceSetTest extends IcingaObjectTestCase
|
|||||||
$this->createObject('for_set', 'icinga_host', array(
|
$this->createObject('for_set', 'icinga_host', array(
|
||||||
'object_type' => 'object',
|
'object_type' => 'object',
|
||||||
'address' => '1.2.3.4',
|
'address' => '1.2.3.4',
|
||||||
));
|
), false)->store();
|
||||||
|
|
||||||
$host = $this->loadObject('for_set', 'icinga_host');
|
$host = $this->loadObject('for_set', 'icinga_host');
|
||||||
$host->delete();
|
$host->delete();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user