Skip to content

Commit ba8571b

Browse files
authored
Migrate stub tests to testkit (#545)
- remove all migrated stub tests - some stub tests (or parts of them) got turned into unit tests - implement testkit messages ForcedRoutingTableUpdate and GetRoutingTable - send debug log output to testkit to easy test debugging for people running the backend in docker or similar
1 parent 57dd539 commit ba8571b

14 files changed

+540
-1688
lines changed

testkitbackend/requests.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,8 @@ def ResultConsume(backend, data):
304304
"serverInfo": {
305305
"protocolVersion":
306306
".".join(map(str, summary.server.protocol_version)),
307-
"agent": summary.server.agent
307+
"agent": summary.server.agent,
308+
# "address": ":".join(map(str, summary.server.address))
308309
}
309310
})
310311

tests/performance/test_results.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ class ReadWorkload(object):
3636
def setup_class(cls):
3737
cls.server = server = RemoteGraphDatabaseServer()
3838
server.start()
39-
cls.driver = GraphDatabase.driver(server.server_uri, auth=server.auth_token, encrypted=server.encrypted)
39+
cls.driver = GraphDatabase.driver(server.server_uri,
40+
auth=server.auth_token,
41+
encrypted=server.encrypted)
4042

4143
@classmethod
4244
def teardown_class(cls):

tests/performance/tools.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,26 +19,17 @@
1919
# limitations under the License.
2020

2121

22-
from test.integration.tools import IntegrationTestCase
23-
24-
from os import makedirs, remove
25-
from os.path import basename, dirname, join as path_join, realpath, isfile, expanduser
26-
import platform
2722
from unittest import TestCase, SkipTest
28-
from shutil import copyfile
29-
from sys import exit, stderr
3023

3124
try:
3225
from urllib.request import urlretrieve
3326
except ImportError:
3427
from urllib import urlretrieve
3528

36-
from boltkit.controller import WindowsController, UnixController
37-
3829
from neo4j import GraphDatabase
3930
from neo4j.exceptions import AuthError
4031

41-
from test.env import NEO4J_USER, NEO4J_PASSWORD, NEO4J_SERVER_URI
32+
from tests.env import NEO4J_USER, NEO4J_PASSWORD, NEO4J_SERVER_URI
4233

4334

4435
def is_listening(address):

tests/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ coverage
33
pytest
44
pytest-benchmark
55
pytest-cov
6+
pytest-mock
67
teamcity-messages

tests/stub/test_accesslevel.py

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

0 commit comments

Comments
 (0)