Greenbone Vulnerability Management Libraries: gmp/gmp_tests.c File Reference

Greenbone Vulnerability Management Libraries 23.1.1

Functions
gmp_tests.c File Reference
`#include "gmp.c"`
`#include <cgreen/cgreen.h>`
`#include <cgreen/mocks.h>`

## Functions
int | __wrap_gvm_server_sendf (gnutls_session_t *session, const char *fmt,...)
int | __wrap_gvm_server_sendf_xml (gnutls_session_t *session, const char *fmt,...)
int | __wrap_gvm_server_sendf_xml_quiet (gnutls_session_t *session, const char *fmt,...)
int | __wrap_read_entity (gnutls_session_t *session, entity_t *entity)
int | __wrap_try_read_entity (gnutls_session_t *session, int timeout, entity_t *entity)
int | __wrap_gvm_connection_sendf (gvm_connection_t *connection, const char *fmt,...)
int | __wrap_gvm_connection_sendf_xml_quiet (gvm_connection_t *connection, const char *fmt,...)
int | __wrap_read_entity_c (gvm_connection_t *connection, entity_t *entity)
int | __wrap_try_read_entity_c (gvm_connection_t *connection, int timeout, entity_t *entity)
| Describe (gmp)
| BeforeEach (gmp)
| AfterEach (gmp)
static entity_t | create_mock_entity (const char *name, const char *text)
static void | add_mock_attribute (entity_t entity, const char *name, const char *value)
static void | add_mock_child (entity_t parent, entity_t child)
| Ensure (gmp, gmp_task_status_returns_correct_string_for_valid_response)
| Ensure (gmp, gmp_task_status_returns_null_when_no_task)
| Ensure (gmp, gmp_task_status_returns_null_when_no_status)
| Ensure (gmp, gmp_read_create_response_returns_uuid_on_success)
| Ensure (gmp, gmp_read_create_response_succeeds_without_uuid_parameter)
| Ensure (gmp, gmp_read_create_response_returns_error_when_no_status)
| Ensure (gmp, gmp_read_create_response_returns_error_on_read_failure)
| Ensure (gmp, gmp_check_response_succeeds_with_valid_response)
| Ensure (gmp, gmp_check_response_returns_gmp_error_code)
| Ensure (gmp, gmp_check_response_returns_error_on_read_failure)
| Ensure (gmp, gmp_check_response_returns_error_when_no_status)
| Ensure (gmp, gmp_ping_succeeds_with_valid_response)
| Ensure (gmp, gmp_ping_returns_error_on_send_failure)
| Ensure (gmp, gmp_ping_returns_error_on_read_failure)
| Ensure (gmp, gmp_ping_returns_error_with_invalid_status)
| Ensure (gmp, gmp_authenticate_info_ext_c_returns_success_and_sets_outputs)
| Ensure (gmp, gmp_authenticate_info_ext_c_succeeds_without_optional_outputs)
| Ensure (gmp, gmp_authenticate_info_ext_c_returns_send_error)
| Ensure (gmp, gmp_authenticate_info_ext_c_returns_timeout_on_try_read_timeout)
| Ensure (gmp, gmp_authenticate_info_ext_c_returns_error_on_read_failure)
| Ensure (gmp, gmp_authenticate_info_ext_c_returns_error_when_status_empty)
| Ensure (gmp, gmp_authenticate_info_ext_c_returns_2_on_auth_failure)
| Ensure (gmp, gmp_authenticate_info_ext_c_leaves_jwt_null_when_requested_but_missing)
| Ensure (gmp, gmp_authenticate_info_ext_c_leaves_optional_outputs_null_when_absent)
int | main (int argc, char **argv)

## Function Documentation

## ◆ __wrap_gvm_connection_sendf()

int __wrap_gvm_connection_sendf | ( | gvm_connection_t * | connection,
|  | const char * | fmt,
|  |  | ... )

## ◆ __wrap_gvm_connection_sendf_xml_quiet()

int __wrap_gvm_connection_sendf_xml_quiet | ( | gvm_connection_t * | connection,
|  | const char * | fmt,
|  |  | ... )

## ◆ __wrap_gvm_server_sendf()

int __wrap_gvm_server_sendf | ( | gnutls_session_t * | session,
|  | const char * | fmt,
|  |  | ... )

## ◆ __wrap_gvm_server_sendf_xml()

int __wrap_gvm_server_sendf_xml | ( | gnutls_session_t * | session,
|  | const char * | fmt,
|  |  | ... )

## ◆ __wrap_gvm_server_sendf_xml_quiet()

int __wrap_gvm_server_sendf_xml_quiet | ( | gnutls_session_t * | session,
|  | const char * | fmt,
|  |  | ... )

## ◆ __wrap_read_entity()

int __wrap_read_entity | ( | gnutls_session_t * | session,
|  | entity_t * | entity )

## ◆ __wrap_read_entity_c()

int __wrap_read_entity_c | ( | gvm_connection_t * | connection,
|  | entity_t * | entity )

## ◆ __wrap_try_read_entity()

int __wrap_try_read_entity | ( | gnutls_session_t * | session,
|  | int | timeout,
|  | entity_t * | entity )

## ◆ __wrap_try_read_entity_c()

int __wrap_try_read_entity_c | ( | gvm_connection_t * | connection,
|  | int | timeout,
|  | entity_t * | entity )

## ◆ add_mock_attribute()

void add_mock_attribute | ( | entity_t | entity,
|  | const char * | name,
|  | const char * | value )
| static

## ◆ add_mock_child()

void add_mock_child | ( | entity_t | parent,
|  | entity_t | child )
| static

## ◆ AfterEach()

AfterEach | ( | gmp |  | ) |

## ◆ BeforeEach()

BeforeEach | ( | gmp |  | ) |

## ◆ create_mock_entity()

entity_t create_mock_entity | ( | const char * | name,
|  | const char * | text )
| static

## ◆ Describe()

Describe | ( | gmp |  | ) |

## ◆ Ensure() [1/24]

Ensure | ( | gmp | ,
|  | gmp_authenticate_info_ext_c_leaves_jwt_null_when_requested_but_missing | )

## ◆ Ensure() [2/24]

Ensure | ( | gmp | ,
|  | gmp_authenticate_info_ext_c_leaves_optional_outputs_null_when_absent | )

## ◆ Ensure() [3/24]

Ensure | ( | gmp | ,
|  | gmp_authenticate_info_ext_c_returns_2_on_auth_failure | )

## ◆ Ensure() [4/24]

Ensure | ( | gmp | ,
|  | gmp_authenticate_info_ext_c_returns_error_on_read_failure | )

## ◆ Ensure() [5/24]

Ensure | ( | gmp | ,
|  | gmp_authenticate_info_ext_c_returns_error_when_status_empty | )

## ◆ Ensure() [6/24]

Ensure | ( | gmp | ,
|  | gmp_authenticate_info_ext_c_returns_send_error | )

## ◆ Ensure() [7/24]

Ensure | ( | gmp | ,
|  | gmp_authenticate_info_ext_c_returns_success_and_sets_outputs | )

## ◆ Ensure() [8/24]

Ensure | ( | gmp | ,
|  | gmp_authenticate_info_ext_c_returns_timeout_on_try_read_timeout | )

## ◆ Ensure() [9/24]

Ensure | ( | gmp | ,
|  | gmp_authenticate_info_ext_c_succeeds_without_optional_outputs | )

## ◆ Ensure() [10/24]

Ensure | ( | gmp | ,
|  | gmp_check_response_returns_error_on_read_failure | )

## ◆ Ensure() [11/24]

Ensure | ( | gmp | ,
|  | gmp_check_response_returns_error_when_no_status | )

## ◆ Ensure() [12/24]

Ensure | ( | gmp | ,
|  | gmp_check_response_returns_gmp_error_code | )

## ◆ Ensure() [13/24]

Ensure | ( | gmp | ,
|  | gmp_check_response_succeeds_with_valid_response | )

## ◆ Ensure() [14/24]

Ensure | ( | gmp | ,
|  | gmp_ping_returns_error_on_read_failure | )

## ◆ Ensure() [15/24]

Ensure | ( | gmp | ,
|  | gmp_ping_returns_error_on_send_failure | )

## ◆ Ensure() [16/24]

Ensure | ( | gmp | ,
|  | gmp_ping_returns_error_with_invalid_status | )

## ◆ Ensure() [17/24]

Ensure | ( | gmp | ,
|  | gmp_ping_succeeds_with_valid_response | )

## ◆ Ensure() [18/24]

Ensure | ( | gmp | ,
|  | gmp_read_create_response_returns_error_on_read_failure | )

## ◆ Ensure() [19/24]

Ensure | ( | gmp | ,
|  | gmp_read_create_response_returns_error_when_no_status | )

## ◆ Ensure() [20/24]

Ensure | ( | gmp | ,
|  | gmp_read_create_response_returns_uuid_on_success | )

## ◆ Ensure() [21/24]

Ensure | ( | gmp | ,
|  | gmp_read_create_response_succeeds_without_uuid_parameter | )

## ◆ Ensure() [22/24]

Ensure | ( | gmp | ,
|  | gmp_task_status_returns_correct_string_for_valid_response | )

## ◆ Ensure() [23/24]

Ensure | ( | gmp | ,
|  | gmp_task_status_returns_null_when_no_status | )

## ◆ Ensure() [24/24]

Ensure | ( | gmp | ,
|  | gmp_task_status_returns_null_when_no_task | )

## ◆ main()

int main | ( | int | argc,
|  | char ** | argv )