Greenbone Vulnerability Management Libraries 23.16.0
openvasd_tests.c File Reference
#include "openvasd.c"
#include <cgreen/assertions.h>
#include <cgreen/cgreen.h>
#include <cgreen/constraint_syntax_helpers.h>
#include <cgreen/internal/c_assertions.h>
#include <cgreen/mocks.h>

Functions

http_scanner_resp_t http_scanner_send_request (http_scanner_connector_t conn, http_scanner_method_t method, const gchar *path, const gchar *data, const gchar *content_type)
gchar * http_scanner_stream_str (http_scanner_connector_t conn)
void http_scanner_reset_stream (http_scanner_connector_t conn)
static gboolean json_array_contains_string (cJSON *array, const char *value)
 Describe (openvasd)
 BeforeEach (openvasd)
 AfterEach (openvasd)
 Ensure (openvasd, openvasd_parsed_performance_error_response_frees_parser)
 Ensure (openvasd, openvasd_get_performance_frees_body_on_success)
 Ensure (openvasd, openvasd_get_performance_frees_body_on_error)
 Ensure (openvasd, openvasd_add_credential_to_scan_json)
 Ensure (openvasd, openvasd_add_port_to_scan_json)
 Ensure (openvasd, openvasd_add_port_to_scan_json_max_port)
 Ensure (openvasd, openvasd_add_port_to_scan_json_normal_range_udp)
 Ensure (openvasd, openvasd_add_port_to_scan_json_end_out_of_bounds)
 Ensure (openvasd, openvasd_add_port_to_scan_json_end_less_than_start)
 Ensure (openvasd, openvasd_add_vts_to_scan_json)
 Ensure (openvasd, openvasd_set_alive_test_methods)
 Ensure (openvasd, openvasd_set_host_discovery_ipv6_alive_test_method)
 Ensure (openvasd, openvasd_build_scan_config_json_with_host_discovery_ipv6)
 Ensure (openvasd, openvasd_build_scan_config_json_with_alive_tests)
 Ensure (openvasd, openvasd_build_scan_config_json_with_host_discovery_ipv6_only)
 Ensure (openvasd, openvasd_build_scan_config_json_with_finished_hosts)
 Ensure (openvasd, openvasd_build_scan_config_json_without_finished_hosts)
int main (int argc, char **argv)

Variables

static long mock_performance_code
static const gchar * mock_performance_body

Function Documentation

◆ AfterEach()

AfterEach ( openvasd )

◆ BeforeEach()

BeforeEach ( openvasd )

◆ Describe()

Describe ( openvasd )

◆ Ensure() [1/17]

Ensure ( openvasd ,
openvasd_add_credential_to_scan_json  )

◆ Ensure() [2/17]

Ensure ( openvasd ,
openvasd_add_port_to_scan_json  )

◆ Ensure() [3/17]

Ensure ( openvasd ,
openvasd_add_port_to_scan_json_end_less_than_start  )

◆ Ensure() [4/17]

Ensure ( openvasd ,
openvasd_add_port_to_scan_json_end_out_of_bounds  )

◆ Ensure() [5/17]

Ensure ( openvasd ,
openvasd_add_port_to_scan_json_max_port  )

◆ Ensure() [6/17]

Ensure ( openvasd ,
openvasd_add_port_to_scan_json_normal_range_udp  )

◆ Ensure() [7/17]

Ensure ( openvasd ,
openvasd_add_vts_to_scan_json  )

◆ Ensure() [8/17]

Ensure ( openvasd ,
openvasd_build_scan_config_json_with_alive_tests  )

◆ Ensure() [9/17]

Ensure ( openvasd ,
openvasd_build_scan_config_json_with_finished_hosts  )

◆ Ensure() [10/17]

Ensure ( openvasd ,
openvasd_build_scan_config_json_with_host_discovery_ipv6  )

◆ Ensure() [11/17]

Ensure ( openvasd ,
openvasd_build_scan_config_json_with_host_discovery_ipv6_only  )

◆ Ensure() [12/17]

Ensure ( openvasd ,
openvasd_build_scan_config_json_without_finished_hosts  )

◆ Ensure() [13/17]

Ensure ( openvasd ,
openvasd_get_performance_frees_body_on_error  )

◆ Ensure() [14/17]

Ensure ( openvasd ,
openvasd_get_performance_frees_body_on_success  )

◆ Ensure() [15/17]

Ensure ( openvasd ,
openvasd_parsed_performance_error_response_frees_parser  )

◆ Ensure() [16/17]

Ensure ( openvasd ,
openvasd_set_alive_test_methods  )

◆ Ensure() [17/17]

Ensure ( openvasd ,
openvasd_set_host_discovery_ipv6_alive_test_method  )

◆ http_scanner_reset_stream()

void http_scanner_reset_stream ( http_scanner_connector_t conn)

◆ http_scanner_send_request()

http_scanner_resp_t http_scanner_send_request ( http_scanner_connector_t conn,
http_scanner_method_t method,
const gchar * path,
const gchar * data,
const gchar * content_type )

◆ http_scanner_stream_str()

gchar * http_scanner_stream_str ( http_scanner_connector_t conn)

◆ json_array_contains_string()

gboolean json_array_contains_string ( cJSON * array,
const char * value )
static

◆ main()

int main ( int argc,
char ** argv )

Variable Documentation

◆ mock_performance_body

const gchar* mock_performance_body
static

◆ mock_performance_code

long mock_performance_code
static