mirror of
https://git.jami.net/savoirfairelinux/jami-daemon.git
synced 2025-08-07 22:02:12 +08:00
fix: ut and agents
Change-Id: I3b9fd9da90d153b2b4ce8254fa14216ea87eb7bd
This commit is contained in:
@ -21,6 +21,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <filesystem>
|
||||
|
||||
#include "logger.h"
|
||||
|
||||
@ -211,6 +212,15 @@ struct from_guile
|
||||
return ret;
|
||||
}
|
||||
|
||||
operator std::filesystem::path()
|
||||
{
|
||||
char* str_raw = scm_to_locale_string(value);
|
||||
std::string ret(str_raw);
|
||||
free(str_raw);
|
||||
|
||||
return std::filesystem::path(ret);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
operator std::vector<T>()
|
||||
{
|
||||
|
@ -182,7 +182,7 @@ load_actors(const std::filesystem::path& from_yaml)
|
||||
std::map<std::string, std::string>
|
||||
load_actors_and_wait_for_announcement(const std::string& from_yaml)
|
||||
{
|
||||
auto actors = load_actors(from_yaml);
|
||||
auto actors = load_actors(std::filesystem::path(from_yaml));
|
||||
|
||||
std::vector<std::string> wait_for;
|
||||
|
||||
|
@ -24,6 +24,8 @@
|
||||
#include <cstdint>
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <filesystem>
|
||||
#include <vector>
|
||||
|
||||
constexpr size_t WAIT_FOR_ANNOUNCEMENT_TIMEOUT = 30;
|
||||
constexpr size_t WAIT_FOR_REMOVAL_TIMEOUT = 30;
|
||||
@ -45,7 +47,7 @@ wait_for_removal_of(const std::string& account,
|
||||
std::chrono::seconds timeout = std::chrono::seconds(WAIT_FOR_REMOVAL_TIMEOUT));
|
||||
|
||||
extern std::map<std::string, std::string>
|
||||
load_actors(const std::string& from_yaml);
|
||||
load_actors(const std::filesystem::path& from_yaml);
|
||||
|
||||
extern std::map<std::string, std::string>
|
||||
load_actors_and_wait_for_announcement(const std::string& from_yaml);
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include <cstdint>
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <filesystem>
|
||||
|
||||
constexpr size_t WAIT_FOR_ANNOUNCEMENT_TIMEOUT = 30;
|
||||
constexpr size_t WAIT_FOR_REMOVAL_TIMEOUT = 30;
|
||||
@ -45,7 +46,7 @@ wait_for_removal_of(const std::string& account,
|
||||
std::chrono::seconds timeout = std::chrono::seconds(WAIT_FOR_REMOVAL_TIMEOUT));
|
||||
|
||||
extern std::map<std::string, std::string>
|
||||
load_actors(const std::string& from_yaml);
|
||||
load_actors(const std::filesystem::path& from_yaml);
|
||||
|
||||
extern std::map<std::string, std::string>
|
||||
load_actors_and_wait_for_announcement(const std::string& from_yaml);
|
||||
|
Reference in New Issue
Block a user