Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add zone volume creation integration tests #359

Merged
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ unit-test:

# Linux only; populate env.sh with the hardware parameters
integration-test:
( cd test/integration; sh run.sh )
( cd test/integration; sh run.sh TestIntegration )

check:
@scripts/check.sh ./provider/ ./service/
Expand Down
23 changes: 23 additions & 0 deletions test/Makefile
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
24 changes: 24 additions & 0 deletions test/e2e/README.md
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.
Loading
Loading