mirror of
https://gitlab.com/spaceti-app/integrations/acs/colnod-connector.git
synced 2026-07-12 15:40:40 +02:00
Merge branch 'master' into server-sdk
# Conflicts: # src/colnod/databasemanager.h # src/colnod/datamanager.cpp # src/colnod/syncmanager.cpp
This commit is contained in:
commit
ab41e47f1e
68
README.md
68
README.md
@ -3,8 +3,8 @@
|
|||||||
Acces Management System of Colsys: [Product info](http://produkty.colsys.cz/colnod/)
|
Acces Management System of Colsys: [Product info](http://produkty.colsys.cz/colnod/)
|
||||||
|
|
||||||
## TODO
|
## TODO
|
||||||
- [ ] Debug Mode
|
- [x] Dry Run Mode (0.1v)
|
||||||
- [ ] Logs
|
- [x] Logs (0.1v)
|
||||||
- Timestamp
|
- Timestamp
|
||||||
- Id of record
|
- Id of record
|
||||||
- Destination
|
- Destination
|
||||||
@ -12,7 +12,7 @@ Acces Management System of Colsys: [Product info](http://produkty.colsys.cz/coln
|
|||||||
- Token `action` to `subject_id`
|
- Token `action` to `subject_id`
|
||||||
- Sbject `action`
|
- Sbject `action`
|
||||||
- `action` - updated, deleted, added
|
- `action` - updated, deleted, added
|
||||||
- [ ] App output
|
- [x] App output (0.1v)
|
||||||
- To Colnod
|
- To Colnod
|
||||||
- Number of tokens added/deleted/updated
|
- Number of tokens added/deleted/updated
|
||||||
- To DB
|
- To DB
|
||||||
@ -54,9 +54,58 @@ Acces Management System of Colsys: [Product info](http://produkty.colsys.cz/coln
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
1. GET request - `/SubjectManager/getSubjects` - get subjects
|
|
||||||
2. GET request - `/TokenManager/getTokens` - get tokens
|
1. POST request - `/SubjectManager/getSubjects` - get subjects
|
||||||
3. POST request - `/TokenManager/setTokens` - set tokens
|
2. POST request - `/SubjectManager/getSubjectsUpdated` - get tokens updated after <i>`time`</i>
|
||||||
|
3. POST request - `/SubjectManager/getSubjectsDeleted` - get tokens deleted after <i>`time`</i>
|
||||||
|
4. POST request - `/TokenManager/getTokens` - get tokens
|
||||||
|
5. POST request - `/TokenManager/getTokensUpdated` - get tokens updated after <i>`time`</i>
|
||||||
|
6. POST request - `/TokenManager/getTokensDeleted` - get tokens deleted after <i>`time`</i>
|
||||||
|
7. POST request - `/TokenManager/setTokens` - set tokens defined as <i>`JSON`</i>
|
||||||
|
8. POST request - `/TokenManager/deleteTokens` - delete tokens define as <i>`JSON2`</i>
|
||||||
|
9. POST request - `/AccessManager/getAccessGroups` - get access groups
|
||||||
|
10. POST request - `/AccessManager/getAccessGroupsUpdated`
|
||||||
|
11. POST request - `/AccessManager/getAccessGroupsDeleted`
|
||||||
|
12. POST request - `/AccessManager/getAccessGroupMembership`
|
||||||
|
13. POST request - `/AccessManager/getAccessGroupMembershipUpdated`
|
||||||
|
14. POST request - `/AccessManager/getAccessGroupMembershipDeleted`
|
||||||
|
- <i>`time`</i> = epoch time im miliseconds
|
||||||
|
```time
|
||||||
|
{
|
||||||
|
"timestamp": 1568646217767
|
||||||
|
}
|
||||||
|
```
|
||||||
|
- <i>`JSON`</i>
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"items": [
|
||||||
|
{
|
||||||
|
"id": "cf5cb80e-e6dd-45db-8edd-c9655447821c",
|
||||||
|
"name": "Testovaci pokus",
|
||||||
|
"description": "mobile",
|
||||||
|
"tokenType": "Token",
|
||||||
|
"tokenBits}": 32,
|
||||||
|
"tokenData": "7B9D31",
|
||||||
|
"timeToLive": 255,
|
||||||
|
"authErrors": 255,
|
||||||
|
"flags": [
|
||||||
|
"Enabled",
|
||||||
|
"NoValidity"
|
||||||
|
],
|
||||||
|
"subjectId": "72b37f7e-5761-4e6c-8e87-20c0bed0d904"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
- <i>`JSON2`</i>
|
||||||
|
```json2
|
||||||
|
{
|
||||||
|
"items": [
|
||||||
|
"7272bcf6-b5ad-46dd-99a9-0c56faddf14c"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
## RestAPI definitions
|
## RestAPI definitions
|
||||||
|
|
||||||
@ -80,11 +129,10 @@ curl -k --user "spaceti:E7FEA07DBC82FB9BA34B2E453E2EFE89F0583E7187543507EF11E847
|
|||||||
|
|
||||||
## Colnod Penta server
|
## Colnod Penta server
|
||||||
|
|
||||||
- Acces through: `penta-master` IP:`172.16.3.4`
|
- Acces through: `penta-master` IP: `172.16.4.4`
|
||||||
- URL: `192.168.254.11:8443`
|
- URL: `192.168.254.11:8443`
|
||||||
- Port forwarding: `ssh -L 8443:192.168.254.11:8443 penta-master`
|
- Port forwarding: `ssh -L 8443:192.168.254.11:8443 penta-master`
|
||||||
- `!!! does not work !!!`
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
curl -k --user "spaceti:E7FEA07DBC82FB9BA34B2E453E2EFE89F0583E7187543507EF11E84726071FE428445372F2E46B455EB0C79747C51E362F403CE39473A2A8C2DFA0CE5C9826C0" -d '{"password":"E7FEA07DBC82FB9BA34B2E453E2EFE89F0583E7187543507EF11E84726071FE428445372F2E46B455EB0C79747C51E362F403CE39473A2A8C2DFA0CE5C9826C0","username":"spaceti"}' -H "Content-Type: application/json" https://192.168.254.11:8443/AaaManager/authSession
|
curl -k --user "spaceti:E7FEA07DBC82FB9BA34B2E453E2EFE89F0583E7187543507EF11E84726071FE428445372F2E46B455EB0C79747C51E362F403CE39473A2A8C2DFA0CE5C9826C0" -d '{"password":"E7FEA07DBC82FB9BA34B2E453E2EFE89F0583E7187543507EF11E84726071FE428445372F2E46B455EB0C79747C51E362F403CE39473A2A8C2DFA0CE5C9826C0","username":"spaceti"}' -H "Content-Type: application/json" https://192.168.254.11:8443/AaaManager/authSession
|
||||||
```
|
```
|
||||||
@ -101,7 +149,7 @@ It is possible to chain requests: [see doc](https://support.insomnia.rest/articl
|
|||||||
|
|
||||||
### Import workspace
|
### Import workspace
|
||||||
|
|
||||||
- import: `Insomnia_2019_10_01.yaml`
|
- import: [Insomnia file on GitLab](https://gitlab.com/spaceti-app/integrations/acs/colnod-connector/blob/master/Insomnia_2019-10-15.yaml)
|
||||||
|
|
||||||
## Testing Blueprint API
|
## Testing Blueprint API
|
||||||
|
|
||||||
|
|||||||
@ -26,9 +26,9 @@ int main(int argc, char *argv[])
|
|||||||
api.syncDataFromColnodToDB();
|
api.syncDataFromColnodToDB();
|
||||||
api.syncDataFromDBToColnod();
|
api.syncDataFromDBToColnod();
|
||||||
});
|
});
|
||||||
QObject::connect(&api, &SyncManager::error, [](){
|
QObject::connect(&api, &SyncManager::error, &app, [](){
|
||||||
qDebug() << "error";
|
qDebug() << "error";
|
||||||
QCoreApplication::exit();
|
QCoreApplication::exit(1);
|
||||||
});
|
}, Qt::QueuedConnection);
|
||||||
return QCoreApplication::exec();
|
return QCoreApplication::exec();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,9 +10,13 @@ DatabaseManager::DatabaseManager(const QString& host, const QString& dbName, con
|
|||||||
db.setPassword(password);
|
db.setPassword(password);
|
||||||
if (!db.open())
|
if (!db.open())
|
||||||
{
|
{
|
||||||
log("Opening error" + db.lastError().text());
|
opened = false;
|
||||||
|
Logger::log("Opening error" + db.lastError().text());
|
||||||
emit error();
|
emit error();
|
||||||
}
|
}
|
||||||
|
else{
|
||||||
|
opened = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// add or update subject to db
|
// add or update subject to db
|
||||||
@ -139,7 +143,7 @@ bool DatabaseManager::executeQuery(QSqlQuery &query, const QString &statement)
|
|||||||
if (!dryMode || getLastQuery(query).startsWith("SELECT")){
|
if (!dryMode || getLastQuery(query).startsWith("SELECT")){
|
||||||
if (!query.exec()){
|
if (!query.exec()){
|
||||||
QString msg = QString("Source: Database Manager, Error: %1").arg(query.lastError().text());
|
QString msg = QString("Source: Database Manager, Error: %1").arg(query.lastError().text());
|
||||||
log(QString(msg));
|
Logger::logToDb(QString(msg));
|
||||||
emit error();
|
emit error();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -151,7 +155,7 @@ bool DatabaseManager::executeQuery(QSqlQuery &query, const QString &statement)
|
|||||||
if (!dryMode || statement.startsWith("SELECT")){
|
if (!dryMode || statement.startsWith("SELECT")){
|
||||||
if (!query.exec(statement)){
|
if (!query.exec(statement)){
|
||||||
QString msg = QString("Source: Database Manager, Error: %1").arg(query.lastError().text());
|
QString msg = QString("Source: Database Manager, Error: %1").arg(query.lastError().text());
|
||||||
log(QString(msg));
|
Logger::logToDb(QString(msg));
|
||||||
emit error();
|
emit error();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -300,3 +304,8 @@ bool DatabaseManager::checkDeletedToken(const QString &id)
|
|||||||
query.next();
|
query.next();
|
||||||
return query.value(0).toBool();
|
return query.value(0).toBool();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool DatabaseManager::isOpen()
|
||||||
|
{
|
||||||
|
return opened;
|
||||||
|
}
|
||||||
|
|||||||
@ -40,6 +40,8 @@ public:
|
|||||||
QString getSubjectNameById(const QString &id);
|
QString getSubjectNameById(const QString &id);
|
||||||
bool checkDeletedToken(const QString &id);
|
bool checkDeletedToken(const QString &id);
|
||||||
|
|
||||||
|
bool isOpen();
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool checkIfExists(const QString& id, const QString& table);
|
bool checkIfExists(const QString& id, const QString& table);
|
||||||
@ -52,4 +54,5 @@ signals:
|
|||||||
private:
|
private:
|
||||||
QSqlDatabase db;
|
QSqlDatabase db;
|
||||||
bool dryMode = false;
|
bool dryMode = false;
|
||||||
|
bool opened = false;
|
||||||
};
|
};
|
||||||
|
|||||||
@ -4,11 +4,11 @@ DataManager::DataManager(const bool &dryMode) :
|
|||||||
db(std::make_shared<DatabaseManager>("192.168.1.94", "deloitte", "postgres", "34rjkciea12", dryMode)),
|
db(std::make_shared<DatabaseManager>("192.168.1.94", "deloitte", "postgres", "34rjkciea12", dryMode)),
|
||||||
dryMode(dryMode)
|
dryMode(dryMode)
|
||||||
{
|
{
|
||||||
// db = std::make_shared<DatabaseManager>("192.168.1.94", "deloitte", "postgres", "34rjkciea12", dryMode);
|
if (db->isOpen()){
|
||||||
// db = std::make_shared<DatabaseManager>("localhost", "deloitte", "postgres", "34rjkciea12");
|
Logger::setDBMan(db);
|
||||||
Logger::setDBMan(db);
|
nextLastSync = db->getNow();
|
||||||
nextLastSync = db->getNow();
|
lastSync = db->getLastSync();
|
||||||
lastSync = db->getLastSync();
|
}
|
||||||
connect(db.get(), &DatabaseManager::error, this, &DataManager::error);
|
connect(db.get(), &DatabaseManager::error, this, &DataManager::error);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -78,20 +78,24 @@ void DataManager::fillSubjectsToUpdateColnod(const QString& response)
|
|||||||
// load working sets with updated/deleted tokens from DB
|
// load working sets with updated/deleted tokens from DB
|
||||||
void DataManager::fillTokensToChangeDB()
|
void DataManager::fillTokensToChangeDB()
|
||||||
{
|
{
|
||||||
QSqlQuery query = db->getUpdatedTokens();
|
if (db->isOpen()){
|
||||||
while (query.next())
|
QSqlQuery query = db->getUpdatedTokens();
|
||||||
{
|
while (query.next())
|
||||||
auto token = std::make_shared<Token>();
|
{
|
||||||
token->fromSQLRecord(query);
|
auto token = std::make_shared<Token>();
|
||||||
if (token->getDeleted()){ // sort to delete / to update
|
token->fromSQLRecord(query);
|
||||||
tokensFromDBToDeleteFromColnod.append(token->idToStringWithoutBraces());
|
if (token->getDeleted()){ // sort to delete / to update
|
||||||
}
|
tokensFromDBToDeleteFromColnod.append(token->idToStringWithoutBraces());
|
||||||
else{
|
}
|
||||||
tokensToUpdateFromDBToColnod.insert(token->idToStringWithoutBraces(), token);
|
else{
|
||||||
|
tokensToUpdateFromDBToColnod.insert(token->idToStringWithoutBraces(), token);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
qDebug() << "DB:" << tokensToUpdateFromDBToColnod.size() << "tokens to update";
|
||||||
|
qDebug() << "DB:" << tokensFromDBToDeleteFromColnod.size() << "tokens to delete";
|
||||||
}
|
}
|
||||||
qDebug() << "DB:" << tokensToUpdateFromDBToColnod.size() << "tokens to update";
|
else
|
||||||
qDebug() << "DB:" << tokensFromDBToDeleteFromColnod.size() << "tokens to delete";
|
emit error();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DataManager::fillSubjectsToUpdateDB()
|
void DataManager::fillSubjectsToUpdateDB()
|
||||||
@ -279,7 +283,8 @@ void DataManager::clear()
|
|||||||
// on the very end of sync update last sync time to begin time of this sync
|
// on the very end of sync update last sync time to begin time of this sync
|
||||||
void DataManager::updateLastSync()
|
void DataManager::updateLastSync()
|
||||||
{
|
{
|
||||||
db->updateLastSync(nextLastSync);
|
if (db->isOpen())
|
||||||
|
db->updateLastSync(nextLastSync);
|
||||||
}
|
}
|
||||||
|
|
||||||
// these to filter functions solve colision tokens -> remove when change on this token is earlier then change on the same token on the other side (Colnod/DB)
|
// these to filter functions solve colision tokens -> remove when change on this token is earlier then change on the same token on the other side (Colnod/DB)
|
||||||
|
|||||||
@ -50,6 +50,8 @@ public:
|
|||||||
const quint64 &getLastSync() {return lastSync;}
|
const quint64 &getLastSync() {return lastSync;}
|
||||||
const quint64 &getCurrentSync() {return nextLastSync;}
|
const quint64 &getCurrentSync() {return nextLastSync;}
|
||||||
|
|
||||||
|
bool isDBOpened() {return db->isOpen();}
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void clear();
|
void clear();
|
||||||
void setLastUpdate();
|
void setLastUpdate();
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
#include "logger.h"
|
#include "logger.h"
|
||||||
|
#include "databasemanager.h"
|
||||||
|
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
@ -24,8 +25,8 @@ void Logger::log(const QString& msg)
|
|||||||
|
|
||||||
void Logger::logToDb(const QString &msg)
|
void Logger::logToDb(const QString &msg)
|
||||||
{
|
{
|
||||||
Q_ASSERT(Logger::dbMan);
|
if (dbMan)
|
||||||
Logger::dbMan->log(msg);
|
Logger::dbMan->log(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Logger::setDBMan(std::shared_ptr<DatabaseManager> dbMan)
|
void Logger::setDBMan(std::shared_ptr<DatabaseManager> dbMan)
|
||||||
|
|||||||
@ -3,7 +3,9 @@
|
|||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QSqlDatabase>
|
#include <QSqlDatabase>
|
||||||
#include "databasemanager.h"
|
#include <memory>
|
||||||
|
|
||||||
|
class DatabaseManager;
|
||||||
|
|
||||||
|
|
||||||
class Logger
|
class Logger
|
||||||
|
|||||||
@ -2,10 +2,9 @@
|
|||||||
|
|
||||||
SyncManager::SyncManager(bool dryMode) :
|
SyncManager::SyncManager(bool dryMode) :
|
||||||
reqMan(std::make_unique<RequestManager>()),
|
reqMan(std::make_unique<RequestManager>()),
|
||||||
dataMan( std::make_unique<DataManager>(dryMode))
|
dataMan( std::make_unique<DataManager>(dryMode)),
|
||||||
|
dryMode(dryMode)
|
||||||
{
|
{
|
||||||
this->dryMode = dryMode;
|
|
||||||
|
|
||||||
connect(reqMan.get(), &RequestManager::error, this, &SyncManager::error);
|
connect(reqMan.get(), &RequestManager::error, this, &SyncManager::error);
|
||||||
connect(dataMan.get(), &DataManager::error, this, &SyncManager::error);
|
connect(dataMan.get(), &DataManager::error, this, &SyncManager::error);
|
||||||
}
|
}
|
||||||
@ -125,8 +124,10 @@ void SyncManager::syncDataFromDBToColnod()
|
|||||||
if (!dataMan->getTokensToDeleteDB().isEmpty()){
|
if (!dataMan->getTokensToDeleteDB().isEmpty()){
|
||||||
syncDeletedDataFromDBToColnod();
|
syncDeletedDataFromDBToColnod();
|
||||||
}
|
}
|
||||||
else
|
else{
|
||||||
deleteFinished = true;
|
deleteFinished = true;
|
||||||
|
areDataUpdatedToColnod();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// add or update tokens to Colnod
|
// add or update tokens to Colnod
|
||||||
@ -184,6 +185,11 @@ void SyncManager::prepareDatabase()
|
|||||||
dataMan->emptyDatabase();
|
dataMan->emptyDatabase();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool SyncManager::isValid()
|
||||||
|
{
|
||||||
|
return dataMan->isDBOpened();
|
||||||
|
}
|
||||||
|
|
||||||
// emit signal when all data is downloaded from Colnod
|
// emit signal when all data is downloaded from Colnod
|
||||||
void SyncManager::areChangedDataReady()
|
void SyncManager::areChangedDataReady()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -16,6 +16,8 @@ public:
|
|||||||
|
|
||||||
void prepareDatabase();
|
void prepareDatabase();
|
||||||
|
|
||||||
|
bool isValid();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void loadDataFromColnod();
|
void loadDataFromColnod();
|
||||||
void loadDataFromDB();
|
void loadDataFromDB();
|
||||||
|
|||||||
@ -7,14 +7,14 @@ void UnitTest::initTestCase()
|
|||||||
|
|
||||||
void UnitTest::loginSuccessfully()
|
void UnitTest::loginSuccessfully()
|
||||||
{
|
{
|
||||||
auto testAccess = new RequestManager();
|
RequestManager testAccess;
|
||||||
QSignalSpy spy(testAccess, SIGNAL(successLogin()));
|
QSignalSpy spy(&testAccess, &RequestManager::successLogin);
|
||||||
QVERIFY(spy.isValid());
|
QVERIFY(spy.isValid());
|
||||||
testAccess->login();
|
testAccess.login();
|
||||||
spy.wait(timeout);
|
spy.wait(timeout);
|
||||||
|
|
||||||
QCOMPARE(spy.count(), 1);
|
QCOMPARE(spy.count(), 1);
|
||||||
QString json = testAccess->jsonResponse;
|
QString json = testAccess.jsonResponse;
|
||||||
qDebug() << json;
|
qDebug() << json;
|
||||||
QJsonDocument doc = QJsonDocument::fromJson(json.toUtf8());
|
QJsonDocument doc = QJsonDocument::fromJson(json.toUtf8());
|
||||||
QVERIFY2(doc.object().value("id").isString(), "No parameter 'id' in response");
|
QVERIFY2(doc.object().value("id").isString(), "No parameter 'id' in response");
|
||||||
@ -23,14 +23,12 @@ void UnitTest::loginSuccessfully()
|
|||||||
//POST request w/o datas
|
//POST request w/o datas
|
||||||
void UnitTest::getSubjects()
|
void UnitTest::getSubjects()
|
||||||
{
|
{
|
||||||
auto* testAccess = new RequestManager();
|
RequestManager testAccess;
|
||||||
QSignalSpy spy(testAccess, SIGNAL(responseReady()));
|
QSignalSpy spy(&testAccess, &RequestManager::responseReady);
|
||||||
QVERIFY(spy.isValid());
|
QVERIFY(spy.isValid());
|
||||||
Response* response = testAccess->getSubjects();
|
Response* response = testAccess.getSubjects();
|
||||||
QSignalSpy spy1(response, &Response::ready);
|
QSignalSpy spy1(response, &Response::ready);
|
||||||
|
|
||||||
spy.wait(timeout);
|
spy.wait(timeout);
|
||||||
|
|
||||||
QCOMPARE(spy.count(), 1);
|
QCOMPARE(spy.count(), 1);
|
||||||
QCOMPARE(spy1.count(), 1);
|
QCOMPARE(spy1.count(), 1);
|
||||||
QString json = response->getJson();
|
QString json = response->getJson();
|
||||||
@ -39,13 +37,13 @@ void UnitTest::getSubjects()
|
|||||||
QVERIFY2(doc.object().value("items").isArray(), "No parameter 'id' in response");
|
QVERIFY2(doc.object().value("items").isArray(), "No parameter 'id' in response");
|
||||||
qDebug() << doc.object().value("items").toArray()[0].toObject()["id"].toString();
|
qDebug() << doc.object().value("items").toArray()[0].toObject()["id"].toString();
|
||||||
QVERIFY2(doc.object().value("items").toArray()[0].toObject()["id"].isString(), "ada");
|
QVERIFY2(doc.object().value("items").toArray()[0].toObject()["id"].isString(), "ada");
|
||||||
|
response->deleteLater();
|
||||||
}
|
}
|
||||||
|
|
||||||
void UnitTest::getTokens()
|
void UnitTest::getTokens()
|
||||||
{
|
{
|
||||||
auto* testAccess = new RequestManager();
|
RequestManager testAccess;
|
||||||
Response* response = testAccess->getTokens();
|
Response* response = testAccess.getTokens();
|
||||||
QSignalSpy spy(response, &Response::ready);
|
QSignalSpy spy(response, &Response::ready);
|
||||||
QCOMPARE(spy.count(), 0);
|
QCOMPARE(spy.count(), 0);
|
||||||
spy.wait(timeout);
|
spy.wait(timeout);
|
||||||
@ -57,149 +55,161 @@ void UnitTest::getTokens()
|
|||||||
QVERIFY2(doc.object().value("items").isArray(), "No parameter 'id' in response");
|
QVERIFY2(doc.object().value("items").isArray(), "No parameter 'id' in response");
|
||||||
qDebug() << doc.object().value("items").toArray()[0].toObject()["id"].toString();
|
qDebug() << doc.object().value("items").toArray()[0].toObject()["id"].toString();
|
||||||
QVERIFY2(doc.object().value("items").toArray()[0].toObject()["id"].isString(), "ada");
|
QVERIFY2(doc.object().value("items").toArray()[0].toObject()["id"].isString(), "ada");
|
||||||
|
response->deleteLater();
|
||||||
}
|
}
|
||||||
|
|
||||||
void UnitTest::getTokenSubject()
|
void UnitTest::getTokenSubject()
|
||||||
{
|
{
|
||||||
auto* testAccess = new RequestManager();
|
RequestManager testAccess;
|
||||||
QSignalSpy spy(testAccess, SIGNAL(responseReady()));
|
QSignalSpy spy(&testAccess, &RequestManager::responseReady);
|
||||||
Response* response = testAccess->getTokenSubject();
|
Response* response = testAccess.getTokenSubject();
|
||||||
QCOMPARE(spy.count(), 0);
|
QCOMPARE(spy.count(), 0);
|
||||||
spy.wait(timeout);
|
spy.wait(timeout);
|
||||||
QVERIFY(spy.isValid());
|
QVERIFY(spy.isValid());
|
||||||
QCOMPARE(spy.count(), 1);
|
QCOMPARE(spy.count(), 1);
|
||||||
QString json = response->getJson();
|
QString json = response->getJson();
|
||||||
QVERIFY(!json.isEmpty());
|
QVERIFY(!json.isEmpty());
|
||||||
|
response->deleteLater();
|
||||||
}
|
}
|
||||||
|
|
||||||
void UnitTest::getSubjectsUpdated()
|
void UnitTest::getSubjectsUpdated()
|
||||||
{
|
{
|
||||||
auto* testAccess = new RequestManager();
|
RequestManager testAccess;
|
||||||
QSignalSpy spy(testAccess, SIGNAL(responseReady()));
|
QSignalSpy spy(&testAccess, &RequestManager::responseReady);
|
||||||
Response* response = testAccess->getSubjectsUpdated(epochMS);
|
Response* response = testAccess.getSubjectsUpdated(epochMS);
|
||||||
QCOMPARE(spy.count(), 0);
|
QCOMPARE(spy.count(), 0);
|
||||||
spy.wait(timeout);
|
spy.wait(timeout);
|
||||||
QVERIFY(spy.isValid());
|
QVERIFY(spy.isValid());
|
||||||
QCOMPARE(spy.count(), 1);
|
QCOMPARE(spy.count(), 1);
|
||||||
QString json = response->getJson();
|
QString json = response->getJson();
|
||||||
QVERIFY(!json.isEmpty());
|
QVERIFY(!json.isEmpty());
|
||||||
|
response->deleteLater();
|
||||||
}
|
}
|
||||||
|
|
||||||
void UnitTest::getSubjectsDeleted()
|
void UnitTest::getSubjectsDeleted()
|
||||||
{
|
{
|
||||||
auto* testAccess = new RequestManager();
|
RequestManager testAccess;
|
||||||
QSignalSpy spy(testAccess, SIGNAL(responseReady()));
|
QSignalSpy spy(&testAccess, &RequestManager::responseReady);
|
||||||
Response* response = testAccess->getSubjectsDeleted(epochMS);
|
Response* response = testAccess.getSubjectsDeleted(epochMS);
|
||||||
QCOMPARE(spy.count(), 0);
|
QCOMPARE(spy.count(), 0);
|
||||||
spy.wait(timeout);
|
spy.wait(timeout);
|
||||||
QVERIFY(spy.isValid());
|
QVERIFY(spy.isValid());
|
||||||
QCOMPARE(spy.count(), 1);
|
QCOMPARE(spy.count(), 1);
|
||||||
QString json = response->getJson();
|
QString json = response->getJson();
|
||||||
QVERIFY(!json.isEmpty());
|
QVERIFY(!json.isEmpty());
|
||||||
|
response->deleteLater();
|
||||||
}
|
}
|
||||||
|
|
||||||
void UnitTest::getTokensUpdated()
|
void UnitTest::getTokensUpdated()
|
||||||
{
|
{
|
||||||
auto* testAccess = new RequestManager();
|
RequestManager testAccess;
|
||||||
QSignalSpy spy(testAccess, SIGNAL(responseReady()));
|
QSignalSpy spy(&testAccess, &RequestManager::responseReady);
|
||||||
Response* response = testAccess->getTokensUpdated(epochMS);
|
Response* response = testAccess.getTokensUpdated(epochMS);
|
||||||
QCOMPARE(spy.count(), 0);
|
QCOMPARE(spy.count(), 0);
|
||||||
spy.wait(timeout);
|
spy.wait(timeout);
|
||||||
QVERIFY(spy.isValid());
|
QVERIFY(spy.isValid());
|
||||||
QCOMPARE(spy.count(), 1);
|
QCOMPARE(spy.count(), 1);
|
||||||
QString json = response->getJson();
|
QString json = response->getJson();
|
||||||
QVERIFY(!json.isEmpty());
|
QVERIFY(!json.isEmpty());
|
||||||
|
response->deleteLater();
|
||||||
}
|
}
|
||||||
|
|
||||||
void UnitTest::getTokensDeleted()
|
void UnitTest::getTokensDeleted()
|
||||||
{
|
{
|
||||||
auto* testAccess = new RequestManager();
|
RequestManager testAccess;
|
||||||
QSignalSpy spy(testAccess, SIGNAL(responseReady()));
|
QSignalSpy spy(&testAccess, &RequestManager::responseReady);
|
||||||
Response* response = testAccess->getTokensDeleted(epochMS);
|
Response* response = testAccess.getTokensDeleted(epochMS);
|
||||||
QCOMPARE(spy.count(), 0);
|
QCOMPARE(spy.count(), 0);
|
||||||
spy.wait(timeout);
|
spy.wait(timeout);
|
||||||
QVERIFY(spy.isValid());
|
QVERIFY(spy.isValid());
|
||||||
QCOMPARE(spy.count(), 1);
|
QCOMPARE(spy.count(), 1);
|
||||||
QString json = response->getJson();
|
QString json = response->getJson();
|
||||||
QVERIFY(!json.isEmpty());
|
QVERIFY(!json.isEmpty());
|
||||||
|
response->deleteLater();
|
||||||
}
|
}
|
||||||
|
|
||||||
void UnitTest::getAccessGroups()
|
void UnitTest::getAccessGroups()
|
||||||
{
|
{
|
||||||
auto* testAccess = new RequestManager();
|
RequestManager testAccess;
|
||||||
QSignalSpy spy(testAccess, SIGNAL(responseReady()));
|
QSignalSpy spy(&testAccess, &RequestManager::responseReady);
|
||||||
Response* response = testAccess->getAccessGroups();
|
Response* response = testAccess.getAccessGroups();
|
||||||
QCOMPARE(spy.count(), 0);
|
QCOMPARE(spy.count(), 0);
|
||||||
spy.wait(timeout);
|
spy.wait(timeout);
|
||||||
QVERIFY(spy.isValid());
|
QVERIFY(spy.isValid());
|
||||||
QCOMPARE(spy.count(), 1);
|
QCOMPARE(spy.count(), 1);
|
||||||
QString json = response->getJson();
|
QString json = response->getJson();
|
||||||
QVERIFY(!json.isEmpty());
|
QVERIFY(!json.isEmpty());
|
||||||
|
response->deleteLater();
|
||||||
}
|
}
|
||||||
|
|
||||||
void UnitTest::getAccessGroupsUpdated()
|
void UnitTest::getAccessGroupsUpdated()
|
||||||
{
|
{
|
||||||
auto* testAccess = new RequestManager();
|
RequestManager testAccess;
|
||||||
QSignalSpy spy(testAccess, SIGNAL(responseReady()));
|
QSignalSpy spy(&testAccess, &RequestManager::responseReady);
|
||||||
Response* response = testAccess->getAccessGroupsUpdated(epochMS);
|
Response* response = testAccess.getAccessGroupsUpdated(epochMS);
|
||||||
QCOMPARE(spy.count(), 0);
|
QCOMPARE(spy.count(), 0);
|
||||||
spy.wait(timeout);
|
spy.wait(timeout);
|
||||||
QVERIFY(spy.isValid());
|
QVERIFY(spy.isValid());
|
||||||
QCOMPARE(spy.count(), 1);
|
QCOMPARE(spy.count(), 1);
|
||||||
QString json = response->getJson();
|
QString json = response->getJson();
|
||||||
QVERIFY(!json.isEmpty());
|
QVERIFY(!json.isEmpty());
|
||||||
|
response->deleteLater();
|
||||||
}
|
}
|
||||||
|
|
||||||
void UnitTest::getAccessGroupsDeleted()
|
void UnitTest::getAccessGroupsDeleted()
|
||||||
{
|
{
|
||||||
auto* testAccess = new RequestManager();
|
RequestManager testAccess;
|
||||||
QSignalSpy spy(testAccess, SIGNAL(responseReady()));
|
QSignalSpy spy(&testAccess, &RequestManager::responseReady);
|
||||||
Response* response = testAccess->getAccessGroupsDeleted(epochMS);
|
Response* response = testAccess.getAccessGroupsDeleted(epochMS);
|
||||||
QCOMPARE(spy.count(), 0);
|
QCOMPARE(spy.count(), 0);
|
||||||
spy.wait(timeout);
|
spy.wait(timeout);
|
||||||
QVERIFY(spy.isValid());
|
QVERIFY(spy.isValid());
|
||||||
QCOMPARE(spy.count(), 1);
|
QCOMPARE(spy.count(), 1);
|
||||||
QString json = response->getJson();
|
QString json = response->getJson();
|
||||||
QVERIFY(!json.isEmpty());
|
QVERIFY(!json.isEmpty());
|
||||||
|
response->deleteLater();
|
||||||
}
|
}
|
||||||
|
|
||||||
void UnitTest::getAccessGroupMembership()
|
void UnitTest::getAccessGroupMembership()
|
||||||
{
|
{
|
||||||
auto* testAccess = new RequestManager();
|
RequestManager testAccess;
|
||||||
QSignalSpy spy(testAccess, SIGNAL(responseReady()));
|
QSignalSpy spy(&testAccess, &RequestManager::responseReady);
|
||||||
Response* response = testAccess->getAccessGroupMembership();
|
Response* response = testAccess.getAccessGroupMembership();
|
||||||
QCOMPARE(spy.count(), 0);
|
QCOMPARE(spy.count(), 0);
|
||||||
spy.wait(timeout);
|
spy.wait(timeout);
|
||||||
QVERIFY(spy.isValid());
|
QVERIFY(spy.isValid());
|
||||||
QCOMPARE(spy.count(), 1);
|
QCOMPARE(spy.count(), 1);
|
||||||
QString json = response->getJson();
|
QString json = response->getJson();
|
||||||
QVERIFY(!json.isEmpty());
|
QVERIFY(!json.isEmpty());
|
||||||
|
response->deleteLater();
|
||||||
}
|
}
|
||||||
|
|
||||||
void UnitTest::getAccessGroupMembershipUpdated()
|
void UnitTest::getAccessGroupMembershipUpdated()
|
||||||
{
|
{
|
||||||
auto* testAccess = new RequestManager();
|
RequestManager testAccess;
|
||||||
QSignalSpy spy(testAccess, SIGNAL(responseReady()));
|
QSignalSpy spy(&testAccess, &RequestManager::responseReady);
|
||||||
Response* response = testAccess->getAccessGroupMembershipUpdated(epochMS);
|
Response* response = testAccess.getAccessGroupMembershipUpdated(epochMS);
|
||||||
QCOMPARE(spy.count(), 0);
|
QCOMPARE(spy.count(), 0);
|
||||||
spy.wait(timeout);
|
spy.wait(timeout);
|
||||||
QVERIFY(spy.isValid());
|
QVERIFY(spy.isValid());
|
||||||
QCOMPARE(spy.count(), 1);
|
QCOMPARE(spy.count(), 1);
|
||||||
QString json = response->getJson();
|
QString json = response->getJson();
|
||||||
QVERIFY(!json.isEmpty());
|
QVERIFY(!json.isEmpty());
|
||||||
|
response->deleteLater();
|
||||||
}
|
}
|
||||||
|
|
||||||
void UnitTest::getAccessGroupMembershipDeleted()
|
void UnitTest::getAccessGroupMembershipDeleted()
|
||||||
{
|
{
|
||||||
auto* testAccess = new RequestManager();
|
RequestManager testAccess;
|
||||||
QSignalSpy spy(testAccess, SIGNAL(responseReady()));
|
QSignalSpy spy(&testAccess, &RequestManager::responseReady);
|
||||||
Response* response = testAccess->getAccessGroupMembershipDeleted(epochMS);
|
Response* response = testAccess.getAccessGroupMembershipDeleted(epochMS);
|
||||||
QCOMPARE(spy.count(), 0);
|
QCOMPARE(spy.count(), 0);
|
||||||
spy.wait(timeout);
|
spy.wait(timeout);
|
||||||
QVERIFY(spy.isValid());
|
QVERIFY(spy.isValid());
|
||||||
QCOMPARE(spy.count(), 1);
|
QCOMPARE(spy.count(), 1);
|
||||||
QString json = response->getJson();
|
QString json = response->getJson();
|
||||||
QVERIFY(!json.isEmpty());
|
QVERIFY(!json.isEmpty());
|
||||||
|
response->deleteLater();
|
||||||
}
|
}
|
||||||
|
|
||||||
void UnitTest::setTokens()
|
void UnitTest::setTokens()
|
||||||
@ -208,139 +218,65 @@ void UnitTest::setTokens()
|
|||||||
QHash<QString, std::shared_ptr<Token>> tokens;
|
QHash<QString, std::shared_ptr<Token>> tokens;
|
||||||
auto token = getTestToken();
|
auto token = getTestToken();
|
||||||
tokens.insert(token->idToStringWithoutBraces(), token);
|
tokens.insert(token->idToStringWithoutBraces(), token);
|
||||||
auto testAccess = new RequestManager();
|
RequestManager testAccess;
|
||||||
QSignalSpy spy(testAccess, SIGNAL(responseReady()));
|
QSignalSpy spy(&testAccess, &RequestManager::responseReady);
|
||||||
Response* response = testAccess->setTokens(tokens);
|
Response* response = testAccess.setTokens(tokens);
|
||||||
QCOMPARE(spy.count(), 0);
|
QCOMPARE(spy.count(), 0);
|
||||||
spy.wait(timeout);
|
spy.wait(timeout);
|
||||||
QVERIFY(spy.isValid());
|
QVERIFY(spy.isValid());
|
||||||
QCOMPARE(spy.count(), 1);
|
QCOMPARE(spy.count(), 1);
|
||||||
QString json = response->getJson();
|
QString json = response->getJson();
|
||||||
QVERIFY(!json.isEmpty());
|
QVERIFY(!json.isEmpty());
|
||||||
|
response->deleteLater();
|
||||||
}
|
}
|
||||||
|
|
||||||
void UnitTest::deleteTokens()
|
void UnitTest::deleteTokens()
|
||||||
{
|
{
|
||||||
auto* testAccess = new RequestManager();
|
RequestManager testAccess;
|
||||||
QSignalSpy spy(testAccess, SIGNAL(responseReady()));
|
QSignalSpy spy(&testAccess, &RequestManager::responseReady);
|
||||||
QList<QString> ids;
|
QList<QString> ids;
|
||||||
ids.append("582c982d-6fd7-4856-8548-7ce542791c7a");
|
ids.append("582c982d-6fd7-4856-8548-7ce542791c7a");
|
||||||
ids.append("3ff23b41-3da3-4b33-82ce-d8e2d8c9a546");
|
ids.append("3ff23b41-3da3-4b33-82ce-d8e2d8c9a546");
|
||||||
Response* response = testAccess->deleteTokens(ids);
|
Response* response = testAccess.deleteTokens(ids);
|
||||||
QCOMPARE(spy.count(), 0);
|
QCOMPARE(spy.count(), 0);
|
||||||
spy.wait(timeout);
|
spy.wait(timeout);
|
||||||
QVERIFY(spy.isValid());
|
QVERIFY(spy.isValid());
|
||||||
QCOMPARE(spy.count(), 1);
|
QCOMPARE(spy.count(), 1);
|
||||||
QString json = response->getJson();
|
QString json = response->getJson();
|
||||||
QVERIFY(!json.isEmpty());
|
QVERIFY(!json.isEmpty());
|
||||||
|
response->deleteLater();
|
||||||
}
|
}
|
||||||
|
|
||||||
void UnitTest::subjectJSONParser()
|
void UnitTest::subjectJSONParser()
|
||||||
{
|
{
|
||||||
/*
|
RequestManager testAccess;
|
||||||
QFile jsonData(QDir::current().filePath("subjects.json"));
|
QSignalSpy spy(&testAccess, &RequestManager::responseReady);
|
||||||
|
Response* response = testAccess.getSubjects();
|
||||||
if (!jsonData.open(QIODevice::ReadOnly)) {
|
|
||||||
qCritical() << "Couldn't open config file config.json" << QDir::current().filePath("subjects.json");
|
|
||||||
QCoreApplication::exit(-1);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
QJsonDocument doc = QJsonDocument::fromJson(jsonData.readAll());
|
|
||||||
QJsonObject obj = doc.object();
|
|
||||||
QJsonArray arr = obj["items"].toArray();
|
|
||||||
*/
|
|
||||||
auto* testAccess = new RequestManager();
|
|
||||||
QSignalSpy spy(testAccess, SIGNAL(responseReady()));
|
|
||||||
Response* response = testAccess->getSubjects();
|
|
||||||
spy.wait(timeout);
|
spy.wait(timeout);
|
||||||
QString json = response->getJson();
|
QString json = response->getJson();
|
||||||
QJsonDocument doc = QJsonDocument::fromJson(json.toUtf8());
|
QJsonDocument doc = QJsonDocument::fromJson(json.toUtf8());
|
||||||
QJsonArray arr = doc.object()["items"].toArray();
|
QJsonArray arr = doc.object()["items"].toArray();
|
||||||
auto testSubject = new Subject();
|
Subject testSubject;
|
||||||
testSubject->fromJSON(arr[1].toObject());
|
testSubject.fromJSON(arr[1].toObject());
|
||||||
qDebug() << testSubject->getName() << " Size: " << arr.size();
|
qDebug() << testSubject.getName() << " Size: " << arr.size();
|
||||||
QVERIFY(!testSubject->getName().isEmpty());
|
QVERIFY(!testSubject.getName().isEmpty());
|
||||||
|
response->deleteLater();
|
||||||
}
|
}
|
||||||
|
|
||||||
void UnitTest::tokenJSONParser()
|
void UnitTest::tokenJSONParser()
|
||||||
{
|
{
|
||||||
auto* testAccess = new RequestManager();
|
RequestManager testAccess;
|
||||||
QSignalSpy spy(testAccess, SIGNAL(responseReady()));
|
QSignalSpy spy(&testAccess, &RequestManager::responseReady);
|
||||||
Response* response = testAccess->getTokens();
|
Response* response = testAccess.getTokens();
|
||||||
spy.wait(timeout);
|
spy.wait(timeout);
|
||||||
QString json = response->getJson();
|
QString json = response->getJson();
|
||||||
QJsonDocument doc = QJsonDocument::fromJson(json.toUtf8());
|
QJsonDocument doc = QJsonDocument::fromJson(json.toUtf8());
|
||||||
QJsonArray arr = doc.object()["items"].toArray();
|
QJsonArray arr = doc.object()["items"].toArray();
|
||||||
auto testToken = new Token();
|
Token testToken;
|
||||||
testToken->fromJSON(arr[5].toObject());
|
testToken.fromJSON(arr[5].toObject());
|
||||||
qDebug() << testToken->getName() << " Size: " << arr.size();
|
qDebug() << testToken.getName() << " Size: " << arr.size();
|
||||||
QVERIFY(!testToken->getName().isEmpty());
|
QVERIFY(!testToken.getName().isEmpty());
|
||||||
}
|
response->deleteLater();
|
||||||
|
|
||||||
//void UnitTest::connectToDB()
|
|
||||||
//{
|
|
||||||
// DatabaseManager *db = new DatabaseManager("192.168.1.94", "deloitte", "postgres", "34rjkciea12");
|
|
||||||
// QVERIFY(db->getOpened());
|
|
||||||
// qDebug() << db->getTestMessage(1);
|
|
||||||
// QVERIFY(true);
|
|
||||||
// QCOMPARE(db->getTestMessage(1), QStringLiteral("Hello world"));
|
|
||||||
// QCOMPARE(db->getTestMessage(db->createTestRecord("Now it's diffrent")), QStringLiteral("Now it's diffrent"));
|
|
||||||
//}
|
|
||||||
|
|
||||||
/*
|
|
||||||
void UnitTest::debugConnection()
|
|
||||||
{
|
|
||||||
QSslSocket ssl;// = new QSslSocket();
|
|
||||||
ssl.connectToHostEncrypted("192.168.1.3", 8443);
|
|
||||||
ssl.ignoreSslErrors();
|
|
||||||
if (!ssl.waitForEncrypted())
|
|
||||||
{
|
|
||||||
qDebug() << ssl.errorString();
|
|
||||||
}
|
|
||||||
QString tmp = "POST /AaaManager/authSession HTTP/1.1\r\nHost: 192.168.1.3:8443\r\nAuthorization: Basic c3BhY2V0aTpFN0ZFQTA3REJDODJGQjlCQTM0QjJFNDUzRTJFRkU4OUYwNTgzRTcxODc1NDM1MDdFRjExRTg0NzI2MDcxRkU0Mjg0NDUzNzJGMkU0NkI0NTVFQjBDNzk3NDdDNTFFMzYyRjQwM0NFMzk0NzNBMkE4QzJERkEwQ0U1Qzk4MjZDMA==\r\nUser-Agent: curl/7.65.3\r\nAccept: **\r\nContent-Type: application/json\r\nContent-Length: 164\r\n\r\n{\"password\":\"E7FEA07DBC82FB9BA34B2E453E2EFE89F0583E7187543507EF11E84726071FE428445372F2E46B455EB0C79747C51E362F403CE39473A2A8C2DFA0CE5C9826C0\",\"username\":\"spaceti\"}";
|
|
||||||
qDebug().noquote() << tmp.toUtf8();
|
|
||||||
ssl.write(tmp.toUtf8());
|
|
||||||
QString data;
|
|
||||||
while (ssl.waitForReadyRead() && data.isEmpty())
|
|
||||||
{
|
|
||||||
data.append(ssl.readAll().data());
|
|
||||||
}
|
|
||||||
qDebug().noquote() << data;
|
|
||||||
int index = data.lastIndexOf("id");
|
|
||||||
QString tkn = data.mid( index + 5, 36);
|
|
||||||
tkn = tkn + ":";
|
|
||||||
qDebug() << "parsed token : " <<tkn;
|
|
||||||
tmp = "POST /SubjectManager/getSubjects HTTP/1.1\r\nHost: 192.168.1.3:8443\r\nAuthorization: Basic " + tkn.toUtf8().toBase64() + "\r\nUser-Agent: curl/7.65.3\r\nAccept: **\r\n\r\n";
|
|
||||||
QFile file("output1234.txt");
|
|
||||||
file.open(QIODevice::ReadWrite);
|
|
||||||
QTextStream st(&file);
|
|
||||||
st << tmp;
|
|
||||||
file.close();
|
|
||||||
qDebug().noquote() << tmp.toUtf8();
|
|
||||||
ssl.write(tmp.toUtf8());
|
|
||||||
while (ssl.waitForReadyRead())
|
|
||||||
{
|
|
||||||
qDebug() << ssl.readAll().data();
|
|
||||||
}
|
|
||||||
qDebug() << ssl.errorString();
|
|
||||||
|
|
||||||
QVERIFY(true);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
void UnitTest::saveDataToDB()
|
|
||||||
{
|
|
||||||
|
|
||||||
// dataMan->localSaveTokens();
|
|
||||||
QVERIFY(true);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void UnitTest::getUuid()
|
|
||||||
{
|
|
||||||
qDebug() << QUuid::createUuid().toString().mid(1,36);
|
|
||||||
QCOMPARE(1,1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<Token> UnitTest::getTestToken()
|
std::shared_ptr<Token> UnitTest::getTestToken()
|
||||||
|
|||||||
@ -37,11 +37,6 @@ private slots:
|
|||||||
void deleteTokens();
|
void deleteTokens();
|
||||||
void subjectJSONParser();
|
void subjectJSONParser();
|
||||||
void tokenJSONParser();
|
void tokenJSONParser();
|
||||||
//void connectToDB();
|
|
||||||
//void debugConnection();
|
|
||||||
void saveDataToDB();
|
|
||||||
void getUuid();
|
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::shared_ptr<Token> getTestToken();
|
std::shared_ptr<Token> getTestToken();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user