colnod-connector/test/auto/database/tst_databaseapi.cpp
Filip Bucek 367376f283 disabled test ( runner has access to postgresql database )
+ have to add method to test wrong credentials or IP
2019-11-27 14:27:50 +01:00

29 lines
633 B
C++

#include <QtTest>
#include "databaseapi.h"
// add necessary includes here
class DatabaseTest : public QObject
{
Q_OBJECT
private slots:
void open_database_test();
};
void DatabaseTest::open_database_test()
{
serversdk::DatabaseManager dbManager;
DatabaseAPI db(&dbManager, false);
// TODO: fix -> databaseAPI must be able to add credentials to check for wrong one or test wrong IP
//db.open(user, password, url, etc );
// then test with wrong credentials
// QVERIFY(!db.open(worng usernae));
// QVERIFY(!db.open(worng ip));
}
QTEST_APPLESS_MAIN(DatabaseTest)
#include "tst_databaseapi.moc"