-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add zone volume creation integration tests (#359)
* Add zone volume creation integration tests * Fix golangci-lint issue * Create e2e zone tests * Adjust indentation of template yaml files * Adjust indentation of template yaml files * Update e2e file names * Format e2e files for golangci-lint * Update e2e test scenarios * Update pod templates * Address PR comments * Add README to e2e tests * Update sts templates
- Loading branch information
Showing
12 changed files
with
703 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
.PHONY: all | ||
all: help | ||
|
||
help: | ||
@echo | ||
@echo "The following targets are commonly used:" | ||
@echo | ||
@echo "integration - Run integration tests" | ||
@echo "zone-integration - Run zone-integration tests" | ||
@echo "zone-e2e - Run zone-e2e tests" | ||
@echo | ||
|
||
.PHONY: integration | ||
integration: | ||
cd integration; ./run.sh TestIntegration | ||
|
||
.PHONY: zone-integration | ||
zone-integration: | ||
cd integration; ./run.sh TestZoneIntegration | ||
|
||
.PHONY: zone-e2e | ||
zone-e2e: | ||
go test -v -count=1 -timeout 1h -run '^TestZoneVolumes$$' ./e2e |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# End-to-End Tests Overview | ||
|
||
## Prerequisite | ||
|
||
A couple of assumptions made in the e2e tests are that the driver runs with a valid secret. Other assumptions are: | ||
|
||
1. The namespace `vxflexos-test` exists since all k8s objects will be created and checked for there. | ||
2. For `multi-available-zone` tests, the storage class `vxflexos-az-wait` exists (see [storage class](../../samples/storageclass/storageclass-az.yaml) for example). | ||
3. For `multi-available-zone` tests, the nodes should be configured correctly as the test will pull out the zoneLabelKey and compare across the nodes and storage class. | ||
|
||
## Using the Makefile | ||
|
||
In the root `test` directory, there is a `Makefile` with different targets for the integration test and the e2e test. Currently, the only target is: | ||
|
||
- `make zone-e2e` -> Runs the end to end tests for `multi-available-zone`. | ||
|
||
## Overview of Targets/Tests | ||
|
||
### Multi-Available Zone | ||
|
||
The following tests are implemented and run during the `zone-e2e` test. | ||
|
||
1. Creates a stateful set of 7 replicas and ensures that everything is up and ready with the zone configuration. | ||
2. Cordons a node (marks it as unschedulable), creates 7 volumes/pods, and ensures that none gets scheduled on the cordoned node. |
Oops, something went wrong.