Commit 66a11ef7 authored by johan's avatar johan
Browse files

Add multidomain tests suite

This suite does not pass with the nodejs test server
parent cc6618f1
......@@ -40,6 +40,7 @@ set(SOURCE_FILES_CXX
lime_helloworld-tester.cpp
lime_crypto-tester.cpp
lime_massive_group-tester.cpp
lime_multidomains-tester.cpp
)
set(SOURCE_FILES_C
......
......@@ -40,8 +40,11 @@ namespace lime_tester {
std::string test_x3dh_server_url{"localhost"};
std::string test_x3dh_c25519_server_port{"25519"};
std::string test_x3dh_c448_server_port{"25520"};
std::string test_x3dh_domainA_server_port{"25521"};
std::string test_x3dh_domainB_server_port{"25522"};
std::string test_x3dh_domainC_server_port{"25523"};
/* for testing purpose RNG, no need to be good one */
// for testing purpose RNG, no need to be a good one
std::random_device rd;
std::uniform_int_distribution<int> uniform_dist(0,255);
......
......@@ -37,6 +37,9 @@ namespace lime_tester {
extern std::string test_x3dh_server_url;
extern std::string test_x3dh_c25519_server_port;
extern std::string test_x3dh_c448_server_port;
extern std::string test_x3dh_domainA_server_port;
extern std::string test_x3dh_domainB_server_port;
extern std::string test_x3dh_domainC_server_port;
// messages pattern
extern std::string shortMessage;
......
......@@ -60,6 +60,7 @@ void lime_tester_init(void(*ftester_printf)(int level, const char *fmt, va_list
#ifdef FFI_ENABLED
bc_tester_add_suite(&lime_ffi_test_suite);
#endif
bc_tester_add_suite(&lime_multidomains_test_suite);
}
void lime_tester_uninit(void) {
......
......@@ -38,6 +38,7 @@ extern test_suite_t lime_massive_group_test_suite;
#ifdef FFI_ENABLED
extern test_suite_t lime_ffi_test_suite;
#endif
extern test_suite_t lime_multidomains_test_suite;
void lime_tester_init(void(*ftester_printf)(int level, const char *fmt, va_list args));
void lime_tester_uninit(void);
......
......@@ -3585,10 +3585,10 @@ static void user_registration_failure_test(const lime::CurveId curve, const std:
static void user_registration_failure(void) {
#ifdef EC25519_ENABLED
user_registration_failure_test(lime::CurveId::c25519, "lime_user_management", std::string("https://").append(lime_tester::test_x3dh_server_url).append(":").append(lime_tester::test_x3dh_c25519_server_port).data());
user_registration_failure_test(lime::CurveId::c25519, "lime_user_registration_failure", std::string("https://").append(lime_tester::test_x3dh_server_url).append(":").append(lime_tester::test_x3dh_c25519_server_port).data());
#endif
#ifdef EC448_ENABLED
user_registration_failure_test(lime::CurveId::c448, "lime_user_management", std::string("https://").append(lime_tester::test_x3dh_server_url).append(":").append(lime_tester::test_x3dh_c448_server_port).data());
user_registration_failure_test(lime::CurveId::c448, "lime_user_registration_failure", std::string("https://").append(lime_tester::test_x3dh_server_url).append(":").append(lime_tester::test_x3dh_c448_server_port).data());
#endif
}
......
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment