document running integration tests localy
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
9ca3b9ae5f
commit
485339ee7f
|
@ -62,14 +62,16 @@ cd bats-core
|
||||||
sudo ./install.sh /usr/local
|
sudo ./install.sh /usr/local
|
||||||
```
|
```
|
||||||
|
|
||||||
### Run tests
|
### Setup Test Server
|
||||||
|
|
||||||
Then you can run the integration test suite with the following.
|
For many tests an actual server is needed, where apps can be deployed. You can
|
||||||
|
either use a local one or a remote test server.
|
||||||
|
|
||||||
|
#### With remote test server
|
||||||
|
|
||||||
```
|
```
|
||||||
export ABRA_TEST_DOMAIN="test.example.com"
|
export ABRA_TEST_DOMAIN="test.example.com"
|
||||||
export ABRA_DIR="$HOME/.abra_test"
|
export ABRA_DIR="$HOME/.abra_test"
|
||||||
bats -Tp tests/integration # DO NOT run this just yet, read below...
|
|
||||||
```
|
```
|
||||||
|
|
||||||
`ABRA_TEST_DOMAIN` should also have a DNS A record for `*.test.example.com`
|
`ABRA_TEST_DOMAIN` should also have a DNS A record for `*.test.example.com`
|
||||||
|
@ -81,6 +83,32 @@ Traefik for you. Then you'll have more stable results.
|
||||||
You probably don't want to run the entire test suite though, it takes a while.
|
You probably don't want to run the entire test suite though, it takes a while.
|
||||||
Try the following for starters.
|
Try the following for starters.
|
||||||
|
|
||||||
|
#### With local swarm
|
||||||
|
|
||||||
|
When running the test suite localy you need a running docker swarm setup:
|
||||||
|
|
||||||
|
```
|
||||||
|
docker swarm init
|
||||||
|
docker network create -d overlay proxy
|
||||||
|
```
|
||||||
|
|
||||||
|
To use the local swarm set the foloowing env var:
|
||||||
|
|
||||||
|
```
|
||||||
|
export TEST_SERVER=default
|
||||||
|
export ABRA_DIR="$HOME/.abra_test"
|
||||||
|
```
|
||||||
|
|
||||||
|
### Run tests
|
||||||
|
|
||||||
|
Now you can run the whole test suite:
|
||||||
|
|
||||||
|
```
|
||||||
|
bats -Tp tests/integration
|
||||||
|
```
|
||||||
|
|
||||||
|
Or you can run a single test file:
|
||||||
|
|
||||||
```
|
```
|
||||||
bats -Tp tests/integration/autocomplete.bats
|
bats -Tp tests/integration/autocomplete.bats
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in New Issue