End-to-end tests for Deckhouse storage components.
- Create test with script:
cd tests && ./create-test.sh <your-test-name> - Update environment variables in
tests/<your-test-name>/test_exports - Update
tests/<your-test-name>/cluster_config.yml - Apply them:
source tests/<your-test-name>/test_exports - Write your test in
tests/<your-test-name>/<your-test-name>_test.go(Section marked---=== TESTS START HERE ===---) - Run the test:
go test -timeout=240m -v ./tests/<your-test-name> -count=1
The -count=1 flag prevents Go from using cached test results.
Timeout 240m is a global timeout for entire testkit. Adjust it on your needs.
go test -timeout=240m -v ./tests/test-folder-name -count=1 -ginkgo.focus="should create virtual machines"NOTE: DO NOT EDIT THIS TESTKIT!
Template folder for creating new E2E tests. Contains a complete framework with:
- Automatic test cluster creation and teardown
- Module enablement and readiness verification
- Environment variable validation and configuration
- Example test structure with BeforeAll/AfterAll hooks
Use ./tests/create-test.sh <your-test-name> to create a new test from this template.
Stress tests for all CSI storage drivers. This test suite:
- Creates a test cluster with required modules (snapshot-controller, and one or more CSI drivers: csi-huawei, csi-hpe, csi-netapp, csi-s3, etc.)
- Applies CSI custom resources from YAML files in
files/directory (storage connections, storage classes, NGCs) - Validates environment variables referenced in CR files are set before applying
- Runs flog stress test with PVC resize operations
- Runs comprehensive snapshot/resize/clone stress test (multiple resize stages, snapshots, clones)
Designed to validate any CSI driver stability under high load with concurrent PVC operations, snapshots, and clones. Configure which drivers to test by editing crFiles and storageClassNames in the test file.
Run the test: go test -timeout=120m -v ./tests/csi-all-stress-tests -count=1
See pkg/FUNCTIONS_GLOSSARY.md for a full list of all exported functions in the pkg/ directory, grouped by resource (cluster, VM, PVC, LVMVolumeGroup, etc.).
SSH_USER-- SSH username for connecting to the base clusterSSH_HOST-- SSH host address of the base clusterTEST_CLUSTER_CREATE_MODE-- Cluster creation mode:alwaysUseExisting,alwaysCreateNew, orcommanderTEST_CLUSTER_STORAGE_CLASS-- Storage class for DKP cluster deploymentDKP_LICENSE_KEY-- Deckhouse Platform license keyREGISTRY_DOCKER_CFG-- Docker registry credentials for downloading images from Deckhouse registry
SSH_PRIVATE_KEY-- Path to SSH private key file, or base64-encoded key content. Default:~/.ssh/id_rsa. IfSSH_AUTH_SOCKis set, SSH agent keys are also tried as fallbackSSH_PUBLIC_KEY-- Path to SSH public key file, or plain-text key content. Default:~/.ssh/id_rsa.pubSSH_PASSPHRASE-- Passphrase for the SSH private key. Required for non-interactive mode with encrypted keysSSH_VM_USER-- SSH user for connecting to VMs deployed inside the test cluster. Default:cloudSSH_JUMP_HOST-- Jump host address for connecting to clusters behind a bastionSSH_JUMP_USER-- Jump host SSH user. Defaults toSSH_USERif jump host is setSSH_JUMP_KEY_PATH-- Jump host SSH key path. Defaults toSSH_PRIVATE_KEYif jump host is set
YAML_CONFIG_FILENAME-- Filename of the cluster definition YAML. Default:cluster_config.ymlTEST_CLUSTER_CLEANUP-- Set totrueto remove the test cluster after tests complete. Default:falseTEST_CLUSTER_NAMESPACE-- Namespace for DKP cluster deployment. Default:e2e-test-clusterKUBE_CONFIG_PATH-- Path to a kubeconfig file. Used as fallback if SSH-based kubeconfig retrieval failsIMAGE_PULL_POLICY-- Image pull policy for ClusterVirtualImages:AlwaysorIfNotExists. Default:IfNotExists
LOG_LEVEL-- Log level:debug,info,warn, orerror. Default:debugLOG_FILE_PATH-- Path to log file. If set, logs to both console and fileLOG_TIMESTAMPS_ENABLED-- Whether to include timestamps in log output. Default:true
COMMANDER_URL-- URL of the Deckhouse Commander API (required)COMMANDER_TOKEN-- API token for Commander authentication (required)COMMANDER_CLUSTER_NAME-- Name of the cluster in Commander to use or create. Default:e2e-test-clusterCOMMANDER_TEMPLATE_NAME-- Template name for creating a new cluster. Required whenCOMMANDER_CREATE_IF_NOT_EXISTS=trueCOMMANDER_TEMPLATE_VERSION-- Template version to use. Defaults to latestCOMMANDER_REGISTRY_NAME-- Registry name for cluster creation (auto-resolved to registry_id)COMMANDER_CREATE_IF_NOT_EXISTS-- Set totrueto create a new cluster if it doesn't exist. Default:falseCOMMANDER_WAIT_TIMEOUT-- Timeout for waiting for cluster to become ready. Default:30mCOMMANDER_INSECURE_SKIP_TLS_VERIFY-- Skip TLS certificate verification for Commander API. Default:falseCOMMANDER_CA_CERT-- Path to CA certificate file for verifying Commander API TLSCOMMANDER_AUTH_METHOD-- Auth method:x-auth-token,bearer,token,cookie, orbasic. Default:x-auth-tokenCOMMANDER_AUTH_USER-- Username for basic authentication (only withauth_method=basic)COMMANDER_API_PREFIX-- API path prefix for Commander API. Default:/api/v1COMMANDER_VALUES-- Template input values for cluster creation as JSON string
STRESS_TEST_PVC_SIZE-- Initial PVC size. Default:100MiSTRESS_TEST_PODS_COUNT-- Number of pods to create. Default:100STRESS_TEST_PVC_SIZE_AFTER_RESIZE-- PVC size after first resize. Default:200MiSTRESS_TEST_PVC_SIZE_AFTER_RESIZE_STAGE2-- PVC size after second resize. Default:300MiSTRESS_TEST_SNAPSHOTS_PER_PVC-- Number of snapshots per PVC. Default:2STRESS_TEST_MAX_ATTEMPTS-- Maximum attempts for waiting operations. Default:360STRESS_TEST_INTERVAL-- Interval between attempts in seconds. Default:5STRESS_TEST_CLEANUP-- Whether to cleanup resources after stress tests. Default:true