syslog-ng source
test_context_info_db.c File Reference
#include <criterion/criterion.h>
#include <criterion/parameterized.h>
#include "libtest/cr_template.h"
#include "context-info-db.h"
#include "apphook.h"
#include "scratch-buffers.h"
#include "cfg.h"
#include <stdio.h>
#include <string.h>
Include dependency graph for test_context_info_db.c:

Classes

struct  TestNVPair
 
struct  TestNVPairStore
 
struct  TestNVPairPrefix
 

Macros

#define ARRAY_SIZE(a)   (sizeof(a) / sizeof((a)[0]))
 

Functions

 Test (add_contextual_data, test_empty_db)
 
 Test (add_contextual_data, test_purge_empty_db)
 
 Test (add_contextual_data, test_index_empty_db)
 
 Test (add_contextual_data, test_insert)
 
 Test (add_contextual_data, test_get_selectors)
 
 Test (add_contextual_data, test_inserted_nv_pairs)
 
 Test (add_contextual_data, test_import_with_valid_csv)
 
 Test (add_contextual_data, test_import_from_csv_with_crlf_line_ending,.description="RFC 4180: Each record should be located on a separate line, delimited by a line break (CRLF).")
 
 Test (add_contextual_data, test_import_from_csv_with_escaped_double_quote,.description="RFC 4180: If double-quotes are used to enclose fields, then a double-quote appearing inside a " "field must be escaped by preceding it with another double quote.")
 
 Test (add_contextual_data, test_import_with_invalid_csv_content)
 
 Test (add_contextual_data, test_import_with_csv_contains_invalid_line)
 
 ParameterizedTestParameters (add_contextual_data, test_import_with_prefix)
 
 ParameterizedTest (struct TestNVPairPrefix *param, add_contextual_data, test_import_with_prefix)
 
 Test (add_contextual_data, test_ignore_case_on)
 
 Test (add_contextual_data, test_ignore_case_off)
 
 Test (add_contextual_data, test_selected_nvpairs_when_ignore_case_on)
 
 TestSuite (add_contextual_data,.init=setup,.fini=teardown)
 

Macro Definition Documentation

◆ ARRAY_SIZE

#define ARRAY_SIZE (   a)    (sizeof(a) / sizeof((a)[0]))

Function Documentation

◆ ParameterizedTest()

ParameterizedTest ( struct TestNVPairPrefix param,
add_contextual_data  ,
test_import_with_prefix   
)

◆ ParameterizedTestParameters()

ParameterizedTestParameters ( add_contextual_data  ,
test_import_with_prefix   
)

◆ Test() [1/14]

Test ( add_contextual_data  ,
test_empty_db   
)

◆ Test() [2/14]

Test ( add_contextual_data  ,
test_get_selectors   
)

◆ Test() [3/14]

Test ( add_contextual_data  ,
test_ignore_case_off   
)

◆ Test() [4/14]

Test ( add_contextual_data  ,
test_ignore_case_on   
)

◆ Test() [5/14]

Test ( add_contextual_data  ,
test_import_from_csv_with_crlf_line_ending  ,
description = "RFC 4180: Each record should be located on a separate line, delimited by a line break (CRLF)." 
)

◆ Test() [6/14]

Test ( add_contextual_data  ,
test_import_from_csv_with_escaped_double_quote  ,
description = "RFC 4180: If double-quotes are used to enclose fields, then a double-quote appearing inside a " "field must be escaped by preceding it with another double quote." 
)

◆ Test() [7/14]

Test ( add_contextual_data  ,
test_import_with_csv_contains_invalid_line   
)

◆ Test() [8/14]

Test ( add_contextual_data  ,
test_import_with_invalid_csv_content   
)

◆ Test() [9/14]

Test ( add_contextual_data  ,
test_import_with_valid_csv   
)

◆ Test() [10/14]

Test ( add_contextual_data  ,
test_index_empty_db   
)

◆ Test() [11/14]

Test ( add_contextual_data  ,
test_insert   
)

◆ Test() [12/14]

Test ( add_contextual_data  ,
test_inserted_nv_pairs   
)

◆ Test() [13/14]

Test ( add_contextual_data  ,
test_purge_empty_db   
)

◆ Test() [14/14]

Test ( add_contextual_data  ,
test_selected_nvpairs_when_ignore_case_on   
)

◆ TestSuite()

TestSuite ( add_contextual_data  ,
init = setup,
fini = teardown 
)