Alexander Aleksandrovič Klimov
ef8619f76b
Merge pull request #8601 from Icinga/feature/replace-std-boost-bind-with-lambdas-7006
...
Feature: Replace std/boost::bind() with lambdas
2021-03-18 17:56:13 +01:00
Yonas Habteab
43ba2da39c
Replace std/boost::bind() function with lambda expression
2021-03-10 16:29:40 +01:00
Julian Brost
c5626cb793
Stacktrace test: try to prevent inlining even harder
...
- Explicitly disable optimizations for MSVC
- Make stack_test_func_a bigger
2021-03-01 16:08:06 +01:00
Julian Brost
1742e31225
Add comments to stack trace formatter and test case
2021-03-01 14:07:11 +01:00
Julian Brost
24f6283362
Add a test case for the stack trace formatter
2021-03-01 14:07:11 +01:00
Julian Brost
5cb7c7cc09
Replace icinga::StackTrace with boost::stacktrace::stacktrace
...
Provides roughly the same functionality but works better on certain
platforms (especially Windows) and is less code to maintain.
2021-03-01 14:06:44 +01:00
Alexander Aleksandrovič Klimov
dbdfe189c0
Merge pull request #7092 from Icinga/bugfix/command-escape-windows-4849
...
Fix Windows command escape for \"
2021-02-01 11:20:44 +01:00
Julian Brost
56095b29f4
Add tests for Utility::EscapeCreateProcessArg
2021-01-29 15:15:43 +01:00
Alexander Aleksandrovič Klimov
6b04ef6e5d
Merge pull request #7871 from Icinga/feature/more-uoms-for-perfdata-7225
...
PerfdataValue: add UoMs
2020-12-14 18:42:49 +01:00
Michael Insel
e070651203
Add test-case for perfdata scientific notation
2020-11-27 11:40:10 +01:00
Alexander A. Klimov
3adba5c542
JsonEncode(): suffix pretty JSON w/ \n
...
refs #8194
2020-09-02 16:11:43 +02:00
Alexander A. Klimov
720a88c29a
PerfdataValue: add UoMs
...
* {,{K,M,G,T,P,E,Z,Y}{,i}}B
=> bytes
* {,{k,m,g,t,p,e,z,y}{,i}}b
=> bits
* packets
* {n,u,m,}s m h d
=> seconds
* {n,u,m,,k,M,G,T,P,E,Z,Y}{{A,O,V,W},{A,W}{s,m,h}}
=> amperes, ohms, volts, watts, ampere-seconds, watt-hours
* lm dBm
=> lumens decibel-milliwatts
* {n,u,m,,k}g t
=> grams
* C F K
=> degrees-celsius, degrees-fahrenheit, degrees-kelvin
* {m,,h}l
=> liters
refs #7225
2020-04-03 12:47:36 +02:00
Michael Friedrich
3a4fb840d4
Tests: Add multi parent dependency test case
2020-02-11 15:13:25 +01:00
Michael Friedrich
76d531b4f0
Unit tests: Also test reachability in icinga_checkresult/* tests
2020-02-11 15:13:25 +01:00
Alexander A. Klimov
28f708bb7c
LegacyTimePeriod: support specifying seconds
2019-08-22 18:50:37 +02:00
Michael Friedrich
da982c256b
Add unit test for Utility::CompareVersion
2019-08-14 13:14:43 +02:00
Michael Friedrich
96f62d2d34
Add Utility::ParseVersion() and unit tests
...
This now uses a regex to extract the short version
similar to how Icinga Web 2 does it.
Additional unit tests prove the rule.
2019-08-14 11:22:55 +02:00
Alexander A. Klimov
95e90e99d4
Tests: _Exit() in main()
...
refs #7334
2019-07-23 12:14:06 +02:00
Michael Friedrich
9c5f280a85
Tests: Add Notification state/type to string cases
2019-07-16 13:46:22 +02:00
Michael Friedrich
88e5d8c47a
TimePeriod: Fully support and test "day -X" notation
...
Previously no tests would have detected if this really worked or not.
2019-07-09 16:21:07 +02:00
Michael Friedrich
7665143afa
Tests: Rewrite TimePeriod tests using Boost::DateTime
...
fixes #7257
2019-07-09 15:34:07 +02:00
Alexander A. Klimov
2306e0e93f
Fix unit test icinga_legacytimeperiod/advanced
...
refs #5261
2019-06-06 13:11:34 +02:00
Michael Friedrich
5e931fe127
Tests: Add cases for LegacyTimePeriod::ProcessTimeRangeRaw()
2019-06-06 13:11:34 +02:00
Elias Ohm
52e3db279a
Fix for double-free (and possibly other memory-corruption related) crashes at logrotate time
...
this is a direct fix of the issue revealing the problem that leads to crash
verification done with a patched icinga2 where the execution-order of the code lines of counter-parts involved in re-incrementing/decrementing Timer:Ptr is forced to be the one that leads to the obeserverd segfaults
refs #6737
2019-04-24 11:42:54 +02:00
Michael Friedrich
6ace8001d8
Merge pull request #7019 from Icinga/feature/new-json-library
...
Replace YAJL with nlohmann::json
2019-03-18 17:26:57 +01:00
Michael Friedrich
76b9cd6786
Fix missing include in JSON tests
...
Non-unity builds require the additional header.
2019-03-18 17:02:12 +01:00
Alexander A. Klimov
c4333b49f5
Test Json{En,De}code()
2019-03-18 15:07:57 +01:00
Michael Friedrich
ea80d93efc
Merge pull request #7014 from Icinga/feature/utf8cpp
...
Utility::ValidateUTF8(): use UTF8-CPP
2019-03-18 10:57:03 +01:00
Alexander A. Klimov
60ec11de73
Test Utility::ValidateUTF8()
2019-03-15 13:34:20 +01:00
Alexander A. Klimov
646feb76e0
Ignore failure of unit test base_utility/comparepasswords_issafe
...
... as volatile system load may cause false negatives
2019-02-26 11:45:03 +01:00
Michael Friedrich
458f997a18
Replace Copyright header with a short version, part II
2019-02-25 15:09:36 +01:00
Michael Friedrich
d14a88235d
Replace Copyright header with a short version, part I
...
CLion -> replace in path
2019-02-25 14:48:22 +01:00
Alexander A. Klimov
1b00331a88
Test Utility::ComparePasswords()
2019-02-22 16:59:36 +01:00
Michael Friedrich
b08d485a41
Merge pull request #6857 from Icinga/bugfix/check_nscp_api-query-sorted-6536
...
Url#m_Query: preserve order
2019-02-11 17:57:32 +01:00
Michael Friedrich
b1362aeb9b
Add a unit test for Convert::ToLong(double) - fails
2019-01-30 14:23:57 +01:00
Alexander A. Klimov
268bd85752
Url#m_Query: test order preservation
...
refs #6536
2018-12-21 11:54:48 +01:00
Alexander A. Klimov
eeb609d4ae
Url#m_Query: preserve order
...
refs #6536
2018-12-21 11:52:37 +01:00
Michael Friedrich
9d73f0cf30
Implement unit tests for Dictionary initializers
2018-11-09 14:56:36 +01:00
Michael Friedrich
2991993f6b
Apply workaround for timer tests with std::bind callbacks
2018-11-08 15:03:41 +01:00
Michael Friedrich
1a8a2c25f2
icinga.com: Update test and tools
2018-10-18 09:45:36 +02:00
Michael Friedrich
dea5ec614e
icinga.com: Update CMakeLists.txt
2018-10-18 09:35:18 +02:00
Michael Friedrich
dab53448bc
icinga.com: Update *.{h,c}pp
2018-10-18 09:27:04 +02:00
Gunnar Beutner
e44848a664
Remove #include for deprecated header file
2018-08-13 14:07:24 +02:00
Michael Friedrich
4c55a5c6cf
Fix prefix in unit tests for object packer
2018-07-27 13:57:28 +02:00
Alexander A. Klimov
d21a218527
Test PackObject
2018-07-27 13:57:28 +02:00
Michael Friedrich
2fd6709952
Remove ApiUser password_hash functionality
...
This affects and fixes
- Windows reload
- Config validation
- RHEL 7.5 OpenSSL memory corruption
- Hash algorithm, requested changes
refs #6378
refs #6279
refs #6278
2018-06-19 11:32:03 +02:00
Michael Friedrich
6660a45c41
Implement Array::Unique() and add unit tests
...
refs #4732
2018-05-09 17:25:55 +02:00
Michael Friedrich
c7b6488e90
Merge pull request #6217 from Icinga/fix/reschedule-checks
...
Fix check behavior on restart
2018-04-17 20:59:03 +02:00
Jean Flach
b2092e4499
Set Hosts/Services in tests as active where needed
2018-04-10 18:11:26 +02:00
Michael Friedrich
194c99a86e
Allow to disable brackets for the Url class and Format()
...
This commit also adds unit tests.
refs #5706
2018-04-06 15:22:17 +02:00
Markus Frosch
3adfd396f4
tests: Ensure IcingaApplication is initialized before adding config
...
This avoids an ordering problem noticed in Boost 1.55
2018-03-26 13:58:12 +02:00
Markus Frosch
eb71e16995
tests: Move IcingaApplicationFixture out of test-runner
...
And make it basically a singleton that would be callable by other test
units.
2018-03-26 13:58:12 +02:00
Gunnar Beutner
70b3d20a7e
Fix ApiUser unit test
2018-03-06 09:30:22 +01:00
Jean Flach
0a0795f09d
Code style
2018-02-16 11:47:13 +01:00
Jean Flach
65a806f5dc
Move new password functions into tlsutility
2018-02-15 13:09:22 +01:00
Jean Flach
92e2faaa08
Hash API password and comparison
...
fixes #4920
2018-02-15 13:09:22 +01:00
Markus Frosch
1be285c530
test-runner: Replace initialization by global fixture
...
This is required to even be able to build tests static
for Windows.
2018-02-07 20:30:37 +01:00
Markus Frosch
7d189b58f8
test/cmake: Don't force dynamic builds for testing
2018-02-07 20:30:36 +01:00
Gunnar Beutner
25d0e02daa
Remove jenkins test scripts
2018-02-02 07:30:20 +01:00
Jean Flach
1da6b2c883
Fix whitespaces in CMakeLists files
...
Uses 2 space indentation as standard
2018-01-19 09:19:40 +01:00
Gunnar Beutner
e1134fd3d9
Build all remaining libraries as object libraries
2018-01-17 14:59:02 +01:00
Gunnar Beutner
2a9dceb367
Use CMake object libraries for our libs
2018-01-17 04:28:21 +01:00
Michael Insel
6eccdff621
Change a bunch more copyright headers for 2018
...
This changes more copyright headers for 2018.
2018-01-08 18:05:12 +01:00
Gunnar Beutner
becfa85094
Apply clang-tidy fix 'modernize-use-emplace'
2018-01-04 12:24:57 +01:00
Gunnar Beutner
e3ad0be769
Apply clang-tidy fix 'modernize-use-auto'
2018-01-04 12:24:57 +01:00
Gunnar Beutner
d6062eefbf
Apply clang-tidy fix 'modernize-raw-string-literal'
2018-01-04 12:24:57 +01:00
Gunnar Beutner
ac155d1dda
Apply clang-tidy fix 'modernize-redundant-void-arg'
2018-01-04 12:24:57 +01:00
Michael Friedrich
cd33b8b508
Merge pull request #5936 from Icinga/feature/source-lists
...
Clean up source lists in the CMakeLists.txt files
2018-01-03 11:59:35 +01:00
Gunnar Beutner
75e2473616
Clean up source lists in the CMakeLists.txt files
2018-01-03 11:47:46 +01:00
Michael Friedrich
0e6f4b1966
Merge pull request #5939 from Icinga/fix/build-fix-wheezy
...
Build fix for Debian wheezy
2018-01-03 11:28:57 +01:00
Gunnar Beutner
abe3f8a959
Build fix for Debian wheezy
2018-01-03 10:32:33 +01:00
Gunnar Beutner
90496b5456
Build libraries as static libraries
2018-01-02 23:29:48 +01:00
Michael Insel
158ae2188e
Change copyright header for 2018
2018-01-02 12:08:55 +01:00
Jean Flach
2636e6a77a
Whitespace fix
...
What does this change?
* Remove use of spaces for formatting
These could be found by using `grep -r -l -P '^\t+ +[^*]'
* Removal of training whitespaces
* A few lines longer than 120 chars
2017-12-20 14:53:52 +01:00
Jean Flach
bde3263d5c
Merge pull request #5885 from Icinga/fix/build-fix-gcc
...
Workaround for GCC bug 61321
2017-12-20 09:59:45 +01:00
Jean Flach
629c502ca9
Fix build errors
2017-12-20 08:08:02 +01:00
Adam James
37d100ddef
Implement unit tests for the time period parser
...
fixes #11146
2017-12-20 08:08:02 +01:00
Gunnar Beutner
88af57e2ec
Fix for outdated libstdcxx
2017-12-20 08:02:17 +01:00
Gunnar Beutner
ab8386cf5c
Use std::unique_ptr for Expression objects
2017-12-15 10:44:54 +01:00
Gunnar Beutner
4c2f13c414
Fix memory leaks in the unit tests
2017-12-14 14:57:23 +01:00
Gunnar Beutner
ff0b6ba630
Fix build problems with Visual Studio 2017
2017-12-14 08:55:36 +01:00
Michael Friedrich
a238613fdc
Merge pull request #5825 from Icinga/feature/boost-assign
...
Replace boost::assign::list_of with initializer lists
2017-11-30 21:20:46 +01:00
Gunnar Beutner
83f17b5bfa
Replace boost::assign::list_of with initializer lists
2017-11-30 18:09:38 +01:00
Gunnar Beutner
df8266631d
Replace boost::tuple with std::tuple
2017-11-30 17:41:02 +01:00
Gunnar Beutner
d5961bb76c
Re-implement WrapFunction() using C++11 features
2017-11-29 11:53:45 +01:00
Gunnar Beutner
858873b940
Replace boost::bind/boost::function with std::bind/std::function
2017-11-27 15:15:11 +01:00
Jean Flach
34651553b2
Add additional tests for flapping
...
refs #4982
2017-11-02 14:38:17 +01:00
Jean Flach
a21ffd6fe4
Fix flapping
...
Re-implement flapping following the 'old way' of just observing the last
20 stage changes.
refs #4982
2017-10-24 15:54:05 +02:00
Michael Friedrich
29b7971fef
Merge pull request #5624 from mcktr/mcktr/fix/missing-include-statements
...
Fixed missing include statement in unit test
2017-10-02 13:27:04 +02:00
Michael
2d036e6886
Fixed missing include statement in unit test
...
This adds the missing iostream include to the notification unit test.
refs #5613
2017-09-26 22:01:07 +02:00
Michael
631d1e85fc
Fixed missing include statement in unit tests
...
refs #5613
2017-09-25 01:07:50 +02:00
Michael Friedrich
d74b15d640
Move Base64 class into libbase
...
refs #5538
2017-09-11 16:51:13 +02:00
Michael Friedrich
08486a0f7c
Fix tests for URL formatting changes
...
refs #5558
2017-09-07 11:26:19 +02:00
Michael Friedrich
79dcb789c2
Move PerfdataValue() class into base library
...
This is required for libremote and ApiListener stats in #5133
2017-05-15 16:32:29 +02:00
Michael Friedrich
b7caf0820d
Ensure that *.icinga.com is used everywhere
...
fixes #13897
fixes #13277
2017-01-10 17:19:12 +01:00
Michael Friedrich
f8e6d2d603
Add unit test for notification state/type filters
...
fixes #13225
2016-11-17 14:36:55 +01:00
Michael Friedrich
7e0c48643b
Fix Flapping{Start,End} notifications in SOFT states or downtimes
...
fixes #12560
fixes #12892
2016-11-10 14:16:02 +01:00
Jean Flach
d264a0dab8
Fix Url Query formatting
...
fixes #12883
2016-10-10 16:16:52 +02:00
Gunnar Beutner
1dc4ab367e
Fix: Unit tests randomly crash after the tests have completed
...
fixes #12610
2016-09-07 08:25:53 +02:00
Gunnar Beutner
6d4e305fe3
Add more unit tests
...
fixes #12530
2016-08-30 09:10:00 +02:00