8#include <cgreen/cgreen.h>
9#include <cgreen/mocks.h>
42Ensure (attack, comm_send_status_returns_neg1_for_null_args)
55Ensure (attack, comm_send_status_error_if_hostname_too_big)
65 long_host = g_malloc (2049);
66 for (index = 0; index < 2049; index++)
67 long_host[index] =
'a';
68 long_host[2048] =
'\0';
76Ensure (attack, comm_send_status_sends_correct_text)
79 struct kb_operations kb_ops_struct;
89 kb->kb_ops = &kb_ops_struct;
95 assert_that (strcmp (
given_name,
"internal/status"), is_equal_to (0));
96 assert_that (strcmp (
given_value,
"127.0.0.1/11/67"), is_equal_to (0));
107 suite = create_test_suite ();
109 add_test_with_context (suite, attack,
110 comm_send_status_returns_neg1_for_null_args);
111 add_test_with_context (suite, attack,
112 comm_send_status_error_if_hostname_too_big);
113 add_test_with_context (suite, attack, comm_send_status_sends_correct_text);
116 return run_single_test (suite, argv[1], create_text_reporter ());
118 return run_test_suite (suite, create_text_reporter ());
Launches the plugins, and manages multithreading.
static int comm_send_status(kb_t main_kb, char *ip_str, int curr, int max)
Sends the progress status of of a host's scan.
int main(int argc, char **argv)
static int __wrap_redis_push_str(kb_t kb, const char *name, const char *value)
static int __wrap_redis_lnk_reset(kb_t kb)
Ensure(attack, comm_send_status_returns_neg1_for_null_args)
void set_main_kb(kb_t kb)
sets the shared database between ospd and openvas as a main_kb for further usage. @description this s...