]> granicus.if.org Git - icinga2/blob - test/CMakeLists.txt
Remove ApiUser password_hash functionality
[icinga2] / test / CMakeLists.txt
1 # Icinga 2
2 # Copyright (C) 2012-2018 Icinga Development Team (https://www.icinga.com/)
3 #
4 # This program is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License
6 # as published by the Free Software Foundation; either version 2
7 # of the License, or (at your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software Foundation
16 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
17
18 include(BoostTestTargets)
19
20 set(base_test_SOURCES
21   icingaapplication-fixture.cpp
22   base-array.cpp
23   base-base64.cpp
24   base-convert.cpp
25   base-dictionary.cpp
26   base-fifo.cpp
27   base-json.cpp
28   base-match.cpp
29   base-netstring.cpp
30   base-object.cpp
31   base-serialize.cpp
32   base-shellescape.cpp
33   base-stacktrace.cpp
34   base-stream.cpp
35   base-string.cpp
36   base-timer.cpp
37   base-type.cpp
38   base-value.cpp
39   config-ops.cpp
40   icinga-checkresult.cpp
41   icinga-legacytimeperiod.cpp
42   icinga-macros.cpp
43   icinga-notification.cpp
44   icinga-perfdata.cpp
45   remote-url.cpp
46   ${base_OBJS}
47   $<TARGET_OBJECTS:config>
48   $<TARGET_OBJECTS:remote>
49   $<TARGET_OBJECTS:icinga>
50 )
51
52 if(ICINGA2_UNITY_BUILD)
53   mkunity_target(base test base_test_SOURCES)
54 endif()
55
56 add_boost_test(base
57   SOURCES test-runner.cpp ${base_test_SOURCES}
58   LIBRARIES ${base_DEPS}
59   TESTS
60     base_array/construct
61     base_array/getset
62     base_array/resize
63     base_array/insert
64     base_array/remove
65     base_array/unique
66     base_array/foreach
67     base_array/clone
68     base_array/json
69     base_base64/base64
70     base_convert/tolong
71     base_convert/todouble
72     base_convert/tostring
73     base_convert/tobool
74     base_dictionary/construct
75     base_dictionary/get1
76     base_dictionary/get2
77     base_dictionary/foreach
78     base_dictionary/remove
79     base_dictionary/clone
80     base_dictionary/json
81     base_fifo/construct
82     base_fifo/io
83     base_json/invalid1
84     base_match/tolong
85     base_netstring/netstring
86     base_object/construct
87     base_object/getself
88     base_serialize/scalar
89     base_serialize/array
90     base_serialize/dictionary
91     base_serialize/object
92     base_shellescape/escape_basic
93     base_shellescape/escape_quoted
94     base_stacktrace/stacktrace
95     base_stream/readline_stdio
96     base_string/construct
97     base_string/equal
98     base_string/clear
99     base_string/append
100     base_string/trim
101     base_string/contains
102     base_string/replace
103     base_string/index
104     base_string/find
105     base_timer/construct
106     base_timer/interval
107     base_timer/invoke
108     base_timer/scope
109     base_type/gettype
110     base_type/assign
111     base_type/byname
112     base_type/instantiate
113     base_value/scalar
114     base_value/convert
115     base_value/format
116     config_ops/simple
117     config_ops/advanced
118     icinga_checkresult/host_1attempt
119     icinga_checkresult/host_2attempts
120     icinga_checkresult/host_3attempts
121     icinga_checkresult/service_1attempt
122     icinga_checkresult/service_2attempts
123     icinga_checkresult/service_3attempts
124     icinga_checkresult/host_flapping_notification
125     icinga_checkresult/service_flapping_notification
126     icinga_notification/state_filter
127     icinga_notification/type_filter
128     icinga_macros/simple
129     icinga_legacytimeperiod/simple
130     icinga_perfdata/empty
131     icinga_perfdata/simple
132     icinga_perfdata/quotes
133     icinga_perfdata/multiple
134     icinga_perfdata/uom
135     icinga_perfdata/warncritminmax
136     icinga_perfdata/ignore_invalid_warn_crit_min_max
137     icinga_perfdata/invalid
138     icinga_perfdata/multi
139     remote_url/id_and_path
140     remote_url/parameters
141     remote_url/get_and_set
142     remote_url/format
143     remote_url/illegal_legal_strings
144 )
145
146 if(ICINGA2_WITH_LIVESTATUS)
147   set(livestatus_test_SOURCES
148     icingaapplication-fixture.cpp
149     livestatus-fixture.cpp
150     livestatus.cpp
151     ${base_OBJS}
152     $<TARGET_OBJECTS:config>
153     $<TARGET_OBJECTS:remote>
154     $<TARGET_OBJECTS:icinga>
155     $<TARGET_OBJECTS:livestatus>
156     $<TARGET_OBJECTS:methods>
157   )
158
159   if(ICINGA2_UNITY_BUILD)
160       mkunity_target(livestatus test livestatus_test_SOURCES)
161   endif()
162
163   add_boost_test(livestatus
164     SOURCES test-runner.cpp ${livestatus_test_SOURCES}
165     LIBRARIES ${base_DEPS}
166     TESTS livestatus/hosts livestatus/services
167   )
168 endif()
169
170 set(icinga_checkable_test_SOURCES
171   icingaapplication-fixture.cpp
172   icinga-checkable-fixture.cpp
173   icinga-checkable-flapping.cpp
174   ${base_OBJS}
175   $<TARGET_OBJECTS:config>
176   $<TARGET_OBJECTS:remote>
177   $<TARGET_OBJECTS:icinga>
178   $<TARGET_OBJECTS:cli>
179 )
180
181 if(ICINGA2_UNITY_BUILD)
182     mkunity_target(icinga_checkable test icinga_checkable_test_SOURCES)
183 endif()
184
185 add_boost_test(icinga_checkable
186   SOURCES test-runner.cpp ${icinga_checkable_test_SOURCES}
187   LIBRARIES ${base_DEPS}
188   TESTS icinga_checkable_flapping/host_not_flapping
189         icinga_checkable_flapping/host_flapping
190         icinga_checkable_flapping/host_flapping_recover
191         icinga_checkable_flapping/host_flapping_docs_example
192 )