|
| 1 | +*** Settings *** |
| 2 | +Documentation Manual Test Cases |
| 3 | +Test Tags negative |
| 4 | + |
| 5 | +Resource ../keywords/variables.resource |
| 6 | +Resource ../keywords/common.resource |
| 7 | +Resource ../keywords/longhorn.resource |
| 8 | +Resource ../keywords/volume.resource |
| 9 | +Resource ../keywords/setting.resource |
| 10 | +Resource ../keywords/storageclass.resource |
| 11 | +Resource ../keywords/workload.resource |
| 12 | +Resource ../keywords/statefulset.resource |
| 13 | +Resource ../keywords/backup.resource |
| 14 | +Resource ../keywords/recurringjob.resource |
| 15 | +Library DateTime |
| 16 | + |
| 17 | +Test Setup Set up test environment |
| 18 | +Test Teardown Cleanup test resources |
| 19 | + |
| 20 | +*** Keywords *** |
| 21 | +Get test start time |
| 22 | + ${test_start_time}= Get Current Date result_format=datetime |
| 23 | + Log ${test_start_time} |
| 24 | + Set Test Variable ${test_start_time} |
| 25 | + |
| 26 | +Perform recurring job workflow under load |
| 27 | + ${NUM_VOLUMES} = Set Variable 100 |
| 28 | + ${NUM_VOLUMES_DETACH} = Set Variable 20 |
| 29 | + |
| 30 | + When Get test start time |
| 31 | + And Create storageclass longhorn-test with dataEngine=${DATA_ENGINE} |
| 32 | + FOR ${i} IN RANGE ${NUM_VOLUMES} |
| 33 | + And Create statefulset ${i} using RWO volume with longhorn-test storageclass and size 10 Mi |
| 34 | + And Write 1 MB data to file data.txt in statefulset ${i} |
| 35 | + END |
| 36 | + |
| 37 | + And Create snapshot recurringjob 0 |
| 38 | + ... groups=["default"] |
| 39 | + ... cron=*/1 * * * * |
| 40 | + ... concurrency=5 |
| 41 | + ... labels={"test":"recurringjob"} |
| 42 | + |
| 43 | + FOR ${i} IN RANGE ${NUM_VOLUMES_DETACH} |
| 44 | + When Create backup ${i} for statefulset ${i} volume |
| 45 | + Then Scale down statefulset ${i} to detach volume |
| 46 | + And Scale up statefulset ${i} to attach volume |
| 47 | + END |
| 48 | + |
| 49 | + And Check longhorn manager pods not restarted after test start |
| 50 | + |
| 51 | +*** Test Cases *** |
| 52 | +Test Stability of Longhorn with Large Workload |
| 53 | + Perform recurring job workflow under load |
| 54 | + |
| 55 | +Test Upgrade Stability with Large Workload |
| 56 | + ${LONGHORN_STABLE_VERSION}= Get Environment Variable LONGHORN_STABLE_VERSION default='' |
| 57 | + IF '${LONGHORN_STABLE_VERSION}' == '' |
| 58 | + Fail Environment variable LONGHORN_STABLE_VERSION is not set |
| 59 | + END |
| 60 | + |
| 61 | + Given Set setting deleting-confirmation-flag to true |
| 62 | + And Uninstall Longhorn |
| 63 | + And Check Longhorn CRD removed |
| 64 | + |
| 65 | + When Install Longhorn stable version |
| 66 | + And set_backupstore |
| 67 | + |
| 68 | + When Perform recurring job workflow under load |
| 69 | + And Upgrade Longhorn to custom version |
| 70 | + |
| 71 | + When Get test start time |
| 72 | + FOR ${i} IN RANGE ${NUM_VOLUMES_DETACH} |
| 73 | + And Scale down statefulset ${i} to detach volume |
| 74 | + And Scale up statefulset ${i} to attach volume |
| 75 | + END |
| 76 | + |
| 77 | + And Check longhorn manager pods not restarted after test start |
0 commit comments