Skip to content

Commit 8c56d75

Browse files
committed
Cleanup unit tests
1 parent 0b2a808 commit 8c56d75

20 files changed

+65
-151
lines changed

.travis.yml

Lines changed: 0 additions & 54 deletions
This file was deleted.

3rdparty/3rdparty.pri

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,12 @@
44
#
55
#-------------------------------------------------
66

7-
DEFINES += ENABLE_EXTERNAL_FORMATTERS
8-
HEADERS += $$_PRO_FILE_PWD_/modules/value-editor/externalformattersmanager.h
9-
SOURCES += $$_PRO_FILE_PWD_/modules/value-editor/externalformattersmanager.cpp
7+
exists( $$_PRO_FILE_PWD_/modules/value-editor/externalformattersmanager.h) {
8+
message("External formatters was enabled")
9+
DEFINES += ENABLE_EXTERNAL_FORMATTERS
10+
HEADERS += $$_PRO_FILE_PWD_/modules/value-editor/externalformattersmanager.h
11+
SOURCES += $$_PRO_FILE_PWD_/modules/value-editor/externalformattersmanager.cpp
12+
}
1013

1114
# qredisclient
1215
if(win32*):exists( $$PWD/qredisclient/qredisclient.lib ) {

README.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,11 @@
77
[Known issues](http://docs.rdm.dev/en/latest/known-issues/) |
88
[**Telegram Chat**](https://t.me/RedisDesktopManager)
99

10-
[![Travis Build Status](https://travis-ci.org/uglide/RedisDesktopManager.svg?branch=2019)](https://travis-ci.org/uglide/RedisDesktopManager)
11-
[![Appveyor Build status](https://ci.appveyor.com/api/projects/status/3pwtjfl9yioyom9t?svg=true)](https://ci.appveyor.com/project/uglide/redisdesktopmanager/branch/2019)
12-
[![Coverage Status](https://coveralls.io/repos/uglide/RedisDesktopManager/badge.svg?branch=2019)](https://coveralls.io/r/uglide/RedisDesktopManager?branch=2019)
13-
[![Snap Status](https://build.snapcraft.io/badge/RedisDesktop/redisdesktopmanager-snap.svg)](https://build.snapcraft.io/user/RedisDesktop/redisdesktopmanager-snap)
1410
[![Documentation Status](https://readthedocs.org/projects/redisdesktopmanager/badge/?version=latest)](http://docs.rdm.dev/en/latest/?badge=latest)
1511

1612
Open source cross-platform Desktop Manager for Redis ® based on Qt 5
1713

18-
![RDM screenshot](http://rdm.dev/static/img/features/all.png?v2020)
14+
![RDM screenshot](http://rdm.dev/static/img/features/all.png?v2021)
1915

2016

2117
**Officially Supported platforms**:

src/app/models/connectionconf.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ class ServerConfig : public RedisClient::ConnectionConfig
5959
QString namespaceSeparator() const;
6060
void setNamespaceSeparator(QString);
6161

62-
bool luaKeysLoading() const;
6362
void setLuaKeysLoading(bool);
6463

6564
uint databaseScanLimit() const;

src/app/models/connectionsmanager.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include "configmanager.h"
1212
#include "modules/bulk-operations/bulkoperationsmanager.h"
1313
#include "modules/connections-tree/items/serveritem.h"
14+
#include "modules/connections-tree/items/servergroup.h"
1415
#include "modules/value-editor/tabsmodel.h"
1516

1617
ConnectionsManager::ConnectionsManager(const QString& configPath,

src/app/models/connectionsmanager.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
#include <functional>
66

77
#include "app/models/connectionconf.h"
8-
#include "connections-tree/items/servergroup.h"
98
#include "bulk-operations/connections.h"
109
#include "connections-tree/model.h"
1110
#include "treeoperations.h"
@@ -15,6 +14,10 @@ namespace ValueEditor {
1514
class TabsModel;
1615
}
1716

17+
namespace ConnectionsTree {
18+
class ServerGroup;
19+
}
20+
1821
class Events;
1922

2023
class ConnectionsManager : public ConnectionsTree::Model,

tests/qml_tests/tst_formatters.qml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,23 @@
11
import QtQuick 2.3
2+
import QtQml.Models 2.13
23
import QtTest 1.0
34

4-
import "./../../src/qml/value-editor/editors/formatters/formatters.js" as Formatters
5+
import "./../../src/qml/value-editor/editors/formatters/"
56

67
TestCase {
78
name: "FormatterTests"
89

10+
ValueFormatters {
11+
id: valueFormatters
12+
}
13+
914
function test_plain() {
1015
// given
11-
var plain = Formatters.plain
16+
var plain = valueFormatters.get(0)
1217
var testValue = "plain_text!"
1318

1419
// checks
15-
verify(plain.title.length !== 0, "title")
20+
verify(plain.name.length !== 0, "title")
1621

1722
plain.getFormatted(testValue, function (error, formatted, readOnly, format){
1823
compare(formatted, testValue)

tests/tests.pro

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
TEMPLATE = subdirs
22
SUBDIRS = unit_tests \
33
qml_tests \
4-
py_tests \

tests/unit_tests/main.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#include "testcases/connections-tree/test_databaseitem.h"
1313
#include "testcases/connections-tree/test_model.h"
1414
#include "testcases/connections-tree/test_serveritem.h"
15-
#include "testcases/console/test_console.h"
1615
#include "testcases/console/test_consolemodel.h"
1716

1817
int main(int argc, char *argv[]) {
@@ -27,14 +26,13 @@ int main(int argc, char *argv[]) {
2726
QTest::qExec(new TestModel, argc, argv)
2827

2928
// console module
30-
+ QTest::qExec(new TestConsole, argc, argv)
29+
+ QTest::qExec(new TestConsoleOperations, argc, argv)
3130

3231
// app
3332
+ QTest::qExec(new TestConnectionsManager, argc, argv) +
3433
QTest::qExec(new TestConfigManager, argc, argv) +
35-
QTest::qExec(new TestConsoleOperations, argc, argv) +
36-
QTest::qExec(new TestTreeOperations, argc, argv) +
3734
QTest::qExec(new TestKeyModels, argc, argv) +
35+
QTest::qExec(new TestTreeOperations, argc, argv) +
3836
QTest::qExec(new TestAbstractKey, argc, argv);
3937

4038
if (allTestsResult == 0)

tests/unit_tests/testcases/app/app-tests.pri

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ HEADERS += \
1010
$$APP_SRC_DIR/models/connectionsmanager.h \
1111
$$APP_SRC_DIR/models/configmanager.h \
1212
$$APP_SRC_DIR/models/connectionconf.h \
13+
$$APP_SRC_DIR/models/connectiongroup.h \
1314
$$APP_SRC_DIR/models/treeoperations.h \
1415
$$APP_SRC_DIR/models/key-models/keyfactory.h \
1516
$$APP_SRC_DIR/models/key-models/abstractkey.h \
@@ -29,6 +30,7 @@ SOURCES += \
2930
$$APP_SRC_DIR/apputils.cpp \
3031
$$APP_SRC_DIR/models/connectionsmanager.cpp \
3132
$$APP_SRC_DIR/models/configmanager.cpp \
33+
$$APP_SRC_DIR/models/connectiongroup.cpp \
3234
$$APP_SRC_DIR/models/connectionconf.cpp \
3335
$$APP_SRC_DIR/models/treeoperations.cpp \
3436
$$APP_SRC_DIR/models/key-models/keyfactory.cpp \

0 commit comments

Comments
 (0)