Move integration testing doc from the readme.md to the website

pull/7779/head
Prasad Katti 2020-04-18 20:29:40 -07:00
parent af98f75029
commit dc526455f0
2 changed files with 32 additions and 31 deletions

View File

@ -16,8 +16,9 @@ make test
### Integration Tests
Integration tests are currently run manually.
To run them, build the binary and run the tests:
#### The basics
From the minikube root directory, build the binary and run the tests:
```shell
make integration
@ -29,6 +30,34 @@ You may find it useful to set various options to test only a particular test aga
env TEST_ARGS="-minikube-start-args=--driver=hyperkit -test.run TestStartStop" make integration
```
#### Quickly iterating on a single test
Run a single test on an active cluster:
```shell
make integration -e TEST_ARGS="-test.run TestFunctional/parallel/MountCmd --profile=minikube --cleanup=false"
```
WARNING: For this to work repeatedly, the test must be written so that it cleans up after itself.
The `--cleanup=false` test arg ensures that the cluster will not be deleted after the test is run.
See [main.go](https://github.com/kubernetes/minikube/blob/master/test/integration/main.go) for details.
#### Disabling parallelism
```shell
make integration -e TEST_ARGS="-test.parallel=1"
```
#### Testing philosophy
- Tests should be so simple as to be correct by inspection
- Readers should need to read only the test body to understand the test
- Top-to-bottom readability is more important than code de-duplication
Tests are typically read with a great air of skepticism, because chances are they are being read only when things are broken.
### Conformance Tests
These are Kubernetes tests that run against an arbitrary cluster and exercise a wide range of Kubernetes features.

View File

@ -1,29 +1 @@
# Integration tests
## The basics
To run all tests from the minikube root directory:
`make integration`
## Quickly iterating on a single test
Run a single test on an active cluster:
`make integration -e TEST_ARGS="-test.run TestFunctional/parallel/MountCmd --profile=minikube --cleanup=false"`
WARNING: For this to work repeatedly, the test must be written so that it cleans up after itself.
See `main.go` for details.
## Disabling parallelism
`make integration -e TEST_ARGS="-test.parallel=1"`
## Testing philosophy
- Tests should be so simple as to be correct by inspection
- Readers should need to read only the test body to understand the test
- Top-to-bottom readability is more important than code de-duplication
Tests are typically read with a great air of skepticism, because chances are they are being read only when things are broken.
This document has moved to https://minikube.sigs.k8s.io/docs/contrib/testing/#integration-tests