Skip to content

Commit c94cc23

Browse files
committed
Move UpgradePath to crate.qa.tests
1 parent 6dfd694 commit c94cc23

File tree

3 files changed

+9
-13
lines changed

3 files changed

+9
-13
lines changed

src/crate/qa/tests.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@
2828
'/usr/lib/java-1.8.0',
2929
) + tuple(glob('/Library/Java/JavaVirtualMachines/jdk*1.8*/Contents/Home'))
3030

31+
class UpgradePath(NamedTuple):
32+
from_version: str
33+
to_version: str
34+
35+
def __repr__(self):
36+
return f'{self.from_version} -> {self.to_version}'
37+
3138

3239
def prepare_env(java_home_candidates: Iterable[str]) -> dict:
3340
for candidate in filter(os.path.exists, java_home_candidates):

tests/bwc/test_recovery.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
import random
66
from random import sample
77

8-
from crate.qa.tests import NodeProvider, insert_data
9-
from bwc.test_rolling_upgrade import UpgradePath
8+
from crate.qa.tests import NodeProvider, insert_data, UpgradePath
109

1110

1211
class RecoveryTest(NodeProvider, unittest.TestCase):

tests/bwc/test_rolling_upgrade.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,6 @@
11
import unittest
2-
from typing import NamedTuple
32
from crate.client import connect
4-
from crate.qa.tests import NodeProvider, insert_data, wait_for_active_shards
5-
6-
7-
class UpgradePath(NamedTuple):
8-
from_version: str
9-
to_version: str
10-
11-
def __repr__(self):
12-
return f'{self.from_version} -> {self.to_version}'
13-
3+
from crate.qa.tests import NodeProvider, insert_data, wait_for_active_shards, UpgradePath
144

155
ROLLING_UPGRADES = (
166
# 4.0.0 -> 4.0.1 -> 4.0.2 don't support rolling upgrades due to a bug

0 commit comments

Comments
 (0)