2019-02-25 15:09:36 +01:00
|
|
|
# Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+
|
2013-11-03 13:45:26 +01:00
|
|
|
|
|
|
|
include(BoostTestTargets)
|
|
|
|
|
2014-08-30 18:08:28 +02:00
|
|
|
set(base_test_SOURCES
|
2018-03-23 13:30:12 +01:00
|
|
|
icingaapplication-fixture.cpp
|
2017-12-24 08:18:33 +01:00
|
|
|
base-array.cpp
|
|
|
|
base-base64.cpp
|
|
|
|
base-convert.cpp
|
|
|
|
base-dictionary.cpp
|
|
|
|
base-fifo.cpp
|
|
|
|
base-json.cpp
|
|
|
|
base-match.cpp
|
|
|
|
base-netstring.cpp
|
|
|
|
base-object.cpp
|
2018-06-06 16:27:33 +02:00
|
|
|
base-object-packer.cpp
|
2017-12-24 08:18:33 +01:00
|
|
|
base-serialize.cpp
|
|
|
|
base-shellescape.cpp
|
|
|
|
base-stacktrace.cpp
|
|
|
|
base-stream.cpp
|
|
|
|
base-string.cpp
|
|
|
|
base-timer.cpp
|
2021-03-19 10:29:55 +01:00
|
|
|
base-tlsutility.cpp
|
2017-12-24 08:18:33 +01:00
|
|
|
base-type.cpp
|
2019-02-22 16:58:26 +01:00
|
|
|
base-utility.cpp
|
2017-12-24 08:18:33 +01:00
|
|
|
base-value.cpp
|
2023-12-13 16:25:33 +01:00
|
|
|
config-apply.cpp
|
2017-12-24 08:18:33 +01:00
|
|
|
config-ops.cpp
|
|
|
|
icinga-checkresult.cpp
|
2020-02-11 15:02:57 +01:00
|
|
|
icinga-dependencies.cpp
|
2017-12-24 08:18:33 +01:00
|
|
|
icinga-legacytimeperiod.cpp
|
|
|
|
icinga-macros.cpp
|
|
|
|
icinga-notification.cpp
|
|
|
|
icinga-perfdata.cpp
|
2023-12-19 12:21:03 +01:00
|
|
|
methods-pluginnotificationtask.cpp
|
2021-06-07 13:14:06 +02:00
|
|
|
remote-configpackageutility.cpp
|
2017-12-24 08:18:33 +01:00
|
|
|
remote-url.cpp
|
2018-01-17 14:59:02 +01:00
|
|
|
${base_OBJS}
|
2018-01-17 04:28:21 +01:00
|
|
|
$<TARGET_OBJECTS:config>
|
|
|
|
$<TARGET_OBJECTS:remote>
|
|
|
|
$<TARGET_OBJECTS:icinga>
|
2023-12-19 12:21:03 +01:00
|
|
|
$<TARGET_OBJECTS:methods>
|
2014-08-30 18:08:28 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
if(ICINGA2_UNITY_BUILD)
|
2018-01-19 09:18:52 +01:00
|
|
|
mkunity_target(base test base_test_SOURCES)
|
2014-08-30 18:08:28 +02:00
|
|
|
endif()
|
|
|
|
|
2013-11-03 13:45:26 +01:00
|
|
|
add_boost_test(base
|
2016-09-07 08:20:51 +02:00
|
|
|
SOURCES test-runner.cpp ${base_test_SOURCES}
|
2018-01-17 04:28:21 +01:00
|
|
|
LIBRARIES ${base_DEPS}
|
2018-03-23 13:30:12 +01:00
|
|
|
TESTS
|
2018-01-19 09:18:52 +01:00
|
|
|
base_array/construct
|
|
|
|
base_array/getset
|
|
|
|
base_array/resize
|
|
|
|
base_array/insert
|
|
|
|
base_array/remove
|
2018-05-09 16:55:14 +02:00
|
|
|
base_array/unique
|
2018-01-19 09:18:52 +01:00
|
|
|
base_array/foreach
|
|
|
|
base_array/clone
|
|
|
|
base_array/json
|
|
|
|
base_base64/base64
|
|
|
|
base_convert/tolong
|
|
|
|
base_convert/todouble
|
|
|
|
base_convert/tostring
|
|
|
|
base_convert/tobool
|
|
|
|
base_dictionary/construct
|
2018-11-09 14:56:36 +01:00
|
|
|
base_dictionary/initializer1
|
|
|
|
base_dictionary/initializer2
|
2018-01-19 09:18:52 +01:00
|
|
|
base_dictionary/get1
|
|
|
|
base_dictionary/get2
|
|
|
|
base_dictionary/foreach
|
|
|
|
base_dictionary/remove
|
|
|
|
base_dictionary/clone
|
|
|
|
base_dictionary/json
|
2021-10-08 16:46:35 +02:00
|
|
|
base_dictionary/keys_ordered
|
2018-01-19 09:18:52 +01:00
|
|
|
base_fifo/construct
|
|
|
|
base_fifo/io
|
2019-03-15 11:26:51 +01:00
|
|
|
base_json/encode
|
|
|
|
base_json/decode
|
2018-01-19 09:18:52 +01:00
|
|
|
base_json/invalid1
|
2018-06-06 16:27:33 +02:00
|
|
|
base_object_packer/pack_null
|
|
|
|
base_object_packer/pack_false
|
|
|
|
base_object_packer/pack_true
|
|
|
|
base_object_packer/pack_number
|
|
|
|
base_object_packer/pack_string
|
|
|
|
base_object_packer/pack_array
|
|
|
|
base_object_packer/pack_object
|
2018-01-19 09:18:52 +01:00
|
|
|
base_match/tolong
|
|
|
|
base_netstring/netstring
|
|
|
|
base_object/construct
|
|
|
|
base_object/getself
|
|
|
|
base_serialize/scalar
|
|
|
|
base_serialize/array
|
|
|
|
base_serialize/dictionary
|
|
|
|
base_serialize/object
|
|
|
|
base_shellescape/escape_basic
|
|
|
|
base_shellescape/escape_quoted
|
|
|
|
base_stacktrace/stacktrace
|
|
|
|
base_stream/readline_stdio
|
|
|
|
base_string/construct
|
|
|
|
base_string/equal
|
|
|
|
base_string/clear
|
|
|
|
base_string/append
|
|
|
|
base_string/trim
|
|
|
|
base_string/contains
|
|
|
|
base_string/replace
|
|
|
|
base_string/index
|
|
|
|
base_string/find
|
|
|
|
base_timer/construct
|
|
|
|
base_timer/interval
|
|
|
|
base_timer/invoke
|
|
|
|
base_timer/scope
|
2021-03-19 10:29:55 +01:00
|
|
|
base_tlsutility/sha1
|
2023-12-12 17:15:25 +01:00
|
|
|
base_tlsutility/iscauptodate_ok
|
|
|
|
base_tlsutility/iscauptodate_expiring
|
|
|
|
base_tlsutility/iscertuptodate_ok
|
|
|
|
base_tlsutility/iscertuptodate_expiring
|
|
|
|
base_tlsutility/iscertuptodate_old
|
2018-01-19 09:18:52 +01:00
|
|
|
base_type/gettype
|
|
|
|
base_type/assign
|
|
|
|
base_type/byname
|
|
|
|
base_type/instantiate
|
2019-08-14 11:22:55 +02:00
|
|
|
base_utility/parse_version
|
2019-08-14 13:14:43 +02:00
|
|
|
base_utility/compare_version
|
2019-02-22 16:58:26 +01:00
|
|
|
base_utility/comparepasswords_works
|
|
|
|
base_utility/comparepasswords_issafe
|
2019-03-13 18:12:58 +01:00
|
|
|
base_utility/validateutf8
|
2021-01-28 16:25:12 +01:00
|
|
|
base_utility/EscapeCreateProcessArg
|
2021-06-17 08:49:54 +02:00
|
|
|
base_utility/TruncateUsingHash
|
2018-01-19 09:18:52 +01:00
|
|
|
base_value/scalar
|
|
|
|
base_value/convert
|
|
|
|
base_value/format
|
2023-12-13 16:25:33 +01:00
|
|
|
config_apply/gettargethosts_literal
|
|
|
|
config_apply/gettargethosts_const
|
|
|
|
config_apply/gettargethosts_swapped
|
|
|
|
config_apply/gettargethosts_two
|
|
|
|
config_apply/gettargethosts_three
|
|
|
|
config_apply/gettargethosts_mixed
|
|
|
|
config_apply/gettargethosts_redundant
|
|
|
|
config_apply/gettargethosts_badconst
|
|
|
|
config_apply/gettargethosts_notliteral
|
|
|
|
config_apply/gettargethosts_wrongop
|
|
|
|
config_apply/gettargethosts_wrongattr
|
|
|
|
config_apply/gettargethosts_wrongvar
|
|
|
|
config_apply/gettargethosts_noindexer
|
|
|
|
config_apply/gettargetservices_literal
|
|
|
|
config_apply/gettargetservices_const
|
|
|
|
config_apply/gettargetservices_swapped_outer
|
|
|
|
config_apply/gettargetservices_swapped_inner
|
|
|
|
config_apply/gettargetservices_two
|
|
|
|
config_apply/gettargetservices_three
|
|
|
|
config_apply/gettargetservices_mixed
|
|
|
|
config_apply/gettargetservices_redundant
|
|
|
|
config_apply/gettargetservices_badconst
|
|
|
|
config_apply/gettargetservices_notliteral
|
|
|
|
config_apply/gettargetservices_wrongop_outer
|
|
|
|
config_apply/gettargetservices_wrongop_host
|
|
|
|
config_apply/gettargetservices_wrongop_service
|
|
|
|
config_apply/gettargetservices_wrongattr_host
|
|
|
|
config_apply/gettargetservices_wrongattr_service
|
|
|
|
config_apply/gettargetservices_wrongvar_host
|
|
|
|
config_apply/gettargetservices_wrongvar_service
|
|
|
|
config_apply/gettargetservices_noindexer_host
|
|
|
|
config_apply/gettargetservices_noindexer_service
|
2018-01-19 09:18:52 +01:00
|
|
|
config_ops/simple
|
|
|
|
config_ops/advanced
|
|
|
|
icinga_checkresult/host_1attempt
|
|
|
|
icinga_checkresult/host_2attempts
|
|
|
|
icinga_checkresult/host_3attempts
|
|
|
|
icinga_checkresult/service_1attempt
|
|
|
|
icinga_checkresult/service_2attempts
|
|
|
|
icinga_checkresult/service_3attempts
|
|
|
|
icinga_checkresult/host_flapping_notification
|
|
|
|
icinga_checkresult/service_flapping_notification
|
2022-01-28 15:15:44 +01:00
|
|
|
icinga_checkresult/suppressed_notification
|
2020-02-11 15:02:57 +01:00
|
|
|
icinga_dependencies/multi_parent
|
2019-07-16 13:46:22 +02:00
|
|
|
icinga_notification/strings
|
2018-01-19 09:18:52 +01:00
|
|
|
icinga_notification/state_filter
|
|
|
|
icinga_notification/type_filter
|
2023-06-14 17:00:56 +02:00
|
|
|
icinga_notification/no_filter_problem_no_duplicate
|
|
|
|
icinga_notification/filter_problem_no_duplicate
|
|
|
|
icinga_notification/volatile_filter_problem_duplicate
|
2023-12-12 15:55:04 +01:00
|
|
|
icinga_notification/no_recovery_filter_no_duplicate
|
|
|
|
icinga_notification/recovery_filter_duplicate
|
2018-01-19 09:18:52 +01:00
|
|
|
icinga_macros/simple
|
|
|
|
icinga_legacytimeperiod/simple
|
2019-05-07 17:23:16 +02:00
|
|
|
icinga_legacytimeperiod/advanced
|
2021-06-30 16:00:57 +02:00
|
|
|
icinga_legacytimeperiod/dst
|
2021-10-26 10:28:07 +02:00
|
|
|
icinga_legacytimeperiod/dst_isinside
|
2018-01-19 09:18:52 +01:00
|
|
|
icinga_perfdata/empty
|
|
|
|
icinga_perfdata/simple
|
|
|
|
icinga_perfdata/quotes
|
|
|
|
icinga_perfdata/multiple
|
2021-08-13 10:18:08 +02:00
|
|
|
icinga_perfdata/multiline
|
2021-05-11 16:47:03 +02:00
|
|
|
icinga_perfdata/normalize
|
2018-01-19 09:18:52 +01:00
|
|
|
icinga_perfdata/uom
|
|
|
|
icinga_perfdata/warncritminmax
|
2024-03-26 12:49:24 +01:00
|
|
|
icinga_perfdata/ignore_warn_crit_ranges
|
2018-01-19 09:18:52 +01:00
|
|
|
icinga_perfdata/invalid
|
|
|
|
icinga_perfdata/multi
|
2020-11-26 18:53:57 +01:00
|
|
|
icinga_perfdata/scientificnotation
|
2021-06-08 11:44:12 +02:00
|
|
|
icinga_perfdata/parse_edgecases
|
2024-03-26 12:49:24 +01:00
|
|
|
icinga_perfdata/empty_warn_crit_min_max
|
2023-12-19 12:21:03 +01:00
|
|
|
methods_pluginnotificationtask/truncate_long_output
|
2021-06-07 13:14:06 +02:00
|
|
|
remote_configpackageutility/ValidateName
|
2018-01-19 09:18:52 +01:00
|
|
|
remote_url/id_and_path
|
|
|
|
remote_url/parameters
|
|
|
|
remote_url/get_and_set
|
|
|
|
remote_url/format
|
|
|
|
remote_url/illegal_legal_strings
|
2013-11-03 13:45:26 +01:00
|
|
|
)
|
|
|
|
|
2015-02-19 17:53:29 +01:00
|
|
|
if(ICINGA2_WITH_LIVESTATUS)
|
2016-08-24 11:11:20 +02:00
|
|
|
set(livestatus_test_SOURCES
|
2018-03-23 13:30:12 +01:00
|
|
|
icingaapplication-fixture.cpp
|
2017-12-24 08:18:33 +01:00
|
|
|
livestatus-fixture.cpp
|
2016-08-24 11:11:20 +02:00
|
|
|
livestatus.cpp
|
2018-01-17 14:59:02 +01:00
|
|
|
${base_OBJS}
|
2018-01-17 04:28:21 +01:00
|
|
|
$<TARGET_OBJECTS:config>
|
|
|
|
$<TARGET_OBJECTS:remote>
|
|
|
|
$<TARGET_OBJECTS:icinga>
|
|
|
|
$<TARGET_OBJECTS:livestatus>
|
|
|
|
$<TARGET_OBJECTS:methods>
|
2016-08-24 11:11:20 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
if(ICINGA2_UNITY_BUILD)
|
|
|
|
mkunity_target(livestatus test livestatus_test_SOURCES)
|
|
|
|
endif()
|
|
|
|
|
2015-02-19 17:53:29 +01:00
|
|
|
add_boost_test(livestatus
|
2017-12-24 08:18:33 +01:00
|
|
|
SOURCES test-runner.cpp ${livestatus_test_SOURCES}
|
2018-01-17 04:28:21 +01:00
|
|
|
LIBRARIES ${base_DEPS}
|
2015-02-19 17:53:29 +01:00
|
|
|
TESTS livestatus/hosts livestatus/services
|
|
|
|
)
|
|
|
|
endif()
|
2017-10-19 17:32:52 +02:00
|
|
|
|
|
|
|
set(icinga_checkable_test_SOURCES
|
2018-03-23 13:30:12 +01:00
|
|
|
icingaapplication-fixture.cpp
|
2017-12-24 08:18:33 +01:00
|
|
|
icinga-checkable-fixture.cpp
|
|
|
|
icinga-checkable-flapping.cpp
|
2018-01-17 14:59:02 +01:00
|
|
|
${base_OBJS}
|
2018-01-17 04:28:21 +01:00
|
|
|
$<TARGET_OBJECTS:config>
|
|
|
|
$<TARGET_OBJECTS:remote>
|
|
|
|
$<TARGET_OBJECTS:icinga>
|
|
|
|
$<TARGET_OBJECTS:cli>
|
2017-10-19 17:32:52 +02:00
|
|
|
)
|
|
|
|
|
2017-12-13 11:35:38 +01:00
|
|
|
if(ICINGA2_UNITY_BUILD)
|
|
|
|
mkunity_target(icinga_checkable test icinga_checkable_test_SOURCES)
|
|
|
|
endif()
|
|
|
|
|
2017-10-19 17:32:52 +02:00
|
|
|
add_boost_test(icinga_checkable
|
2017-12-24 08:18:33 +01:00
|
|
|
SOURCES test-runner.cpp ${icinga_checkable_test_SOURCES}
|
2018-01-17 04:28:21 +01:00
|
|
|
LIBRARIES ${base_DEPS}
|
2017-10-19 17:32:52 +02:00
|
|
|
TESTS icinga_checkable_flapping/host_not_flapping
|
|
|
|
icinga_checkable_flapping/host_flapping
|
|
|
|
icinga_checkable_flapping/host_flapping_recover
|
|
|
|
icinga_checkable_flapping/host_flapping_docs_example
|
|
|
|
)
|