Skip to content

Commit

Permalink
PBM move reports to zephyr cloud (#135)
Browse files Browse the repository at this point in the history
* PBM move reports to zephyr cloud

* Removed pytest.ini
  • Loading branch information
olexandr-havryliak authored Apr 3, 2024
1 parent 0d0b775 commit 98180d7
Show file tree
Hide file tree
Showing 18 changed files with 33 additions and 73 deletions.
2 changes: 0 additions & 2 deletions pbm-functional/pytest/Dockerfile-testinfra
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,5 @@ RUN apk add --no-cache docker python3 py-pip bash git
RUN pip install --no-cache-dir --break-system-packages docker && \
pip install --no-cache-dir --break-system-packages pytest-testinfra && \
pip install --no-cache-dir --break-system-packages pytest-timeout && \
pip install --no-cache-dir --break-system-packages adaptavist==2.3.1 && \
pip install --no-cache-dir --break-system-packages pytest-adaptavist && \
pip install --no-cache-dir --break-system-packages pymongo
WORKDIR /test
5 changes: 0 additions & 5 deletions pbm-functional/pytest/pytest.ini

This file was deleted.

3 changes: 1 addition & 2 deletions pbm-functional/pytest/test_PBM-1058.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,8 @@ def start_cluster(cluster,request):
cluster.get_logs()
cluster.destroy(cleanup_backups=True)

@pytest.mark.testcase(test_case_key="T205", test_step_key=1)
@pytest.mark.timeout(300,func_only=True)
def test_physical(start_cluster,cluster):
def test_physical_PBM_T205(start_cluster,cluster):
cluster.check_pbm_status()
pymongo.MongoClient(cluster.connection)["test"]["test"].insert_many(documents)
backup=cluster.make_backup("physical")
Expand Down
3 changes: 1 addition & 2 deletions pbm-functional/pytest/test_PBM-1058_upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,8 @@ def start_cluster(cluster,request):
cluster.get_logs()
cluster.destroy(cleanup_backups=True)

@pytest.mark.testcase(test_case_key="T235", test_step_key=1)
@pytest.mark.timeout(300,func_only=True)
def test_physical(start_cluster,cluster):
def test_physical_PBM_T235(start_cluster,cluster):
cluster.check_pbm_status()
pymongo.MongoClient(cluster.connection)["test"]["test"].insert_many(documents)
backup=cluster.make_backup("physical")
Expand Down
3 changes: 1 addition & 2 deletions pbm-functional/pytest/test_PBM-1090.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,8 @@ def start_cluster(cluster,request):
cluster.get_logs()
cluster.destroy(cleanup_backups=True)

@pytest.mark.testcase(test_case_key="T204", test_step_key=1)
@pytest.mark.timeout(300,func_only=True)
def test_logical(start_cluster,cluster):
def test_logical_PBM_T204(start_cluster,cluster):
cluster.check_pbm_status()

client = pymongo.MongoClient(cluster.connection)
Expand Down
9 changes: 3 additions & 6 deletions pbm-functional/pytest/test_PBM-1155.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,8 @@ def insert_data(db,collection):
t4.join()
cluster.destroy(cleanup_backups=True)

@pytest.mark.testcase(test_case_key="T246", test_step_key=1)
@pytest.mark.timeout(6000, func_only=True)
def test_incremental_base(start_cluster,cluster):
def test_incremental_base_PBM_T246(start_cluster,cluster):
cluster.check_pbm_status()
time.sleep(10)
for i in range(20):
Expand All @@ -88,9 +87,8 @@ def test_incremental_base(start_cluster,cluster):

Cluster.log("Finished successfully")

@pytest.mark.testcase(test_case_key="T245", test_step_key=1)
@pytest.mark.timeout(6000, func_only=True)
def test_incremental(start_cluster,cluster):
def test_incremental_PBM_T245(start_cluster,cluster):
cluster.check_pbm_status()
time.sleep(10)
cluster.make_backup("incremental --base")
Expand All @@ -106,9 +104,8 @@ def test_incremental(start_cluster,cluster):
assert pymongo.MongoClient(cluster.connection)["test"].command("collstats", "test2").get("sharded", False)
Cluster.log("Finished successfully")

@pytest.mark.testcase(test_case_key="T247", test_step_key=1)
@pytest.mark.timeout(6000, func_only=True)
def test_physical(start_cluster,cluster):
def test_physical_PBM_T247(start_cluster,cluster):
cluster.check_pbm_status()
time.sleep(10)
for i in range(20):
Expand Down
3 changes: 1 addition & 2 deletions pbm-functional/pytest/test_PBM-1171.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,8 @@ def start_cluster(cluster,request):
cluster.get_logs()
cluster.destroy(cleanup_backups=True)

@pytest.mark.testcase(test_case_key="T248", test_step_key=1)
@pytest.mark.timeout(600,func_only=True)
def test_physical_mixed_env(start_cluster,cluster):
def test_physical_mixed_env_PBM_T248(start_cluster,cluster):
cluster.check_pbm_status()
pymongo.MongoClient(cluster.connection)["test"]["test"].insert_many(documents)

Expand Down
3 changes: 1 addition & 2 deletions pbm-functional/pytest/test_PBM-1223.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,8 @@ def start_cluster(cluster,request):
cluster.get_logs()
cluster.destroy(cleanup_backups=True)

@pytest.mark.testcase(test_case_key="T249", test_step_key=1)
@pytest.mark.timeout(300,func_only=True)
def test_logical(start_cluster,cluster):
def test_logical_PBM_T249(start_cluster,cluster):
cluster.check_pbm_status()
client = pymongo.MongoClient(cluster.connection)
db = client.test
Expand Down
3 changes: 1 addition & 2 deletions pbm-functional/pytest/test_PBM-773.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,8 @@ def start_cluster(cluster,request):
cluster.get_logs()
cluster.destroy(cleanup_backups=True)

@pytest.mark.testcase(test_case_key="T221", test_step_key=1)
@pytest.mark.timeout(300,func_only=True)
def test_logical(start_cluster,cluster):
def test_logical_PBM_T221(start_cluster,cluster):
cluster.check_pbm_status()
cluster.make_backup("logical")
cluster.enable_pitr()
Expand Down
12 changes: 4 additions & 8 deletions pbm-functional/pytest/test_PBM-979.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,8 @@ def start_cluster(cluster,request):
cluster.get_logs()
cluster.destroy(cleanup_backups=True)

@pytest.mark.testcase(test_case_key="T233", test_step_key=1)
@pytest.mark.timeout(300,func_only=True)
def test_logical(start_cluster,cluster):
def test_logical_PBM_T233(start_cluster,cluster):
time.sleep(5) # wait for delayed node
cluster.check_pbm_status()
pymongo.MongoClient(cluster.connection)["test"]["test"].insert_many(documents)
Expand All @@ -80,9 +79,8 @@ def test_logical(start_cluster,cluster):
assert pymongo.MongoClient(cluster.connection)["test"]["test"].count_documents({}) == len(documents)
Cluster.log("Finished successfully")

@pytest.mark.testcase(test_case_key="T195", test_step_key=1)
@pytest.mark.timeout(300,func_only=True)
def test_physical(start_cluster,cluster):
def test_physical_PBM_T195(start_cluster,cluster):
time.sleep(5) # wait for delayed node
cluster.check_pbm_status()
pymongo.MongoClient(cluster.connection)["test"]["test"].insert_many(documents)
Expand Down Expand Up @@ -110,9 +108,8 @@ def test_physical(start_cluster,cluster):
assert 'buildIndexes' not in member or member['buildIndexes'] == rs_config['members'][index]['buildIndexes']
Cluster.log("Finished successfully")

@pytest.mark.testcase(test_case_key="T234", test_step_key=1)
@pytest.mark.timeout(300,func_only=True)
def test_incremental(start_cluster,cluster):
def test_incremental_PBM_T234(start_cluster,cluster):
time.sleep(5)
cluster.check_pbm_status()
init_backup=cluster.make_backup("incremental --base")
Expand Down Expand Up @@ -142,9 +139,8 @@ def test_incremental(start_cluster,cluster):
assert 'buildIndexes' not in member or member['buildIndexes'] == rs_config['members'][index]['buildIndexes']
Cluster.log("Finished successfully")

@pytest.mark.testcase(test_case_key="T240", test_step_key=1)
@pytest.mark.timeout(600,func_only=True)
def test_external(start_cluster,cluster):
def test_external_PBM_T240(start_cluster,cluster):
time.sleep(5)
cluster.check_pbm_status()
pymongo.MongoClient(cluster.connection)["test"]["test"].insert_many(documents)
Expand Down
12 changes: 4 additions & 8 deletions pbm-functional/pytest/test_fresh_sharded.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,8 @@ def start_cluster(cluster,newcluster,request):
cluster.destroy()
newcluster.destroy(cleanup_backups=True)

@pytest.mark.testcase(test_case_key="T208", test_step_key=1)
@pytest.mark.timeout(600,func_only=True)
def test_logical(start_cluster,cluster,newcluster):
def test_logical_PBM_T208(start_cluster,cluster,newcluster):
cluster.check_pbm_status()
pymongo.MongoClient(cluster.connection)["test"]["test"].insert_many(documents)
backup=cluster.make_backup("logical")
Expand All @@ -79,9 +78,8 @@ def test_logical(start_cluster,cluster,newcluster):
assert pymongo.MongoClient(newcluster.connection)["test"].command("collstats", "test").get("sharded", False)
Cluster.log("Finished successfully")

@pytest.mark.testcase(test_case_key="T207", test_step_key=1)
@pytest.mark.timeout(600,func_only=True)
def test_physical(start_cluster,cluster,newcluster):
def test_physical_PBM_T207(start_cluster,cluster,newcluster):
cluster.check_pbm_status()
pymongo.MongoClient(cluster.connection)["test"]["test"].insert_many(documents)
backup=cluster.make_backup("physical")
Expand All @@ -93,9 +91,8 @@ def test_physical(start_cluster,cluster,newcluster):
assert pymongo.MongoClient(newcluster.connection)["test"].command("collstats", "test").get("sharded", False)
Cluster.log("Finished successfully")

@pytest.mark.testcase(test_case_key="T209", test_step_key=1)
@pytest.mark.timeout(600,func_only=True)
def test_incremental(start_cluster,cluster,newcluster):
def test_incremental_PBM_T209(start_cluster,cluster,newcluster):
cluster.check_pbm_status()
cluster.make_backup("incremental --base")
pymongo.MongoClient(cluster.connection)["test"]["test"].insert_many(documents)
Expand All @@ -108,9 +105,8 @@ def test_incremental(start_cluster,cluster,newcluster):
assert pymongo.MongoClient(newcluster.connection)["test"].command("collstats", "test").get("sharded", False)
Cluster.log("Finished successfully")

@pytest.mark.testcase(test_case_key="T238", test_step_key=1)
@pytest.mark.timeout(600,func_only=True)
def test_external(start_cluster,cluster,newcluster):
def test_external_PBM_T238(start_cluster,cluster,newcluster):
cluster.check_pbm_status()
pymongo.MongoClient(cluster.connection)["test"]["test"].insert_many(documents)
backup = cluster.external_backup_start()
Expand Down
3 changes: 1 addition & 2 deletions pbm-functional/pytest/test_kerberos.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,8 @@ def start_cluster(cluster,request):
cluster.get_logs()
cluster.destroy(cleanup_backups=True)

@pytest.mark.testcase(test_case_key="T202", test_step_key=1)
@pytest.mark.timeout(300,func_only=True)
def test_logical(start_cluster,cluster):
def test_logical_PBM_T202(start_cluster,cluster):
cluster.check_pbm_status()
pymongo.MongoClient(cluster.connection)["test"]["test"].insert_many(documents)
backup=cluster.make_backup("logical")
Expand Down
6 changes: 2 additions & 4 deletions pbm-functional/pytest/test_kmip.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,8 @@ def start_cluster(cluster,request):
cluster.get_logs()
cluster.destroy(cleanup_backups=True)

@pytest.mark.testcase(test_case_key="T197", test_step_key=1)
@pytest.mark.timeout(300,func_only=True)
def test_physical(start_cluster,cluster):
def test_physical_PBM_T197(start_cluster,cluster):
cluster.check_pbm_status()
pymongo.MongoClient(cluster.connection)["test"]["test"].insert_many(documents)
backup=cluster.make_backup("physical")
Expand All @@ -47,9 +46,8 @@ def test_physical(start_cluster,cluster):
assert pymongo.MongoClient(cluster.connection)["test"]["test"].count_documents({}) == len(documents)
Cluster.log("Finished successfully")

@pytest.mark.testcase(test_case_key="T201", test_step_key=1)
@pytest.mark.timeout(300,func_only=True)
def test_incremental(start_cluster,cluster):
def test_incremental_PBM_T201(start_cluster,cluster):
cluster.check_pbm_status()
cluster.make_backup("incremental --base")
pymongo.MongoClient(cluster.connection)["test"]["test"].insert_many(documents)
Expand Down
3 changes: 1 addition & 2 deletions pbm-functional/pytest/test_ldap.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,8 @@ def start_cluster(cluster,request):
cluster.get_logs()
cluster.destroy(cleanup_backups=True)

@pytest.mark.testcase(test_case_key="T203", test_step_key=1)
@pytest.mark.timeout(300,func_only=True)
def test_logical(start_cluster,cluster):
def test_logical_PBM_T203(start_cluster,cluster):
cluster.check_pbm_status()
pymongo.MongoClient(cluster.connection)["test"]["test"].insert_many(documents)
backup=cluster.make_backup("logical")
Expand Down
9 changes: 3 additions & 6 deletions pbm-functional/pytest/test_remap_sharded.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,8 @@ def start_cluster(cluster,newcluster,request):
cluster.destroy()
newcluster.destroy(cleanup_backups=True)

@pytest.mark.testcase(test_case_key="T211", test_step_key=1)
@pytest.mark.timeout(600,func_only=True)
def test_logical(start_cluster,cluster,newcluster):
def test_logical_PBM_T211(start_cluster,cluster,newcluster):
cluster.check_pbm_status()
pymongo.MongoClient(cluster.connection)["test"]["test"].insert_many(documents)
backup=cluster.make_backup("logical")
Expand All @@ -78,9 +77,8 @@ def test_logical(start_cluster,cluster,newcluster):
assert pymongo.MongoClient(newcluster.connection)["test"].command("collstats", "test").get("sharded", False)
Cluster.log("Finished successfully")

@pytest.mark.testcase(test_case_key="T242", test_step_key=1)
@pytest.mark.timeout(600,func_only=True)
def test_physical(start_cluster,cluster,newcluster):
def test_physical_PBM_T242(start_cluster,cluster,newcluster):
cluster.check_pbm_status()
pymongo.MongoClient(cluster.connection)["test"]["test"].insert_many(documents)
backup=cluster.make_backup("physical")
Expand All @@ -92,9 +90,8 @@ def test_physical(start_cluster,cluster,newcluster):
assert pymongo.MongoClient(newcluster.connection)["test"]["test"].count_documents({}) == len(documents)
assert pymongo.MongoClient(newcluster.connection)["test"].command("collstats", "test").get("sharded", False)

@pytest.mark.testcase(test_case_key="T243", test_step_key=1)
@pytest.mark.timeout(600,func_only=True)
def test_incremental(start_cluster,cluster,newcluster):
def test_incremental_PBM_T243(start_cluster,cluster,newcluster):
cluster.check_pbm_status()
cluster.make_backup("incremental --base")
pymongo.MongoClient(cluster.connection)["test"]["test"].insert_many(documents)
Expand Down
15 changes: 5 additions & 10 deletions pbm-functional/pytest/test_sharded.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,8 @@ def start_cluster(cluster,request):
cluster.get_logs()
cluster.destroy(cleanup_backups=True)

@pytest.mark.testcase(test_case_key="T218", test_step_key=1)
@pytest.mark.timeout(600,func_only=True)
def test_logical(start_cluster,cluster):
def test_logical_PBM_T218(start_cluster,cluster):
cluster.check_pbm_status()
pymongo.MongoClient(cluster.connection)["test"]["test"].insert_many(documents)
pymongo.MongoClient(cluster.connection)["test"]["test1"].insert_many(documents)
Expand All @@ -74,9 +73,8 @@ def test_logical(start_cluster,cluster):
assert pymongo.MongoClient(cluster.connection)["test"].command("collstats", "test").get("sharded", False)
Cluster.log("Finished successfully")

@pytest.mark.testcase(test_case_key="T194", test_step_key=1)
@pytest.mark.timeout(600, func_only=True)
def test_logical_pitr(start_cluster,cluster):
def test_logical_pitr_PBM_T194(start_cluster,cluster):
cluster.check_pbm_status()
pymongo.MongoClient(cluster.connection)["test"]["test"].insert_many(documents)
backup_l1=cluster.make_backup("logical")
Expand Down Expand Up @@ -115,9 +113,8 @@ def test_physical(start_cluster,cluster):
assert pymongo.MongoClient(cluster.connection)["test"].command("collstats", "test").get("sharded", False)
Cluster.log("Finished successfully")

@pytest.mark.testcase(test_case_key="T244", test_step_key=1)
@pytest.mark.timeout(600, func_only=True)
def test_physical_pitr(start_cluster,cluster):
def test_physical_pitr_PBM_T244(start_cluster,cluster):
cluster.check_pbm_status()
cluster.make_backup("logical")
cluster.enable_pitr(pitr_extra_args="--set pitr.oplogSpanMin=0.5")
Expand Down Expand Up @@ -153,9 +150,8 @@ def test_incremental(start_cluster,cluster):
assert pymongo.MongoClient(cluster.connection)["test"].command("collstats", "test").get("sharded", False)
Cluster.log("Finished successfully")

@pytest.mark.testcase(test_case_key="T236", test_step_key=1)
@pytest.mark.timeout(600,func_only=True)
def test_external_meta(start_cluster,cluster):
def test_external_meta_PBM_T236(start_cluster,cluster):
cluster.check_pbm_status()
pymongo.MongoClient(cluster.connection)["test"]["test"].insert_many(documents)
backup = cluster.external_backup_start()
Expand All @@ -171,9 +167,8 @@ def test_external_meta(start_cluster,cluster):
assert pymongo.MongoClient(cluster.connection)["test"].command("collstats", "test").get("sharded", False)
Cluster.log("Finished successfully")

@pytest.mark.testcase(test_case_key="T237", test_step_key=1)
@pytest.mark.timeout(600,func_only=True)
def test_external_nometa(start_cluster,cluster):
def test_external_nometa_PBM_T237(start_cluster,cluster):
cluster.check_pbm_status()
pymongo.MongoClient(cluster.connection)["test"]["test"].insert_many(documents)
backup = cluster.external_backup_start()
Expand Down
9 changes: 3 additions & 6 deletions pbm-functional/pytest/test_vault.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,8 @@ def start_cluster(cluster,request):
cluster.get_logs()
cluster.destroy(cleanup_backups=True)

@pytest.mark.testcase(test_case_key="T195", test_step_key=1)
@pytest.mark.timeout(300,func_only=True)
def test_physical(start_cluster,cluster):
def test_physical_PBM_T195(start_cluster,cluster):
cluster.check_pbm_status()
pymongo.MongoClient(cluster.connection)["test"]["test"].insert_many(documents)
backup=cluster.make_backup("physical")
Expand All @@ -49,9 +48,8 @@ def test_physical(start_cluster,cluster):
assert pymongo.MongoClient(cluster.connection)["test"]["test"].count_documents({}) == len(documents)
Cluster.log("Finished successfully")

@pytest.mark.testcase(test_case_key="T200", test_step_key=1)
@pytest.mark.timeout(300,func_only=True)
def test_incremental(start_cluster,cluster):
def test_incremental_PBM_T200(start_cluster,cluster):
cluster.check_pbm_status()
cluster.make_backup("incremental --base")
pymongo.MongoClient(cluster.connection)["test"]["test"].insert_many(documents)
Expand All @@ -62,9 +60,8 @@ def test_incremental(start_cluster,cluster):
assert pymongo.MongoClient(cluster.connection)["test"]["test"].count_documents({}) == len(documents)
Cluster.log("Finished successfully")

@pytest.mark.testcase(test_case_key="T239", test_step_key=1)
@pytest.mark.timeout(600,func_only=True)
def test_external(start_cluster,cluster):
def test_external_PBM_T239(start_cluster,cluster):
cluster.check_pbm_status()
pymongo.MongoClient(cluster.connection)["test"]["test"].insert_many(documents)
backup = cluster.external_backup_start()
Expand Down
3 changes: 1 addition & 2 deletions pbm-functional/pytest/test_x509.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,8 @@ def start_cluster(cluster,request):
cluster.get_logs()
cluster.destroy(cleanup_backups=True)

@pytest.mark.testcase(test_case_key="T199", test_step_key=1)
@pytest.mark.timeout(300,func_only=True)
def test_logical(start_cluster,cluster):
def test_logical_PBM_T199(start_cluster,cluster):
cluster.check_pbm_status()
pymongo.MongoClient(cluster.connection)["test"]["test"].insert_many(documents)
backup=cluster.make_backup("logical")
Expand Down

0 comments on commit 98180d7

Please sign in to comment.