More integration test script updates
- Don't need to `cd test` anymore before running the integration tests because it's not a separate Go module anymore
This commit is contained in:
parent
63f9db72e8
commit
f685cd228f
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Contributions to Pinniped are welcome. Here are some things to help you get started.
|
Contributions to Pinniped are welcome. Here are some things to help you get started.
|
||||||
|
|
||||||
1. Please see the [Code of Conduct](code-of-conduct.md).
|
1. Please see the [Code of Conduct](code_of_conduct.md).
|
||||||
1. Learn about the [scope](scope.md) of the project.
|
1. Learn about the [scope](scope.md) of the project.
|
||||||
1. Coming soon: details about how to legally contribute to the project, including CLA/DCO details.
|
1. Coming soon: details about how to legally contribute to the project, including CLA/DCO details.
|
||||||
1. See below for how to [file a bug report](#bugs).
|
1. See below for how to [file a bug report](#bugs).
|
||||||
@ -37,8 +37,7 @@ guidelines in the issue and pull request templates.
|
|||||||
## Building
|
## Building
|
||||||
|
|
||||||
The [Dockerfile](../Dockerfile) at the root of the repo can be used to build and
|
The [Dockerfile](../Dockerfile) at the root of the repo can be used to build and
|
||||||
package the `pinniped-server` code. After making a change to the code,
|
package the code. After making a change to the code, rebuild the docker image with the following command.
|
||||||
rebuild the docker image with the following command.
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# From the root directory of the repo...
|
# From the root directory of the repo...
|
||||||
@ -56,20 +55,17 @@ docker build .
|
|||||||
### Running Unit Tests
|
### Running Unit Tests
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./hack/module.sh unittest
|
./hack/module.sh units
|
||||||
```
|
```
|
||||||
|
|
||||||
### Running Integration Tests
|
### Running Integration Tests
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./hack/prepare-for-integration-tests.sh
|
./hack/prepare-for-integration-tests.sh && source /tmp/integration-test-env && go test -v -count 1 ./test/...
|
||||||
source /tmp/integration-test-env
|
|
||||||
(cd test && go test -count 1 ./...)
|
|
||||||
```
|
```
|
||||||
|
|
||||||
The `./hack/prepare-for-integration-tests.sh` script will create a local
|
The `./hack/prepare-for-integration-tests.sh` script will create a local
|
||||||
[`kind`](https://kind.sigs.k8s.io/) cluster on which the integration tests will
|
[`kind`](https://kind.sigs.k8s.io/) cluster on which the integration tests will run.
|
||||||
be run.
|
|
||||||
|
|
||||||
### Pre-commit Hooks
|
### Pre-commit Hooks
|
||||||
|
|
||||||
|
@ -201,7 +201,7 @@ kind_capabilities_file="$pinniped_path/test/cluster_capabilities/kind.yaml"
|
|||||||
pinniped_cluster_capability_file_content=$(cat "$kind_capabilities_file")
|
pinniped_cluster_capability_file_content=$(cat "$kind_capabilities_file")
|
||||||
|
|
||||||
cat <<EOF >/tmp/integration-test-env
|
cat <<EOF >/tmp/integration-test-env
|
||||||
# The following env vars should be set before running 'cd test && go test ./...'
|
# The following env vars should be set before running 'go test -v -count 1 ./test/...'
|
||||||
export PINNIPED_NAMESPACE=${namespace}
|
export PINNIPED_NAMESPACE=${namespace}
|
||||||
export PINNIPED_APP_NAME=${app_name}
|
export PINNIPED_APP_NAME=${app_name}
|
||||||
export PINNIPED_TEST_USER_USERNAME=${test_username}
|
export PINNIPED_TEST_USER_USERNAME=${test_username}
|
||||||
|
Loading…
Reference in New Issue
Block a user