Markus Frosch
282d78c877
IcingaTimePeriod: Update test for include/exclude
2018-09-13 15:14:41 +02:00
Thomas Gelf
23f0ec32d4
IcingaServiceTest: one more exception
2018-07-03 17:37:41 +02:00
Thomas Gelf
c93b4b0a24
IcingaHostTest: missing lazy deps are Runtime ex.
2018-07-03 17:11:46 +02:00
Thomas Gelf
3c0d48068f
tests/rendered: fix test to match new reality
2018-06-04 18:29:53 +02:00
Thomas Gelf
8c432285e7
Various: stick with default exceptions...
...
...IDE hints are annoying
2018-05-29 21:31:43 +02:00
Thomas Gelf
4b2546b14f
IcingaHostTest: fit new properties
...
refs #1359
2018-05-28 21:01:58 +02:00
Markus Frosch
4902f694c1
flapping: Migrate to Icinga 2.8.0 flapping properties
...
Existing property is dropped now, it never was used in director before.
refs #330
2018-01-15 10:10:33 +01:00
Thomas Gelf
bbb180bb6e
IcingaServiceTest: don't test with invalid service
2017-10-13 14:26:29 +02:00
Thomas Gelf
8407f23474
toPlainObject: resolve is boolean
...
Doesn't change behavior, but null is confusing here.
2017-09-01 10:04:21 +02:00
Thomas Gelf
19e51e15e4
IcingaObject: special treatment for groups
...
refs #1146
2017-08-31 22:42:25 +02:00
Thomas Gelf
a3ac1b8eef
IcingaServiceSet: fix tests
2017-08-28 06:16:00 +02:00
Thomas Gelf
18d171991e
IcingaServiceSetTest: IcingaException is enough
2017-08-28 06:11:18 +02:00
Thomas Gelf
20fe291433
IcingaServiceSet: do not allow for objects without
...
...a host
2017-08-28 06:09:37 +02:00
Thomas Gelf
95a971975d
IcingaServiceSetTest: do not call another test...
...
...from a test
2017-08-28 06:09:37 +02:00
Thomas Gelf
6685066673
IcingaServiceSetTest: enable disabled test
2017-08-28 06:09:37 +02:00
Thomas Gelf
ee247ab383
test/php: provide DB mostly everwhere...
...
...as template repository would otherwise complain. Also, fit new boolean
true rendering
2017-08-26 16:17:55 +02:00
Thomas Gelf
8e46c61d5d
IcingaHostTest: add check_timeout to enum
2017-07-14 13:21:42 +02:00
Thomas Gelf
bff76dad8e
HostApplyMatches: fix matching for "contains"
...
fixes #803
2017-03-03 09:41:25 +01:00
Thomas Gelf
a99252ee5e
HostApplyMatchesTest: new tests
2017-03-03 09:07:43 +01:00
Thomas Gelf
b7a10d296c
phpcs: mostly new PSR-2 SpacingAfter/Before checks
2017-01-13 20:54:52 +01:00
Thomas Gelf
9e771f2d5a
Fix phpcs complaints
2017-01-13 19:47:54 +01:00
Thomas Gelf
012b302386
IcingaTemplateResolverTest: fix tests
2017-01-02 12:21:29 +01:00
Thomas Gelf
a9874879dd
TemplateResolver: add new methods for stricter...
...
...path resolution. Also ships related tests
refs #13839
2016-12-30 10:15:25 +01:00
Thomas Gelf
b9e05be111
IcingaServiceSetTest: add aliases the ZF way...
...
...and use the correct db adapter, fixes broken tests
2016-11-30 09:19:30 +01:00
Markus Frosch
84f39a60ac
IcingaServiceSetTest: Add test case
...
refs #13309
2016-11-28 15:32:41 +01:00
Thomas Gelf
d5131f7fac
Arguments: always render += instead of =
...
This allows to extend existing arguments
fixes #12941
2016-11-15 17:57:02 +01:00
Thomas Gelf
fee8e7847d
IcingaHostTest: fix erroneous test
...
Code behaves correct now, the test wasn't up to date. However, it wasn't
failing as the object has been changed at runtime while the (at that time
already filled) internal lookup cache wasn't cleared. Woulnd't have had any
effect on real-world environments. However, it's fixed right now.
2016-11-14 13:39:20 +01:00
Thomas Gelf
a52e52b517
IcingaHostTest: temporarily skip broken test
2016-11-03 02:54:59 +01:00
Thomas Gelf
ad7c5bc997
IcingaHost: fix tests
2016-10-25 00:30:12 +00:00
Thomas Gelf
0d86c24cd8
Huge change, getting rid of legacy assignment...
...
...code. All objects should work with the new code base right now
2016-10-24 03:41:37 +00:00
Thomas Gelf
9ba6116091
IcingaService: support and test speciall object...
...
...name variants with apply for
2016-10-22 06:54:53 +00:00
Thomas Gelf
4c9de0fa34
IcingaServiceTest: no need to store when setting...
...
...a connection
2016-10-22 06:37:22 +00:00
Thomas Gelf
5d693debeb
IcingaServiceTest: re-add tests lost on rebase
2016-10-22 06:23:59 +00:00
Corentin Ardeois
3e30d34098
Use `config` variable in apply for rules
...
* use `config` instead of `value` in apply for rules
* update documentation
refs #11976
2016-10-22 06:07:57 +00:00
Corentin Ardeois
e7bd4343b5
Add support for Apply for rules in services
...
Apply for rules are defined through `apply_for` property
Only Array custom variables will be eligible in apply_for dropdown.
API Example:
```bash
./director-curl POST director/service?name=my_service '{"apply_for": "for (checked_tcp_port in host.vars.checked_tcp_ports)" }'
```
Will render as:
```
apply Service "my_service" for (checked_tcp_port in host.vars.checked_tcp_ports) {
...
}
```
Feature: https://dev.icinga.org/issues/11976
Depends-On: https://github.com/Icinga/icingaweb2-module-director/pull/20
refs #11976
2016-10-22 06:00:54 +00:00
Thomas Gelf
b7eaab715b
Make explicit calls to renderStringWithVariables
2016-10-22 05:48:09 +00:00
Corentin Ardeois
37c91050c7
Expressions syntax is now $var$
...
Instead of $$var$$.
We make sure $$var$$ is left untouched.
refs #11976
2016-10-22 00:15:09 +00:00
Corentin Ardeois
ddcfb09f58
Handle expressions only for apply objects
...
Expressions will be handled only if the object is an ApplyRule.
Only properties and custom variables are replaced.
refs #11976
2016-10-22 00:15:09 +00:00
Thomas Gelf
c4da25ef25
IcingaCommandArgument: render set_if without format
...
Icinga DSL support was introduced in 348cb1aa6
and works fine, but breaks
rendering of legacy arguments with set_if_format = NULL. This should default
to 'string', as we should IMO not force NOT NULL in the DB in this case.
refs #12153
fixes #12886
2016-10-11 09:45:11 +00:00
Thomas Gelf
89f86abdda
IcingaHostTest: remove obsolete workaround
2016-10-09 13:15:51 +00:00
Thomas Gelf
8390457939
test/Objects: check for new constant imports
2016-09-08 22:41:58 +00:00
Thomas Gelf
2c6afcbd66
IcingaTimePeriodTest: adjust to recent changes
2016-09-08 15:25:36 +00:00
Thomas Gelf
8a3956b6a2
IcingaServiceTest: delete after storing them
2016-09-08 13:52:07 +00:00
Thomas Gelf
999019ba16
IcingaService: make sure to have a db connection
...
...when rendering, as we require settings
2016-09-08 13:30:37 +00:00
Thomas Gelf
4f4b6eb63a
IcingaService: allow host vars to override vars...
...
...for applied services
refs #12546
2016-09-08 10:45:02 +00:00
Thomas Gelf
d142fa1c49
tests: adjust rendered dictionaries to fit...
...
...latest changes
refs #12447
2016-08-26 07:07:35 +00:00
Thomas Gelf
6258230fdb
IcingaArguments: test and fix modification tracking
...
This fixes related behaviour when working on CLI, API or through
Sync Rules - but not web forms
refs #12266
2016-08-01 09:31:10 +00:00
Thomas Gelf
439757d464
IcingaHost: introduce API keys
2016-07-26 09:52:55 +02:00
Thomas Gelf
15acbb5290
IcingaObject::replaceWith: implement preserve...
...
...and add related tests, as this is a tricky one
2016-07-14 17:06:48 +02:00
Thomas Gelf
123b4c7549
tests: be resiliant to adjusted master zone
2016-05-26 01:33:55 +02:00