refactor: Move FSD Test server information to test case

This commit is contained in:
Lars Toenning
2023-12-27 20:49:55 +01:00
parent b5a62a3204
commit fae215ba26
6 changed files with 19 additions and 22 deletions

View File

@@ -245,8 +245,7 @@ namespace BlackCore::Data
CServerList CGlobalSetup::getPredefinedServersPlusHardcodedServers() const
{
static const CServerList hardcoded(
{ CServer::swiftFsdTestServer(),
CServer::fscFsdServer(),
{ CServer::fscFsdServer(),
CServer::esTowerView() });
CServerList testServers(m_predefinedServers);
testServers.addIfAddressNotExists(hardcoded);

View File

@@ -54,19 +54,6 @@ namespace BlackMisc::Network
return QStringLiteral("%1 %2 %3:%4 %5 %6 accepting: %7 FSD: %8 con.since: %9").arg(m_name, m_description, m_address).arg(m_port).arg(m_user.toQString(i18n), m_ecosystem.getSystemString(), boolToYesNo(m_isAcceptingConnections), m_fsdSetup.toQString(i18n), this->isConnected() ? this->getFormattedUtcTimestampHms() : "not con.");
}
const CServer &CServer::swiftFsdTestServer(bool withPw)
{
// CUser("guest", "Guest Client project", "", "guest")
// PW!!!!! => use CObfuscation::endocde to get the strings
static const CServer dvp("Testserver", "Client project testserver", "fsd.swift-project.org", 6809,
CUser("OBF:AwJ6BweZqpmtmORL", "OBF:AwI/594lQTJGZnmSwB0=", "", "OBF:AwKi3JkHNAczBno="),
CFsdSetup(), CVoiceSetup(), CEcosystem(CEcosystem::swiftTest()), CServer::FSDServerVatsim);
static const CServer dvnWithPw("Testserver", "Client project testserver", "fsd.swift-project.org", 6809,
CUser("OBF:AwJ6BweZqpmtmORL", "OBF:AwI/594lQTJGZnmSwB0=", "", ""),
CFsdSetup(), CVoiceSetup(), CEcosystem(CEcosystem::swiftTest()), CServer::FSDServerVatsim);
return withPw ? dvp : dvnWithPw;
}
const CServer &CServer::fscFsdServer()
{
static const CServer fsc = [] {

View File

@@ -208,9 +208,6 @@ namespace BlackMisc::Network
//! \copydoc BlackMisc::Mixin::String::toQString()
QString convertToQString(bool i18n = false) const;
//! swift FSD test server
static const CServer &swiftFsdTestServer(bool withPw = false);
//! FSC server
static const CServer &fscFsdServer();

View File

@@ -46,7 +46,7 @@ namespace BlackMisc::Network::Settings
//! \copydoc BlackMisc::TSettingTrait::defaultValue
static const BlackMisc::Network::CServer &defaultValue()
{
static const CServer dv = CServer::swiftFsdTestServer();
static const CServer dv;
return dv;
}
};