Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
116 commits
Select commit Hold shift + click to select a range
c6ab248
Namespace LVOL stress test + e2e workflows + upgrade test + single no…
RaunakJalan Mar 10, 2026
d5c4467
Namespace LVOL stress test + e2e workflows + upgrade test + single no…
RaunakJalan Mar 10, 2026
9ef4002
Adding dump validation
RaunakJalan Mar 10, 2026
439540e
Merge branch 'main' of github.com:simplyblock/sbcli into e2e-yaml-file
RaunakJalan Mar 10, 2026
f5cde12
Checking basic placement dump
RaunakJalan Mar 11, 2026
73bd127
Merge branch 'main' of github.com:simplyblock/sbcli into e2e-yaml-file
RaunakJalan Mar 11, 2026
51ac2c4
Checking basic placement dump and fixing notification
RaunakJalan Mar 11, 2026
9214a91
Merge branch 'main' of github.com:simplyblock/sbcli into e2e-yaml-file
RaunakJalan Mar 11, 2026
ecf96f7
Fixing fio timeout
RaunakJalan Mar 12, 2026
17e6bf1
Merge branch 'main' of github.com:simplyblock/sbcli into e2e-yaml-file
RaunakJalan Mar 12, 2026
35a32e0
Fix SFAM-2639 (#921)
Hamdy-khader Mar 12, 2026
10942d0
Adding new test case for fault tolerance 2
RaunakJalan Mar 13, 2026
158b28c
Merge branch 'main' of github.com:simplyblock/sbcli into e2e-yaml-file
RaunakJalan Mar 13, 2026
4c500e3
Adding rdma multi outage scenario
RaunakJalan Mar 13, 2026
26326c6
Merge branch 'main' of github.com:simplyblock/sbcli into e2e-yaml-file
RaunakJalan Mar 13, 2026
41690c7
Checking concurrency param
RaunakJalan Mar 13, 2026
abc2c24
Merge branch 'main' of github.com:simplyblock/sbcli into e2e-yaml-file
RaunakJalan Mar 13, 2026
95759a8
Debugging namespace post delete issue
RaunakJalan Mar 13, 2026
26bbe98
Debugging namespace post delete issue
RaunakJalan Mar 14, 2026
b7eeb56
Adding security nqn e2e cases and stress cases
RaunakJalan Mar 17, 2026
a777b69
Merge branch 'main' of github.com:simplyblock/sbcli into e2e-yaml-file
RaunakJalan Mar 17, 2026
e799e0d
Adding security nqn e2e cases and stress cases
RaunakJalan Mar 17, 2026
6b9e65e
Fixing test linter errors
RaunakJalan Mar 17, 2026
3e84b6a
Adding security param to bootstarp yamls
RaunakJalan Mar 17, 2026
a8cc8b2
Adding test way for security run
RaunakJalan Mar 17, 2026
b8a7077
Debugging security test failures
RaunakJalan Mar 17, 2026
e7df674
Adding backup restore cases
RaunakJalan Mar 17, 2026
75b9750
Merge branch 'main' of github.com:simplyblock/sbcli into e2e-yaml-file
RaunakJalan Mar 17, 2026
2c4a421
Adding cleanup for tmux after test end
RaunakJalan Mar 17, 2026
6cca64a
Fixing security case
RaunakJalan Mar 18, 2026
4b97ba3
Fixing security case
RaunakJalan Mar 18, 2026
aa0ce94
Fixing security case
RaunakJalan Mar 18, 2026
b2dbd5a
Fixing security case
RaunakJalan Mar 18, 2026
fac64d4
Adding cleanup for tmux after test end
RaunakJalan Mar 18, 2026
811463b
Fixing security case
RaunakJalan Mar 18, 2026
48ab170
Fixing security case
RaunakJalan Mar 18, 2026
13d20b5
Merge branch 'main' of github.com:simplyblock/sbcli into e2e-yaml-file
RaunakJalan Mar 18, 2026
e00f7bd
Fixing security case
RaunakJalan Mar 19, 2026
e8c701c
Reverting security cases
RaunakJalan Mar 19, 2026
7e44a76
Fixing security case
RaunakJalan Mar 19, 2026
02a7d76
Merge branch 'main' of github.com:simplyblock/sbcli into e2e-yaml-file
RaunakJalan Mar 19, 2026
44180c1
Fixing security case, traceback and adding backup cluster create
RaunakJalan Mar 20, 2026
64d659e
Fixing backup case
RaunakJalan Mar 20, 2026
7f5d6dd
Fixing backup case
RaunakJalan Mar 20, 2026
5b498c6
Fixing backup case
RaunakJalan Mar 22, 2026
0bc4367
Adding proper upgrade case and adding different image setup for pipel…
RaunakJalan Mar 22, 2026
d49e01a
Adding proper upgrade case and adding different image setup for pipel…
RaunakJalan Mar 22, 2026
d4bdc1a
Merge branch 'main' of github.com:simplyblock/sbcli into e2e-yaml-file
RaunakJalan Mar 22, 2026
a4e1b7b
Update upgrade workflows
RaunakJalan Mar 22, 2026
5539aca
Fixing upgrade tests
RaunakJalan Mar 23, 2026
e128727
Fixing upgrade tests
RaunakJalan Mar 23, 2026
93dd671
Fixing upgrade tests
RaunakJalan Mar 23, 2026
653dca3
Fixing backup case
RaunakJalan Mar 23, 2026
d721664
Fixing backup cases
RaunakJalan Mar 23, 2026
f744e71
Adding K8s cases, backup fixes
RaunakJalan Mar 24, 2026
daa1536
Merge branch 'main' of github.com:simplyblock/sbcli into e2e-yaml-file
RaunakJalan Mar 24, 2026
fb6449b
Fixing k8s pipeline
RaunakJalan Mar 24, 2026
64df378
Merge branch 'main' of github.com:simplyblock/sbcli into e2e-yaml-file
RaunakJalan Mar 24, 2026
011c253
Fixing k8s pipeline
RaunakJalan Mar 24, 2026
6344eb5
Fixing log collection
RaunakJalan Mar 25, 2026
06ffd8f
Fixing restore status check
RaunakJalan Mar 25, 2026
8507245
Fixing restore status check
RaunakJalan Mar 25, 2026
79b2240
Merge branch 'main' of github.com:simplyblock/sbcli into e2e-yaml-file
RaunakJalan Mar 25, 2026
4503458
Fixing k8s case
RaunakJalan Mar 25, 2026
4822725
Fixing k8s case
RaunakJalan Mar 25, 2026
78f7d38
Fixing k8s case
RaunakJalan Mar 25, 2026
6aa7635
Fixing k8s case
RaunakJalan Mar 25, 2026
2ee3bcc
Fixing k8s case
RaunakJalan Mar 25, 2026
9c93c9d
Fixing k8s case
RaunakJalan Mar 25, 2026
5e5a02b
Fixing k8s case
RaunakJalan Mar 26, 2026
6ecf178
Fixing k8s case
RaunakJalan Mar 26, 2026
747cca4
Fixing k8s case
RaunakJalan Mar 26, 2026
638313d
Fixing k8s case
RaunakJalan Mar 26, 2026
c4d7b2f
Fixing k8s case
RaunakJalan Mar 26, 2026
38f7d0c
Fixing k8s case
RaunakJalan Mar 26, 2026
0e01c4c
Fixing k8s case
RaunakJalan Mar 26, 2026
752f8d7
Modifying tests Bug-#2658
RaunakJalan Mar 26, 2026
e4e4b6f
Fixing k8s test
RaunakJalan Mar 27, 2026
ae71352
Fixing k8s test and fixing e2e for k8s
RaunakJalan Mar 27, 2026
e6328f7
Temp change k8s lvol num
RaunakJalan Mar 27, 2026
c2aba3d
Merge branch 'main' of github.com:simplyblock/sbcli into e2e-yaml-file
RaunakJalan Mar 27, 2026
ebd25c2
Fixing linter error
RaunakJalan Mar 28, 2026
c1e82cf
Merge branch 'main' of github.com:simplyblock/sbcli into e2e-yaml-file
RaunakJalan Mar 28, 2026
252f924
Removing suspend and adding graceful shutdown
RaunakJalan Mar 28, 2026
6fd68e4
Removing suspend and adding graceful shutdown
RaunakJalan Mar 29, 2026
3788e4d
Fixing rdma case
RaunakJalan Mar 29, 2026
3d116bc
Fixing k8s test
RaunakJalan Mar 29, 2026
0842150
Fixing k8s test
RaunakJalan Mar 29, 2026
a09f648
Fixing disconnect lvol and clone
RaunakJalan Mar 30, 2026
9ac1b4f
Merge branch 'main' of github.com:simplyblock/sbcli into e2e-yaml-file
RaunakJalan Mar 30, 2026
f69490a
Fixing disconnect lvol and clone
RaunakJalan Mar 30, 2026
dd10a22
Fixing security cases
RaunakJalan Mar 31, 2026
a225e9f
Merge branch 'main' of github.com:simplyblock/sbcli into e2e-yaml-file
RaunakJalan Mar 31, 2026
2298695
Fixing final docker log collection
RaunakJalan Mar 31, 2026
0a960ac
Fixing Quick Outage and adding different scenario for k8s
RaunakJalan Mar 31, 2026
a76024c
Fixing Quick Outage and adding different scenario for k8s
RaunakJalan Mar 31, 2026
949bda7
Fixing Quick Outage and adding different scenario for k8s
RaunakJalan Apr 1, 2026
0ad50d9
Adding subtask for k8s
RaunakJalan Apr 2, 2026
ea70b99
Fixing quick outage
RaunakJalan Apr 2, 2026
70cc289
Adding container stop start again
RaunakJalan Apr 2, 2026
007017a
Adding e2e detail collection
RaunakJalan Apr 2, 2026
4e17191
Adding placement dump
RaunakJalan Apr 3, 2026
20ebe40
Adding placement dump
RaunakJalan Apr 3, 2026
b095376
Fixing nqn
RaunakJalan Apr 3, 2026
da9e5ee
Adding k8s size check and no migration check
RaunakJalan Apr 3, 2026
f8005de
Adding k8s size check and no migration check
RaunakJalan Apr 3, 2026
cffb0c7
Adding thread check for no migration case
RaunakJalan Apr 3, 2026
1e9f7d5
Adding thread check for no migration case
RaunakJalan Apr 4, 2026
9091566
Fio reducing jobs for k8s
RaunakJalan Apr 4, 2026
2ec07ac
Adding cmd failures for lvol clone and reducing retries
RaunakJalan Apr 5, 2026
917eb77
Merge branch 'main' of github.com:simplyblock/sbcli into e2e-yaml-file
RaunakJalan Apr 5, 2026
3fb82ea
Fixing security restore cases
RaunakJalan Apr 5, 2026
2ae4393
Fixing connect string check and sec cases
RaunakJalan Apr 5, 2026
1825ca8
Fixing security cases
RaunakJalan Apr 6, 2026
58fef2b
Merge branch 'main' of github.com:simplyblock/sbcli into e2e-yaml-file
RaunakJalan Apr 6, 2026
9c8c76d
Fixing linter errors
RaunakJalan Apr 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
825 changes: 825 additions & 0 deletions .github/workflows/e2e-bootstrap-k8s.yml

Large diffs are not rendered by default.

2,815 changes: 1,479 additions & 1,336 deletions .github/workflows/e2e-bootstrap-v2.yml

Large diffs are not rendered by default.

2,761 changes: 1,456 additions & 1,305 deletions .github/workflows/e2e-bootstrap.yml

Large diffs are not rendered by default.

1,905 changes: 980 additions & 925 deletions .github/workflows/e2e-only.yml

Large diffs are not rendered by default.

905 changes: 905 additions & 0 deletions .github/workflows/stress-run-bootstrap-k8s.yml

Large diffs are not rendered by default.

2,490 changes: 1,332 additions & 1,158 deletions .github/workflows/stress-run-bootstrap-v2.yml

Large diffs are not rendered by default.

2,464 changes: 1,321 additions & 1,143 deletions .github/workflows/stress-run-bootstrap.yml

Large diffs are not rendered by default.

1,727 changes: 891 additions & 836 deletions .github/workflows/stress-run-only.yml

Large diffs are not rendered by default.

2,572 changes: 1,299 additions & 1,273 deletions .github/workflows/upgrade-bootstrap-single-v2.yml

Large diffs are not rendered by default.

2,426 changes: 1,226 additions & 1,200 deletions .github/workflows/upgrade-bootstrap-single.yml

Large diffs are not rendered by default.

2,608 changes: 1,317 additions & 1,291 deletions .github/workflows/upgrade-bootstrap-v2.yml

Large diffs are not rendered by default.

2,460 changes: 1,243 additions & 1,217 deletions .github/workflows/upgrade-bootstrap.yml

Large diffs are not rendered by default.

890 changes: 890 additions & 0 deletions e2e/TEST_PLAN.md

Large diffs are not rendered by default.

260 changes: 258 additions & 2 deletions e2e/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,95 @@
from stress_test.continuous_failover_ha_2node import RandomMultiClient2NodeFailoverTest
from stress_test.continuous_failover_ha_rdma import RandomRDMAFailoverTest
from stress_test.continuous_failover_ha_rdma_multi_outage import RandomRDMAMultiFailoverTest
from stress_test.continuous_failover_ha_multi_client_quick_outage import RandomRapidFailoverNoGap
from stress_test.continuous_failover_ha_k8s import RandomK8sMultiOutageFailoverTest
from stress_test.continuous_failover_ha_multi_client_quick_outage import (
RandomRapidFailoverNoGap,
RandomRapidFailoverNoGapV2,
RandomRapidFailoverNoGapV2NoMigration,
)
from stress_test.continuous_parallel_lvol_snapshot_clone import TestParallelLvolSnapshotCloneAPI
from stress_test.continuous_failover_ha_namespace import RandomMultiClientFailoverNamespaceTest
from stress_test.continuous_single_node_outage import RandomMultiClientSingleNodeTest
from stress_test.continuous_failover_ha_security import (
RandomSecurityFailoverTest,
RandomAllSecurityFailoverTest,
)

from e2e_tests.security.test_lvol_security import (
TestLvolSecurityCombinations,
TestLvolAllowedHostsPositive,
TestLvolAllowedHostsNegative,
TestLvolDynamicHostManagement,
TestLvolCryptoWithAllowedHosts,
TestLvolDhcapDirections,
TestLvolMultipleAllowedHosts,
TestLvolSecurityNegativeHostOps,
TestLvolSecurityNegativeCreation,
TestLvolSecurityNegativeConnect,
TestLvolAllowedHostsNoDhchap,
# Extended security tests (TC-SEC-070..127)
TestLvolSecurityHAFailover,
TestLvolSecurityMgmtNodeReboot,
TestLvolSecurityDynamicModification,
TestLvolSecurityMultiClientConcurrent,
TestLvolSecurityScaleAndRapidOps,
TestLvolSecurityNegativeConnectExtended,
TestLvolSecurityCloneOverride,
TestLvolSecurityWithBackup,
TestLvolSecurityResize,
TestLvolSecurityVolumeListFields,
TestLvolSecurityRDMA,
TestLvolSecurityOutageRecovery,
TestLvolSecurityNetworkInterrupt, # last: may trigger core dump / node abort
)

from e2e_tests.upgrade_tests.major_upgrade import TestMajorUpgrade, TestMajorUpgradeSingleNode

from e2e_tests.backup.test_backup_restore import (
TestBackupBasicPositive,
TestBackupRestoreDataIntegrity,
TestBackupPolicy,
TestBackupNegative,
TestBackupCryptoLvol,
TestBackupCustomGeometry,
TestBackupDeleteAndRestore,
TestBackupCrossClusterRestore, # NOT in get_backup_tests(); run explicitly only
# Extra coverage tests (TC-BCK-100..148)
TestBackupConcurrentIO,
TestBackupMultipleRestores,
TestBackupDeltaChainPointInTime,
TestBackupEmptyLvol,
TestBackupPoolRecreateRestore,
TestBackupPolicyAgeOnly,
TestBackupSnapshotClone,
TestBackupFilesystemXFS,
TestBackupLargeLvol,
TestBackupDeleteInProgress,
TestBackupPolicyMultipleLvols,
# Extended backup tests (TC-BCK-150..190)
TestBackupSecurityLvol,
TestBackupPolicyVersionsOne,
TestBackupPolicyMultipleOnSameLvol,
TestBackupPolicyLvolLevel,
TestBackupResizedLvol,
TestBackupListFields,
TestBackupUpgradeCompatibility,
TestBackupRestoreEdgeCases,
TestBackupSourceSwitch,
)

from stress_test.continuous_backup_stress import (
BackupStressParallelSnapshots,
BackupStressTcpFailover,
BackupStressRdmaFailover,
BackupStressCryptoMix,
BackupStressPolicyRetention,
BackupStressRestoreConcurrent,
TestBackupInterruptedBackup,
TestBackupInterruptedRestore,
BackupStressMarathon,
)


from load_tests.lvol_outage_load import TestLvolOutageLoadTest

Expand Down Expand Up @@ -93,7 +174,82 @@
TestHASingleNodeReboot,
TestHASingleNodeOutage,
TestSingleNodeResizeLvolCone,
TestAddK8sNodesDuringFioRun
TestAddK8sNodesDuringFioRun,
# Security E2E tests
TestLvolSecurityCombinations,
TestLvolAllowedHostsPositive,
TestLvolAllowedHostsNegative,
TestLvolDynamicHostManagement,
TestLvolCryptoWithAllowedHosts,
TestLvolDhcapDirections,
TestLvolMultipleAllowedHosts,
TestLvolAllowedHostsNoDhchap,
# Security negative tests
TestLvolSecurityNegativeHostOps,
TestLvolSecurityNegativeCreation,
TestLvolSecurityNegativeConnect,
# Extended security E2E tests (TC-SEC-070..127)
TestLvolSecurityMgmtNodeReboot,
TestLvolSecurityDynamicModification,
TestLvolSecurityMultiClientConcurrent,
TestLvolSecurityScaleAndRapidOps,
TestLvolSecurityNegativeConnectExtended,
TestLvolSecurityCloneOverride,
TestLvolSecurityWithBackup,
TestLvolSecurityResize,
TestLvolSecurityVolumeListFields,
TestLvolSecurityRDMA,
TestLvolSecurityHAFailover,
TestLvolSecurityOutageRecovery,
TestLvolSecurityNetworkInterrupt, # last: may trigger core dump / node abort
# Security stress tests
RandomSecurityFailoverTest,
RandomAllSecurityFailoverTest,
# RDMA stress tests
RandomRDMAFailoverTest,
RandomRDMAMultiFailoverTest,
# Backup E2E tests
TestBackupBasicPositive,
TestBackupRestoreDataIntegrity,
TestBackupPolicy,
TestBackupNegative,
TestBackupCryptoLvol,
TestBackupCustomGeometry,
TestBackupDeleteAndRestore,
TestBackupInterruptedBackup,
TestBackupInterruptedRestore,
# Backup extra E2E tests (TC-BCK-100..148)
TestBackupConcurrentIO,
TestBackupMultipleRestores,
TestBackupDeltaChainPointInTime,
TestBackupEmptyLvol,
TestBackupPoolRecreateRestore,
TestBackupPolicyAgeOnly,
TestBackupSnapshotClone,
TestBackupFilesystemXFS,
TestBackupLargeLvol,
TestBackupDeleteInProgress,
TestBackupPolicyMultipleLvols,
# Extended backup E2E tests (TC-BCK-150..190)
TestBackupSecurityLvol,
TestBackupPolicyVersionsOne,
TestBackupPolicyMultipleOnSameLvol,
TestBackupPolicyLvolLevel,
TestBackupResizedLvol,
TestBackupListFields,
TestBackupUpgradeCompatibility,
TestBackupRestoreEdgeCases,
TestBackupSourceSwitch,
# Backup stress tests
BackupStressParallelSnapshots,
BackupStressTcpFailover,
BackupStressRdmaFailover,
BackupStressCryptoMix,
BackupStressPolicyRetention,
BackupStressRestoreConcurrent,
BackupStressMarathon,
# Cross-cluster restore — explicit-only (requires CLUSTER2_* env vars)
TestBackupCrossClusterRestore,
]

def get_all_tests(custom=True, ha_test=False):
Expand Down Expand Up @@ -126,6 +282,21 @@ def get_all_tests(custom=True, ha_test=False):
# TestManyClonesFromSameSnapshot,
# TestDeviceNodeRestart
]
# tests += [
# # Security E2E tests
# TestLvolSecurityCombinations,
# TestLvolAllowedHostsPositive,
# TestLvolAllowedHostsNegative,
# TestLvolDynamicHostManagement,
# TestLvolCryptoWithAllowedHosts,
# TestLvolDhcapDirections,
# TestLvolMultipleAllowedHosts,
# TestLvolAllowedHostsNoDhchap,
# # Security negative tests
# TestLvolSecurityNegativeHostOps,
# TestLvolSecurityNegativeCreation,
# TestLvolSecurityNegativeConnect,
# ]
if not custom:
tests.remove(TestLvolFioNpcsCustom)
else:
Expand All @@ -138,6 +309,38 @@ def get_all_tests(custom=True, ha_test=False):
# tests.remove(TestHASingleNodeOutage)
return tests

def get_security_tests():
return [
# Security E2E tests
TestLvolSecurityCombinations,
TestLvolAllowedHostsPositive,
TestLvolAllowedHostsNegative,
TestLvolDynamicHostManagement,
TestLvolCryptoWithAllowedHosts,
TestLvolDhcapDirections,
TestLvolMultipleAllowedHosts,
TestLvolAllowedHostsNoDhchap,
# Security negative tests
TestLvolSecurityNegativeHostOps,
TestLvolSecurityNegativeCreation,
TestLvolSecurityNegativeConnect,
# Extended security tests (TC-SEC-070..127)
TestLvolSecurityMgmtNodeReboot,
TestLvolSecurityDynamicModification,
TestLvolSecurityMultiClientConcurrent,
TestLvolSecurityScaleAndRapidOps,
TestLvolSecurityNegativeConnectExtended,
TestLvolSecurityCloneOverride,
TestLvolSecurityWithBackup,
TestLvolSecurityResize,
TestLvolSecurityVolumeListFields,
TestLvolSecurityRDMA,
TestLvolSecurityHAFailover,
TestLvolSecurityOutageRecovery,
TestLvolSecurityNetworkInterrupt, # last: may trigger core dump / node abort
]


def get_stress_tests():
tests = [
TestStressLvolCloneClusterFioRun,
Expand All @@ -155,13 +358,66 @@ def get_stress_tests():
RandomMultiClient2NodeFailoverTest,
RandomRDMAFailoverTest,
RandomRDMAMultiFailoverTest,
RandomK8sMultiOutageFailoverTest,
RandomRapidFailoverNoGap,
RandomRapidFailoverNoGapV2,
RandomRapidFailoverNoGapV2NoMigration,
TestParallelLvolSnapshotCloneAPI,
RandomMultiClientFailoverNamespaceTest,
RandomMultiClientSingleNodeTest,
]
return tests

def get_backup_tests():
return [
# E2E backup tests
TestBackupBasicPositive,
TestBackupRestoreDataIntegrity,
TestBackupPolicy,
TestBackupNegative,
TestBackupCryptoLvol,
# TestBackupCustomGeometry, # Will re-enable when we have a way to reliably test it in CI (currently requires manual setup of custom geometry pool)
TestBackupDeleteAndRestore,
# Interrupted-operation tests
TestBackupInterruptedBackup,
TestBackupInterruptedRestore,
# Extra coverage tests (TC-BCK-100..148)
TestBackupConcurrentIO,
TestBackupMultipleRestores,
TestBackupDeltaChainPointInTime,
TestBackupEmptyLvol,
TestBackupPoolRecreateRestore,
TestBackupPolicyAgeOnly,
TestBackupSnapshotClone,
TestBackupFilesystemXFS,
TestBackupLargeLvol,
TestBackupDeleteInProgress,
TestBackupPolicyMultipleLvols,
# Extended backup tests (TC-BCK-150..190)
TestBackupSecurityLvol,
TestBackupPolicyVersionsOne,
TestBackupPolicyMultipleOnSameLvol,
TestBackupPolicyLvolLevel,
TestBackupResizedLvol,
TestBackupListFields,
TestBackupUpgradeCompatibility,
TestBackupRestoreEdgeCases,
TestBackupSourceSwitch,
]


def get_backup_stress_tests():
return [
BackupStressParallelSnapshots,
BackupStressTcpFailover,
BackupStressRdmaFailover,
BackupStressCryptoMix,
BackupStressPolicyRetention,
BackupStressRestoreConcurrent,
BackupStressMarathon,
]


def get_upgrade_tests():
tests = [
TestMajorUpgrade,
Expand Down
30 changes: 20 additions & 10 deletions e2e/e2e.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
### simplyblock e2e tests
import argparse
import traceback
from __init__ import get_all_tests, ALL_TESTS
from __init__ import get_all_tests, get_security_tests, get_backup_tests, get_backup_stress_tests, ALL_TESTS
from logger_config import setup_logger
from exceptions.custom_exception import (
TestNotFoundException,
Expand Down Expand Up @@ -54,7 +54,15 @@ def main():
test_class_run = []
new_nodes = args.new_nodes.strip().split() if args.new_nodes else []
skipped_cases = 0
if args.testname is None or len(args.testname.strip()) == 0:

# group keywords — run a named category of tests
if args.testname and args.testname.strip().lower() == "security":
test_class_run = get_security_tests()
elif args.testname and args.testname.strip().lower() == "backup":
test_class_run = get_backup_tests()
elif args.testname and args.testname.strip().lower() == "backup-stress":
test_class_run = get_backup_stress_tests()
elif args.testname is None or len(args.testname.strip()) == 0:
for cls in tests:
if cls.__name__ == "TestAddNodesDuringFioRun":
if len(new_nodes) == 0 or len(new_nodes) % 2 != 0:
Expand All @@ -77,7 +85,8 @@ def main():
test_class_run.append(cls)
else:
for cls in ALL_TESTS:
if args.testname.lower() in cls.__name__.lower():
needle = args.testname.lower().replace("_", "")
if needle in cls.__name__.lower():
if cls.__name__ == "TestAddNodesDuringFioRun" and (len(new_nodes) == 0 or len(new_nodes) % 2 != 0):
raise ValueError("TestAddNodesDuringFioRun requires --new-nodes with IPs in multiples of 2.")
if cls.__name__ == "TestRestartNodeOnAnotherHost" and len(new_nodes) == 0:
Expand Down Expand Up @@ -154,19 +163,18 @@ def main():
test_obj.run()
passed_cases.append(f"{test.__name__}")
except Exception as exp:
logger.error(traceback.format_exc())
errors[f"{test.__name__}"] = [exp]
tb = traceback.format_exc()
logger.error(tb)
errors[f"{test.__name__}"] = [exp, tb]
try:
if i == (len(test_class_run) - 1) or check_for_dumps():
test_obj.collect_management_details(post_teardown=False)
test_obj.collect_management_details(post_teardown=False)
test_obj.teardown(delete_lvols=False, close_ssh=False)
if not args.run_k8s:
test_obj.stop_docker_logs_collect()
else:
test_obj.stop_k8s_log_collect()
test_obj.fetch_all_nodes_distrib_log()
if i == (len(test_class_run) - 1) or check_for_dumps():
test_obj.collect_management_details(post_teardown=True)
test_obj.collect_management_details(post_teardown=True)
test_obj.teardown(delete_lvols=True, close_ssh=False)
all_nodes = test_obj._get_all_nodes()
test_obj.ssh_obj.collect_final_docker_logs_simple(all_nodes, test_obj.docker_logs_path)
Expand Down Expand Up @@ -240,7 +248,9 @@ def main():
logger.error(f"Failed to update Test Run status: {e}")

if errors:
raise MultipleExceptions(errors)
exc = MultipleExceptions(errors)
logger.error(f"MultipleExceptions: {exc}")
raise exc
if skipped_cases:
raise SkippedTestsException("There are SKIPPED Tests. Please check!!")

Expand Down
Loading
Loading