Skip to content
This repository was archived by the owner on Oct 23, 2024. It is now read-only.

Commit 25fd1c5

Browse files
nickbpgabrielhartmann
authored andcommitted
[INFINITY-2064] Test upgrade (but not downgrade) in all sanity tests* (#1339)
* Revert [INFINITY-2038] Support data_center and rack configuration in Cassandra #1303 * Test upgrade (but not downgrade) in all sanity tests* * Except template * Fix syntax in sdk_upgrade, clean up unused imports * Fix shakedown imports, remove apparently unnecessary vendor copy * More fixes * Finish HDFS upgrade test * Fixed HDFS upgrade user * More conrete journal node readiness check * Re-enable recovery check * Combined readiness check methods * Test upgrade (but not downgrade) in all sanity tests* * Except template * Fix syntax in sdk_upgrade, clean up unused imports * Fix shakedown imports, remove apparently unnecessary vendor copy * More fixes * Finish HDFS upgrade test * Fixed HDFS upgrade user * Bump upgrade timeout * Added deterministic field to HDFS's JMX lookup
1 parent 4bc5051 commit 25fd1c5

File tree

128 files changed

+385
-24946
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

128 files changed

+385
-24946
lines changed

frameworks/cassandra/tests/config.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
import json
21
import os
32

4-
import shakedown
53
import sdk_hosts
64
import sdk_jobs
75
import sdk_plan

frameworks/cassandra/tests/test_backup_and_restore.py

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
1-
import json
1+
import os
22
import pytest
3-
import shakedown
43
import tempfile
54
import uuid
65

76
from tests.config import *
8-
import sdk_cmd as cmd
9-
import sdk_hosts
107
import sdk_install
118
import sdk_jobs
12-
import sdk_plan
139
import sdk_utils
1410

1511
WRITE_DATA_JOB = get_write_data_job(node_address=FOLDERED_NODE_ADDRESS)
@@ -19,23 +15,20 @@
1915
TEST_JOBS = [WRITE_DATA_JOB, VERIFY_DATA_JOB, DELETE_DATA_JOB, VERIFY_DELETION_JOB]
2016

2117
no_strict = pytest.mark.skipif(os.environ.get("SECURITY") == "strict",
22-
reason="upgrade/downgrade tests broken in strict")
18+
reason="backup/restore tests broken in strict")
2319

2420
@pytest.fixture(scope='module', autouse=True)
2521
def configure_package(configure_universe):
2622
try:
2723
sdk_install.uninstall(FOLDERED_SERVICE_NAME, package_name=PACKAGE_NAME)
2824
sdk_utils.gc_frameworks()
2925

30-
# 1. check_suppression=False due to https://jira.mesosphere.com/browse/CASSANDRA-568
31-
# 2. user: root because Azure CLI needs to run in root...
26+
# user=root because Azure CLI needs to run in root...
3227
sdk_install.install(
3328
PACKAGE_NAME,
3429
DEFAULT_TASK_COUNT,
3530
service_name=FOLDERED_SERVICE_NAME,
36-
additional_options={"service": { "name": FOLDERED_SERVICE_NAME, "user": "root" } },
37-
check_suppression=False)
38-
sdk_plan.wait_for_completed_deployment(FOLDERED_SERVICE_NAME)
31+
additional_options={"service": { "name": FOLDERED_SERVICE_NAME, "user": "root" } })
3932

4033
tmp_dir = tempfile.mkdtemp(prefix='cassandra-test')
4134
for job in TEST_JOBS:

frameworks/cassandra/tests/test_overlay.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import os
21
import tempfile
32
import pytest
43

@@ -28,10 +27,11 @@ def configure_package(configure_universe):
2827
sdk_install.uninstall(PACKAGE_NAME)
2928
sdk_utils.gc_frameworks()
3029

31-
# check_suppression=False due to https://jira.mesosphere.com/browse/CASSANDRA-568
32-
sdk_install.install(PACKAGE_NAME, DEFAULT_TASK_COUNT, check_suppression=False,
33-
additional_options=sdk_networks.ENABLE_VIRTUAL_NETWORKS_OPTIONS)
34-
sdk_plan.wait_for_completed_deployment(PACKAGE_NAME)
30+
sdk_install.install(
31+
PACKAGE_NAME,
32+
DEFAULT_TASK_COUNT,
33+
additional_options=sdk_networks.ENABLE_VIRTUAL_NETWORKS_OPTIONS)
34+
3535
tmp_dir = tempfile.mkdtemp(prefix='cassandra-test')
3636
for job in TEST_JOBS:
3737
sdk_jobs.install_job(job, tmp_dir=tmp_dir)

frameworks/cassandra/tests/test_recovery.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
from tests.config import *
88
import sdk_cmd as cmd
99
import sdk_install
10-
import sdk_jobs
1110
import sdk_marathon
1211
import sdk_plan
1312
import sdk_tasks
@@ -19,10 +18,7 @@ def configure_package(configure_universe):
1918
sdk_install.uninstall(PACKAGE_NAME)
2019
sdk_utils.gc_frameworks()
2120

22-
# check_suppression=False due to https://jira.mesosphere.com/browse/CASSANDRA-568
23-
sdk_install.install(PACKAGE_NAME, DEFAULT_TASK_COUNT, check_suppression=False)
24-
25-
sdk_plan.wait_for_completed_deployment(PACKAGE_NAME)
21+
sdk_install.install(PACKAGE_NAME, DEFAULT_TASK_COUNT)
2622

2723
yield # let the test session execute
2824
finally:
@@ -52,7 +48,6 @@ def test_node_replace_replaces_node():
5248
@sdk_utils.dcos_1_9_or_higher # dcos task exec not supported < 1.9
5349
def test_node_replace_replaces_seed_node():
5450
pod_to_replace = 'node-0'
55-
pod_host = get_pod_host(pod_to_replace)
5651

5752
# start replace and wait for it to finish
5853
cmd.run_cli('cassandra pod replace {}'.format(pod_to_replace))

frameworks/cassandra/tests/test_sanity.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22
import pytest
33
import shakedown
44
import tempfile
5-
import uuid
65

76
from tests.config import *
87
import sdk_cmd as cmd
98
import sdk_hosts
109
import sdk_install
1110
import sdk_jobs
11+
import sdk_metrics
1212
import sdk_plan
13+
import sdk_upgrade
1314
import sdk_utils
14-
import sdk_metrics
1515

1616

1717
WRITE_DATA_JOB = get_write_data_job(node_address=FOLDERED_NODE_ADDRESS)
@@ -28,14 +28,12 @@ def configure_package(configure_universe):
2828
sdk_install.uninstall(FOLDERED_SERVICE_NAME, package_name=PACKAGE_NAME)
2929
sdk_utils.gc_frameworks()
3030

31-
# check_suppression=False due to https://jira.mesosphere.com/browse/CASSANDRA-568
32-
sdk_install.install(
31+
sdk_upgrade.test_upgrade(
32+
"beta-{}".format(PACKAGE_NAME),
3333
PACKAGE_NAME,
3434
DEFAULT_TASK_COUNT,
3535
service_name=FOLDERED_SERVICE_NAME,
36-
additional_options={"service": { "name": FOLDERED_SERVICE_NAME } },
37-
check_suppression=False)
38-
sdk_plan.wait_for_completed_deployment(FOLDERED_SERVICE_NAME)
36+
additional_options={"service": {"name": FOLDERED_SERVICE_NAME} })
3937

4038
tmp_dir = tempfile.mkdtemp(prefix='cassandra-test')
4139
for job in TEST_JOBS:

frameworks/cassandra/tests/test_soak.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,10 @@
77
import shakedown
88

99
from tests.config import *
10-
import sdk_api
1110
import sdk_hosts
1211
import sdk_jobs
1312
import sdk_plan
14-
import sdk_test_upgrade
15-
import sdk_utils
13+
import sdk_upgrade
1614

1715

1816
@pytest.mark.soak_backup
@@ -47,10 +45,12 @@ def test_soak_upgrade_downgrade():
4745
Assumes that the install options file is placed in the repo root."""
4846
with open('cassandra.json') as options_file:
4947
install_options = json.load(options_file)
50-
51-
sdk_test_upgrade.soak_upgrade_downgrade(
52-
PACKAGE_NAME, DEFAULT_TASK_COUNT, install_options
53-
)
48+
sdk_upgrade.soak_upgrade_downgrade(
49+
"beta-{}".format(PACKAGE_NAME),
50+
PACKAGE_NAME,
51+
DEFAULT_TASK_COUNT,
52+
service_name=install_options["service"]["name"],
53+
additional_options=install_options)
5454

5555

5656
@pytest.mark.soak_migration

frameworks/elastic/tests/test_overlay.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import os
21
import pytest
32
import shakedown
43

frameworks/elastic/tests/test_shakedown.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1+
import json
12
import pytest
2-
33
import shakedown
44

55
import sdk_cmd as cmd
@@ -8,7 +8,7 @@
88
import sdk_marathon
99
import sdk_metrics
1010
import sdk_tasks
11-
import sdk_test_upgrade
11+
import sdk_upgrade
1212
import sdk_utils
1313
from tests.config import *
1414

@@ -19,11 +19,13 @@ def configure_package(configure_universe):
1919
try:
2020
sdk_install.uninstall(FOLDERED_SERVICE_NAME, package_name=PACKAGE_NAME)
2121
sdk_utils.gc_frameworks()
22-
sdk_install.install(
22+
23+
sdk_upgrade.test_upgrade(
24+
"beta-{}".format(PACKAGE_NAME),
2325
PACKAGE_NAME,
2426
DEFAULT_TASK_COUNT,
2527
service_name=FOLDERED_SERVICE_NAME,
26-
additional_options={"service": { "name": FOLDERED_SERVICE_NAME } })
28+
additional_options={"service": {"name": FOLDERED_SERVICE_NAME}})
2729

2830
yield # let the test session execute
2931
finally:

frameworks/elastic/tests/test_soak.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import json
22
import pytest
3-
import sdk_test_upgrade
3+
import sdk_upgrade
44
from tests.config import (
55
PACKAGE_NAME,
66
DEFAULT_TASK_COUNT,
@@ -13,5 +13,9 @@ def test_soak_upgrade_downgrade():
1313
"""
1414
with open('elastic.json') as options_file:
1515
install_options = json.load(options_file)
16-
sdk_test_upgrade.soak_upgrade_downgrade("beta-{}".format(PACKAGE_NAME), PACKAGE_NAME, PACKAGE_NAME,
17-
DEFAULT_TASK_COUNT, install_options)
16+
sdk_upgrade.soak_upgrade_downgrade(
17+
"beta-{}".format(PACKAGE_NAME),
18+
PACKAGE_NAME,
19+
DEFAULT_TASK_COUNT,
20+
service_name=install_options["service"]["name"],
21+
additional_options=install_options)

frameworks/elastic/tests/test_upgrade.py

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

0 commit comments

Comments
 (0)