refs #675 default URL for bootstrap file

* CApplication now has member function isUnitTest
* bootstrap URL has hardcoded default URL when running as unit test
* unit tests are automatically marked as "running in dev. environment"
This commit is contained in:
Klaus Basan
2016-06-15 22:26:55 +02:00
parent ef1b7b2c21
commit ce7362a9d9
4 changed files with 48 additions and 21 deletions

View File

@@ -124,22 +124,11 @@ namespace BlackCore
BootstrapMode m_bootstrapMode = Explicit; //! How to bootstrap
BlackMisc::Network::CFailoverUrlList m_bootstrapUrls; //!< location of setup files
BlackMisc::Network::CFailoverUrlList m_updateInfoUrls; //!< location of info files
QCommandLineOption m_cmdBootstrapUrl; //!< bootstrap URL
QCommandLineOption m_cmdBootstrapMode; //!< bootstrap mode
BlackMisc::CData<BlackCore::Data::GlobalSetup> m_setup {this, &CSetupReader::ps_setupChanged}; //!< data cache setup
BlackMisc::CData<BlackCore::Data::UpdateInfo> m_updateInfo {this}; //!< data cache update info
QCommandLineOption m_cmdBootstrapUrl
{
{ "url", "bootstrapurl" },
QCoreApplication::translate("application", "bootstrap URL, e.g. datastore.swift-project.org"),
"bootstrapurl"
}; //!< bootstrap URL
QCommandLineOption m_cmdBootstrapMode
{
{ "bmode", "bootstrapmode" },
QCoreApplication::translate("application", "bootstrap mode: explicit, implicit, cache(-only)"),
"bootstrapmode", "explicit"
}; //!< bootstrap mode
//! Read by local individual file and update cache from that
bool readLocalBootstrapFile(QString &fileName);
@@ -156,6 +145,9 @@ namespace BlackCore
//! Convert string to mode
static BootstrapMode stringToEnum(const QString &s);
//! Bootsrap URL used for unit tests
static const QString &unitTestBootstrapUrl();
};
} // ns