Skip to content

Commit

Permalink
KDESKTOP-1372 - Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
ClementKunz committed Nov 12, 2024
1 parent 55c27ce commit 7bd117b
Showing 1 changed file with 17 additions and 13 deletions.
30 changes: 17 additions & 13 deletions test/libsyncengine/jobs/network/testnetworkjobs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -899,7 +899,6 @@ void TestNetworkJobs::testDriveUploadSessionAsynchronousAborted() {

void TestNetworkJobs::testGetAppVersionInfo() {
const auto appUid = "1234567890";

// Without user IDs
{
GetAppVersionJob job(CommonUtility::platform(), appUid);
Expand All @@ -913,18 +912,11 @@ void TestNetworkJobs::testGetAppVersionInfo() {
}
// With 1 user ID
{
GetAppVersionJob job(CommonUtility::platform(), appUid, {123});
job.runSynchronously();
CPPUNIT_ASSERT(!job.hasHttpError());
CPPUNIT_ASSERT(job.getVersionInfo(DistributionChannel::Internal).isValid());
CPPUNIT_ASSERT(job.getVersionInfo(DistributionChannel::Beta).isValid());
CPPUNIT_ASSERT(job.getVersionInfo(DistributionChannel::Next).isValid());
CPPUNIT_ASSERT(job.getVersionInfo(DistributionChannel::Prod).isValid());
CPPUNIT_ASSERT(job.getProdVersionInfo().isValid());
}
// With several user IDs
{
GetAppVersionJob job(CommonUtility::platform(), appUid, {123, 456, 789});
User user;
bool found = false;
ParmsDb::instance()->selectUser(_userDbId, user, found);

GetAppVersionJob job(CommonUtility::platform(), appUid, {user.userId()});
job.runSynchronously();
CPPUNIT_ASSERT(!job.hasHttpError());
CPPUNIT_ASSERT(job.getVersionInfo(DistributionChannel::Internal).isValid());
Expand All @@ -933,6 +925,18 @@ void TestNetworkJobs::testGetAppVersionInfo() {
CPPUNIT_ASSERT(job.getVersionInfo(DistributionChannel::Prod).isValid());
CPPUNIT_ASSERT(job.getProdVersionInfo().isValid());
}
// // With several user IDs
// TODO : commented out because we need valid user IDs but we have only one available in tests for now
// {
// GetAppVersionJob job(CommonUtility::platform(), appUid, {123, 456, 789});
// job.runSynchronously();
// CPPUNIT_ASSERT(!job.hasHttpError());
// CPPUNIT_ASSERT(job.getVersionInfo(DistributionChannel::Internal).isValid());
// CPPUNIT_ASSERT(job.getVersionInfo(DistributionChannel::Beta).isValid());
// CPPUNIT_ASSERT(job.getVersionInfo(DistributionChannel::Next).isValid());
// CPPUNIT_ASSERT(job.getVersionInfo(DistributionChannel::Prod).isValid());
// CPPUNIT_ASSERT(job.getProdVersionInfo().isValid());
// }
}

void TestNetworkJobs::testDirectDownload() {
Expand Down

0 comments on commit 7bd117b

Please sign in to comment.