diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-08-25 18:21:15 -0600 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-08-25 18:21:15 -0600 |
commit | ea75d4bdba79d2a879c2ed31564928d4ef3cd9b1 (patch) | |
tree | 468831622a6924b00df160b228733803c29032a7 /tests | |
parent | 8e14799f43ea51a6d9f195c56ca4f0c0439d4039 (diff) | |
download | sink-ea75d4bdba79d2a879c2ed31564928d4ef3cd9b1.tar.gz sink-ea75d4bdba79d2a879c2ed31564928d4ef3cd9b1.zip |
Default to NoStatus for resources until we know more.
This allows the aggregation to ignore resources where we don't have any
status information yet, so the account doesn't always end up being
offline.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/accountstest.cpp | 2 | ||||
-rw-r--r-- | tests/resourceconfigtest.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/accountstest.cpp b/tests/accountstest.cpp index 0ab18ef..cc67645 100644 --- a/tests/accountstest.cpp +++ b/tests/accountstest.cpp | |||
@@ -139,7 +139,7 @@ private slots: | |||
139 | auto model = Sink::Store::loadModel<Sink::ApplicationDomain::SinkAccount>(query); | 139 | auto model = Sink::Store::loadModel<Sink::ApplicationDomain::SinkAccount>(query); |
140 | QTRY_COMPARE(model->rowCount(QModelIndex()), 1); | 140 | QTRY_COMPARE(model->rowCount(QModelIndex()), 1); |
141 | auto account = model->data(model->index(0, 0, QModelIndex()), Sink::Store::DomainObjectRole).value<Sink::ApplicationDomain::SinkAccount::Ptr>(); | 141 | auto account = model->data(model->index(0, 0, QModelIndex()), Sink::Store::DomainObjectRole).value<Sink::ApplicationDomain::SinkAccount::Ptr>(); |
142 | QCOMPARE(account->getStatus(), static_cast<int>(Sink::ApplicationDomain::OfflineStatus)); | 142 | QCOMPARE(account->getStatus(), static_cast<int>(Sink::ApplicationDomain::NoStatus)); |
143 | 143 | ||
144 | //Synchronize to connect | 144 | //Synchronize to connect |
145 | VERIFYEXEC(Sink::Store::synchronize(Query().resourceFilter(res.identifier()))); | 145 | VERIFYEXEC(Sink::Store::synchronize(Query().resourceFilter(res.identifier()))); |
diff --git a/tests/resourceconfigtest.cpp b/tests/resourceconfigtest.cpp index df98a61..78a0d4c 100644 --- a/tests/resourceconfigtest.cpp +++ b/tests/resourceconfigtest.cpp | |||
@@ -91,7 +91,7 @@ private slots: | |||
91 | auto model = Sink::Store::loadModel<SinkResource>(query); | 91 | auto model = Sink::Store::loadModel<SinkResource>(query); |
92 | QTRY_COMPARE(model->rowCount(QModelIndex()), 1); | 92 | QTRY_COMPARE(model->rowCount(QModelIndex()), 1); |
93 | auto resource = model->data(model->index(0, 0, QModelIndex()), Sink::Store::DomainObjectRole).value<SinkResource::Ptr>(); | 93 | auto resource = model->data(model->index(0, 0, QModelIndex()), Sink::Store::DomainObjectRole).value<SinkResource::Ptr>(); |
94 | QCOMPARE(resource->getStatus(), static_cast<int>(OfflineStatus)); | 94 | QCOMPARE(resource->getStatus(), static_cast<int>(NoStatus)); |
95 | 95 | ||
96 | //Synchronize to connect | 96 | //Synchronize to connect |
97 | VERIFYEXEC(Sink::Store::synchronize(query)); | 97 | VERIFYEXEC(Sink::Store::synchronize(query)); |