asterisk/tests
Holger Hans Peter Freyther 986c71953c res_prometheus: Do not generate broken metrics
In 8d6fdf9c3a invisible bridges were
skipped but that lead to producing metrics with no name and no help.

Keep track of the number of metrics configured and then only emit these.
Add a basic testcase that verifies that there is no '(NULL)' in the
output.

ASTERISK-30474

(cherry picked from commit a10de8bc72)
2023-09-06 16:55:59 +00:00
..
CI runUnittests.sh: Save coredumps to proper directory 2022-11-02 12:02:55 -05:00
keys test: Add coverage for res_crypto 2022-09-12 16:18:19 -05:00
Makefile test: Add coverage for res_crypto 2022-09-12 16:18:19 -05:00
test_abstract_jb.c tests: Spelling fixes 2021-11-15 22:48:56 -06:00
test_acl.c Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
test_aeap.c res_aeap & res_speech_aeap: Add Asterisk External Application Protocol 2022-04-26 14:26:48 -05:00
test_aeap_speech.c res_aeap & res_speech_aeap: Add Asterisk External Application Protocol 2022-04-26 14:26:48 -05:00
test_aeap_transaction.c res_aeap & res_speech_aeap: Add Asterisk External Application Protocol 2022-04-26 14:26:48 -05:00
test_aeap_transport.c websocket / aeap: Handle poll() interruptions better. 2022-07-11 04:10:19 -05:00
test_ami_security_events.sh Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
test_amihooks.c core: Remove dead symbols from asterisk.exports.in. 2018-03-19 17:59:59 -04:00
test_aoc.c tests: Spelling fixes 2021-11-15 22:48:56 -06:00
test_app.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
test_ari.c modules: Add missing run time module support levels. 2018-10-17 14:50:54 -05:00
test_ari_model.c optional_api: Remove unused nonoptreq fields 2018-09-12 12:34:54 -05:00
test_ast_format_str_reduce.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
test_astobj2.c progdocs: Fix for Doxygen, the hidden parts. 2021-12-02 10:37:38 -06:00
test_astobj2_thrash.c progdocs: Fix for Doxygen, the hidden parts. 2021-12-02 10:37:38 -06:00
test_astobj2_weaken.c astobj2: Create function to copy weak proxied objects from container. 2018-11-21 08:47:27 -05:00
test_bridging.c progdocs: Fix Doxygen left-overs. 2021-12-13 08:57:26 -06:00
test_bucket.c modules: change module LOAD_FAILUREs to LOAD_DECLINES 2017-04-12 15:57:21 -06:00
test_callerid.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
test_capture.c test: Add test coverage for capture child process output 2022-09-12 11:23:04 -05:00
test_cdr.c cdr: allow disabling CDR by default on new channels 2022-01-31 09:24:12 -06:00
test_cel.c Merge "bridges: Remove reliance on stasis caching" 2018-11-29 15:05:33 -06:00
test_channel.c channel: Remove old epoll support and fixed max number of file descriptors. 2017-03-27 19:54:44 +00:00
test_channel_feature_hooks.c modules: change module LOAD_FAILUREs to LOAD_DECLINES 2017-04-12 15:57:21 -06:00
test_config.c res_geolocation: Fix segfault when there's an empty element 2022-09-13 09:51:25 -05:00
test_conversions.c conversions.c: Specify that we only want to parse decimal numbers. 2022-03-23 17:13:03 -05:00
test_core_codec.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
test_core_format.c Correct some leaks in unit tests. 2017-08-03 22:09:28 -04:00
test_crypto.c test_crypto.c: Fix getcwd(…) build error. 2023-02-27 15:39:49 -06:00
test_data_buffer.c res_rtp: Add unit tests for RTCP stats. 2019-09-10 13:11:07 -05:00
test_db.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
test_devicestate.c tests: Fix for Doxygen. 2021-11-18 10:19:10 -06:00
test_dlinklists.c Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
test_dns.c tests_dns: Make DNS tests older nameser.h compatible 2016-12-08 07:22:33 +11:00
test_dns_naptr.c tests: Fix for Doxygen. 2021-11-18 10:19:10 -06:00
test_dns_query_set.c tests_dns: Make DNS tests older nameser.h compatible 2016-12-08 07:22:33 +11:00
test_dns_recurring.c tests_dns: Make DNS tests older nameser.h compatible 2016-12-08 07:22:33 +11:00
test_dns_srv.c tests_dns: Make DNS tests older nameser.h compatible 2016-12-08 07:22:33 +11:00
test_endpoints.c modules: Add missing run time module support levels. 2018-10-17 14:50:54 -05:00
test_event.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
test_expr.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
test_file.c file.c/__ast_file_read_dirs: Fix issues on filesystems without d_type 2016-11-15 21:21:59 -05:00
test_format_cache.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
test_format_cap.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
test_func_file.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
test_gosub.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
test_hashtab_thrash.c progdocs: Fix for Doxygen, the hidden parts. 2021-12-02 10:37:38 -06:00
test_heap.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
test_http_media_cache.c test_http_media_cache.c: Fix copy/paste error during test deregistration. 2021-09-13 07:11:01 -05:00
test_jitterbuf.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
test_json.c test_json: Remove duplicated static function. 2022-11-21 07:43:38 -06:00
test_linkedlists.c various: Fix GCC 11 compilation issues. 2021-10-21 13:18:41 -05:00
test_locale.c Compiler fixes for gcc 10 2020-06-10 09:33:28 -05:00
test_logger.c tests: Fix warnings found on Mac. 2017-11-18 22:13:32 -05:00
test_media_cache.c tests: Spelling fixes 2021-11-15 22:48:56 -06:00
test_message.c tests: Fix for Doxygen. 2021-11-18 10:19:10 -06:00
test_mwi.c tests: Fix compilation errors on 32-bit. 2022-10-27 14:29:45 -05:00
test_named_lock.c lock: Add named lock capability 2016-04-08 13:52:02 -05:00
test_netsock2.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
test_optional_api.c tests: Spelling fixes 2021-11-15 22:48:56 -06:00
test_pbx.c test.c: Fix counting of tests and add 2 new tests 2023-05-08 18:13:35 +00:00
test_poll.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
test_res_pjsip_scheduler.c test_res_pjsip_scheduler: Fix possible write after free in scheduler_policy. 2018-11-13 13:26:06 -05:00
test_res_pjsip_session_caps.c res_pjsip: Adjust outgoing offer call pref. 2020-10-13 11:10:56 -03:00
test_res_prometheus.c res_prometheus: Do not generate broken metrics 2023-09-06 16:55:59 +00:00
test_res_rtp.c res_rtp_asterisk: Asterisk Media Experience Score (MES) 2023-01-09 11:40:46 -06:00
test_res_stasis.c res/res_ari: Added timestamp as a requirement for all ARI events 2019-03-11 23:57:01 +01:00
test_sched.c sched: fix and test a double deref on delete of an executing call back 2022-01-21 10:06:57 -06:00
test_scope_trace.c Scope Trace: Add some new tracing macros and an ast_str helper 2020-06-30 09:22:32 -05:00
test_scoped_lock.c astobj2: Remove legacy ao2_container_alloc routine. 2018-11-21 09:56:16 -05:00
test_security_events.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
test_skel.c Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
test_sorcery.c tests: Spelling fixes 2021-11-15 22:48:56 -06:00
test_sorcery_astdb.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
test_sorcery_memory_cache_thrash.c tests: Spelling fixes 2021-11-15 22:48:56 -06:00
test_sorcery_realtime.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
test_stasis.c tests: Fix compilation errors on 32-bit. 2022-10-27 14:29:45 -05:00
test_stasis_channels.c ari: expose channel driver's unique id to ARI channel resource 2022-05-22 15:40:33 -05:00
test_stasis_endpoints.c test_statis_endpoints: Fix channel_messages test again 2023-07-10 11:49:48 +00:00
test_stasis_state.c tests: Fix compilation errors on 32-bit. 2022-10-27 14:29:45 -05:00
test_stream.c Streams: Add features for Advanced Codec Negotiation 2020-07-01 09:27:14 -05:00
test_stringfields.c stringfields: Update extended string fields for master only. 2016-04-13 14:01:37 -06:00
test_strings.c Geolocation: Base Asterisk Prereqs 2022-07-07 08:19:14 -05:00
test_substitution.c Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
test_taskprocessor.c tests: Spelling fixes 2021-11-15 22:48:56 -06:00
test_threadpool.c taskprocessor: Warn on unused result from pushing task. 2018-10-17 09:14:05 -04:00
test_time.c test_time.c: Tolerate DST transitions 2022-01-04 07:48:35 -06:00
test_uri.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
test_utils.c build: Fix a few gcc 13 issues 2023-07-10 11:49:48 +00:00
test_uuid.c Add uuid wrapper API call ast_uuid_generate_str(). 2013-03-28 23:59:20 +00:00
test_vector.c GCC12: Fixes for 16+ 2022-05-09 08:21:45 -05:00
test_voicemail_api.c tests: Fix for Doxygen. 2021-11-18 10:19:10 -06:00
test_websocket_client.c test_websocket_client.c: Disable websocket_client_create_and_connect test. 2018-12-02 08:55:23 -05:00
test_xml_escape.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00