syslog-ng source
test-http-scraper-responder-server.c File Reference
#include <criterion/criterion.h>
#include <criterion/parameterized.h>
#include "libtest/mock-transport.h"
#include "libtest/proto_lib.h"
#include "libtest/msg_parse_lib.h"
#include "multi-line/empty-line-separated-multi-line.h"
#include "logproto/logproto-http-scraper-responder-server.h"
#include "stats/stats-prometheus.h"
#include <iv.h>
Include dependency graph for test-http-scraper-responder-server.c:

Macros

#define MOCKED_REQUEST_H1   "GET /metrics HTTP/1.1"
 
#define MOCKED_REQUEST_H2   "Host: 192.168.1.111:8080"
 
#define MOCKED_NOT_MATCHING_REQUEST_H1   "not matching header"
 

Functions

void stats_generate_prometheus (StatsPrometheusRecordFunc process_record, gpointer user_data, gboolean with_legacy, gboolean without_orphaned, gboolean *cancelled)
 
GString * stats_execute_query_command (const gchar *command, gpointer user_data, gboolean *cancelled)
 
 Test (log_proto, test_http_scraper_multiline)
 
 Test (log_proto, test_http_scraper_freq_limit)
 
 Test (log_proto, test_http_scraper_pattern)
 
 Test (log_proto, test_http_scraper_stat)
 
 Test (log_proto, test_http_scraper_query)
 

Macro Definition Documentation

◆ MOCKED_NOT_MATCHING_REQUEST_H1

#define MOCKED_NOT_MATCHING_REQUEST_H1   "not matching header"

◆ MOCKED_REQUEST_H1

#define MOCKED_REQUEST_H1   "GET /metrics HTTP/1.1"

◆ MOCKED_REQUEST_H2

#define MOCKED_REQUEST_H2   "Host: 192.168.1.111:8080"

Function Documentation

◆ stats_execute_query_command()

GString* stats_execute_query_command ( const gchar *  command,
gpointer  user_data,
gboolean *  cancelled 
)

◆ stats_generate_prometheus()

void stats_generate_prometheus ( StatsPrometheusRecordFunc  process_record,
gpointer  user_data,
gboolean  with_legacy,
gboolean  without_orphaned,
gboolean *  cancelled 
)

◆ Test() [1/5]

Test ( log_proto  ,
test_http_scraper_freq_limit   
)

◆ Test() [2/5]

Test ( log_proto  ,
test_http_scraper_multiline   
)

◆ Test() [3/5]

Test ( log_proto  ,
test_http_scraper_pattern   
)

◆ Test() [4/5]

Test ( log_proto  ,
test_http_scraper_query   
)

◆ Test() [5/5]

Test ( log_proto  ,
test_http_scraper_stat   
)