132 Commits

Author SHA1 Message Date
Eric Lippmann
ce64888b81 Fix const visibility 2024-10-22 15:36:03 +02:00
Eric Lippmann
00985429c5 Fix PSR-12 violations 2024-10-22 14:31:14 +02:00
raviks789
0ea0a8fd83 Fix zone creation and deletion for tests 2024-01-16 15:27:27 +01:00
Johannes Meyer
58e2a8fca6 Change parent class of BaseTestCase to \Icinga\Test\BaseTestCase 2024-01-16 14:33:49 +01:00
raviks789
0ff6c8ee62 FormFieldSuggestionTest: Add tests for nullable command argument 2024-01-16 12:38:19 +01:00
Thomas Gelf
4d050834db IcingaConfig: render host templates to all...
...non-global zones, instead of the default global zone

refs #2410
2023-09-21 15:22:31 +02:00
Johannes Meyer
2ca1fc99c9 test: Replace usages of @expectException 2023-08-31 09:48:48 +02:00
Johannes Meyer
629297116b BaseTestCase: Use phpunit's new TestCase 2023-08-30 17:28:06 +02:00
EmTeedee
6b7bff80de ${var} deprecated in favor of {$var}
See: https://www.php.net/manual/en/migration82.deprecated.php#migration82.deprecated.core.dollar-brace-interpolation
2023-07-19 10:44:40 +02:00
Thomas Gelf
b6f6b786c5 FiltersWorkAsExpected: test Icinga Web filters...
...for some important cases
2022-02-03 11:03:54 +01:00
Thomas Gelf
6678a9a8f9 HostGroupMembershipResolverTest: replace new dummy 2021-08-04 15:06:34 +02:00
Thomas Gelf
66de47b10b DbObjectTypeRegistry: move logic from IcingaObject 2021-08-04 13:18:30 +02:00
Thomas Gelf
6badc53d61 DependencyChecker: new implemenation
This is now also able to give help for web 2.9.x

fixes #2354
fixes #2350
2021-07-13 09:50:17 +02:00
Thomas Gelf
36141c5f98 Import: validated encoding on DB error
MySQL gives useless error messages for invalid UTF8 characters and
confuses users with an 'Invalid datetime format' message.

Once storing imported data fails, the original data will now be scanned
for invalid UTF-8 characters. If such are found, a dedicated exception
with more details is thrown. Otherwise the original exception will be
forwarded

fixes #2143
2020-07-10 17:16:08 +02:00
Markus Frosch
50521bdecb ImportSourceRestApi: Add header and deeper extract_property
Allows a user to add additional headers, e.g. by setting a specific `Accept` or any authentication header.

Also `extract_property` now has a logic for deeper keys like "result.objects", "key.deeper_key.very_deep"
2020-06-06 19:17:02 +02:00
Thomas Gelf
d0a01e2102 Implement ListToObject Property Modifier
fixes #2062
2020-01-17 11:01:17 +01:00
Thomas Gelf
0e0bc3fb5d various: some little fixes 2019-09-11 22:36:36 +02:00
Markus Frosch
4037e22709 Implement AssignFilterHelper to improve apply/assign matching
* is set / is not set - fixes #1483 fixes #1387
* case-insensitive matching when using wildcards '*'
  like match() in Icinga 2
2019-05-06 14:19:29 +02:00
Thomas Gelf
0139506494 AssignRenderer: fix and test NOT on root level
fixes #1777
2019-02-08 12:08:06 +01:00
Klaus Weidenbach
7b189ef3b1 Add PropertyModifierParseURL.
Provide a PropertyModifier for the PHP function parse_url().
2018-12-21 18:44:08 +01:00
Markus Frosch
a7ad2e7ad3 HostGroupMembershipResolverTest: Check resolver after test set 2018-09-18 10:36:45 +02:00
Markus Frosch
325047260c test: Add HostGroupMembershipResolverTest
refs #1574
2018-09-18 10:36:45 +02:00
Markus Frosch
282d78c877 IcingaTimePeriod: Update test for include/exclude 2018-09-13 15:14:41 +02:00
Thomas Gelf
79620849c7 ArrayElementByPosition: new PropertyModifier
fixes #473
2018-09-05 13:11:09 +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
b475aa841e IcingaConfigHelper: granular macro-rendering
fixes #685
fixes #1272
fixes #1482
2018-06-04 18:18:32 +02:00
Thomas Gelf
8c432285e7 Various: stick with default exceptions...
...IDE hints are annoying
2018-05-29 21:31:43 +02:00
Thomas Gelf
09f4a1c94f AssignRenderTest: found in an orphaned branch...
...cannot hurt
2018-05-29 13:46:36 +02:00
Thomas Gelf
4b2546b14f IcingaHostTest: fit new properties
refs #1359
2018-05-28 21:01:58 +02:00
Thomas Gelf
47fcd13075 HostSyncTest: test combinations of multiple groups 2018-05-25 13:29:32 +02:00
Thomas Gelf
a515e02953 FilterByNameRestriction: test and unify behavior
fixes #1392
2018-02-20 13:45:19 +01: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
996918aafa MemoryLimit: dedicated class, tests
fixes #1220
2017-10-10 14:35:32 +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
Markus Frosch
168369e738 HostSyncTest: Improve test data to clarify 2017-08-30 16:40:12 +02:00
Markus Frosch
e9aa161ce4 Add HostSyncTest to test for basic Sync behavior 2017-08-30 16:40:12 +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
15e87a15bb CustomVariables: fix and test numeric key rendering
fixes #996
2017-07-14 13:21:42 +02:00
Thomas Gelf
2ad1c5a183 TemplateTreeTest: intensive tests for new resolver 2017-07-14 13:21:42 +02:00
Thomas Gelf
f91dd5fa0e PropertyModifierCombine: implementation, tests...
...and related changes with some documentation

fixes #922
2017-05-03 10:39:49 +02:00