This commit is contained in:
aozhiwei 2019-12-13 11:45:24 +08:00
parent d209bb23c7
commit eb455bb95f
2 changed files with 7 additions and 0 deletions

View File

@ -337,6 +337,12 @@ namespace f8
return !getenv("SERVER_ENV");
}
bool IsTestEnv()
{
char* env = getenv("SERVER_ENV");
return std::string(env) == "TEST";
}
bool IsValidNormalConfig(a8::XObject& conf, std::vector<std::string> fields)
{
if (conf.GetType() != a8::XOT_ARRAY) {

View File

@ -113,6 +113,7 @@ namespace f8
int ExtractChannelIdFromAccountId(const std::string& accountid);
bool IsOnlineEnv();
bool IsTestEnv();
bool IsValidNormalConfig(a8::XObject& conf, std::vector<std::string> fields);
}