make dist: only include files from practracker dir intentionally.
[tor.git] / src / test / test_helpers.h
blob9e376a563d74b52eb3c8869edb6a48c36a982aef
1 /* Copyright (c) 2017-2019, The Tor Project, Inc. */
2 /* See LICENSE for licensing information */
4 #ifndef TOR_TEST_HELPERS_H
5 #define TOR_TEST_HELPERS_H
7 #define BUFFERS_PRIVATE
9 #include "core/or/or.h"
11 const char *get_yesterday_date_str(void);
13 circuit_t * dummy_origin_circuit_new(int num_cells);
15 /* Number of descriptors contained in test_descriptors.txt. */
16 #define HELPER_NUMBER_OF_DESCRIPTORS 8
18 void helper_setup_fake_routerlist(void);
20 #define GET(path) "GET " path " HTTP/1.0\r\n\r\n"
21 void connection_write_to_buf_mock(const char *string, size_t len,
22 connection_t *conn, int compressed);
23 char *buf_get_contents(buf_t *buf, size_t *sz_out);
25 int mock_tor_addr_lookup__fail_on_bad_addrs(const char *name,
26 uint16_t family, tor_addr_t *out);
28 connection_t *test_conn_get_connection(uint8_t state,
29 uint8_t type, uint8_t purpose);
30 or_options_t *helper_parse_options(const char *conf);
32 extern const char TEST_DESCRIPTORS[];
34 #endif /* !defined(TOR_TEST_HELPERS_H) */