mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-10 22:36:24 +00:00
5450384a34
Also - added debugging test for `checkRecentHistory` from the attempt to use transactions to restore balance - small improvements that might clarify better the issues reported about running under linux issues (didn't test them) - fix issues found while reviewing the code. - add support for custom infura token to be used in development Updates #7662
40 lines
1.1 KiB
C++
40 lines
1.1 KiB
C++
#include <StatusGo/Messenger/Service.h>
|
|
|
|
#include <Onboarding/Accounts/AccountsService.h>
|
|
|
|
#include <StatusGo/SignalsManager.h>
|
|
|
|
#include <ScopedTestAccount.h>
|
|
|
|
#include <gtest/gtest.h>
|
|
|
|
namespace fs = std::filesystem;
|
|
|
|
namespace Status::Testing {
|
|
|
|
/// This is an integration test to check that status-go doesn't crash on apple silicon when starting Me
|
|
/// \warning the test depends on IO and it is not deterministic, fast, focused or reliable. It is here for validation only
|
|
/// \todo fin a way to test the integration within a test environment. Also how about reusing an existing account
|
|
TEST(MessagingApi, TestStartMessaging)
|
|
{
|
|
bool nodeReady = false;
|
|
QObject::connect(
|
|
StatusGo::SignalsManager::instance(), &StatusGo::SignalsManager::nodeReady, [&nodeReady](const QString& error) {
|
|
if(error.isEmpty())
|
|
{
|
|
nodeReady = !nodeReady;
|
|
}
|
|
});
|
|
|
|
ScopedTestAccount testAccount(test_info_->name());
|
|
|
|
ASSERT_TRUE(StatusGo::Messenger::startMessenger());
|
|
|
|
testAccount.processMessages(1000, [nodeReady]() {
|
|
return !nodeReady;
|
|
});
|
|
ASSERT_TRUE(nodeReady);
|
|
}
|
|
|
|
} // namespace
|