Commit 2a4c4978 authored by Timothée Jaussoin's avatar Timothée Jaussoin
Browse files

Move to fs-test-2

Pass emails to the admin account create endpoint to prevent empty emails accounts errors
Add a ifdef in the AccountManager to prevent compilation issues when FlexiAPI is disabled
parent 15e33bb8
......@@ -191,10 +191,16 @@ FlexiAPIClient *FlexiAPIClient::adminAccountCreate(string username, string passw
}
FlexiAPIClient *FlexiAPIClient::adminAccountCreate(string username, string password, string algorithm, string domain,
bool activated) {
bool activated) {
return adminAccountCreate(username, password, algorithm, domain, activated, "");
}
FlexiAPIClient *FlexiAPIClient::adminAccountCreate(string username, string password, string algorithm, string domain,
bool activated, string email) {
JsonParams params;
params.push("username", username);
params.push("password", password);
params.push("email", email);
params.push("algorithm", algorithm);
params.push("activated", to_string(activated));
......
......@@ -107,6 +107,8 @@ class LINPHONE_PUBLIC FlexiAPIClient : public enable_shared_from_this<FlexiAPICl
FlexiAPIClient *adminAccountCreate(string username, string password, string algorithm, bool activated);
FlexiAPIClient *adminAccountCreate(string username, string password, string algorithm, string domain,
bool activated);
FlexiAPIClient *adminAccountCreate(string username, string password, string algorithm, string domain,
bool activated, string email);
FlexiAPIClient *adminAccounts();
FlexiAPIClient *adminAccount(int id);
FlexiAPIClient *adminAccountDelete(int id);
......
......@@ -450,7 +450,7 @@ LinphoneAccountCreatorStatus linphone_account_creator_admin_create_account_flexi
auto flexiAPIClient = make_shared<FlexiAPIClient>(creator->core);
flexiAPIClient->setTest(TRUE)
->adminAccountCreate(creator->username, creator->password, "MD5", creator->domain, true)
->adminAccountCreate(creator->username, creator->password, "MD5", creator->domain, true, creator->email)
->then([creator](FlexiAPIClient::Response response) {
NOTIFY_IF_EXIST_ACCOUNT_CREATOR(create_account, creator, LinphoneAccountCreatorStatusAccountCreated,
response.body.c_str());
......
......@@ -262,9 +262,13 @@ void account_create_in_server_db(Account *account, LinphoneProxyConfig *cfg){
AccountCreatorState state = {0};
// This ifdef is only to prevent errors in compilation when FlexiAPI is disabled
// FlexiAPI is mandatory in the AccountManager
#ifdef HAVE_FLEXIAPI
// Attache the event to FlexiAPI and add the callbacks
linphone_account_creator_service_set_create_account_cb(linphone_account_creator_get_service(creator), linphone_account_creator_admin_create_account_flexiapi);
linphone_account_creator_add_callbacks(creator, creator_cbs);
#endif
// Create account
linphone_account_creator_cbs_set_create_account(creator_cbs, account_created_in_db_cb);
......
......@@ -79,7 +79,7 @@ int manager_count = 0;
int leaked_objects_count = 0;
const MSAudioDiffParams audio_cmp_params = {10,2000};
const char* flexisip_tester_dns_server = "fs-test.linphone.org";
const char* flexisip_tester_dns_server = "fs-test-2.linphone.org";
bctbx_list_t *flexisip_tester_dns_ip_addresses = NULL;
const char* test_domain="sipopen.example.org";
const char* auth_domain="sip.example.org";
......
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