Skip to content

Commit 4919b58

Browse files
Merge pull request #269 from 1Password/vzt/update-testing-docs
Update testing docs to include testing commands
2 parents 0754683 + 25f951e commit 4919b58

File tree

1 file changed

+14
-20
lines changed

1 file changed

+14
-20
lines changed

docs/testing/testing.md

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -19,23 +19,17 @@ These tests verify the internal logic of the provider without requiring a live 1
1919
**Where**: `test/e2e/...`
2020
**Add files in**: `*_test.go` files in `test/e2e/`
2121
**Framework**: [Terraform Plugin Testing](https://github.com/hashicorp/terraform-plugin-testing)
22-
23-
These tests create, read, update, and delete actual resources in a 1Password vault to verify the provider's behavior. The test suite covers.
24-
25-
**Local prep**:
26-
27-
1. Ensure you have a 1Password account with a service account token
28-
2. Create or use an existing test vault in your 1Password account
29-
3. Set required environment variables:
30-
```bash
31-
export OP_SERVICE_ACCOUNT_TOKEN=<your-service-account-token>
32-
```
33-
4. Optional environment variables for debugging:
34-
```bash
35-
export TF_LOG=INFO # Set Terraform logging level
36-
export TF_LOG_PATH=./e2e.log # Path to log file
37-
```
38-
5. Run the tests:
39-
```bash
40-
make test-e2e
41-
```
22+
**Run**: `make test-e2e`
23+
24+
## Setup to run e2e tests locally
25+
1. Set `OP_CONNECT_TOKEN`, `OP_CONNECT_HOST` and `OP_SERVICE_ACCOUNT_TOKEN` env variables.
26+
- Optionally can set `TF_LOG` and `TF_LOG_PATH` for debugging.
27+
2. `make test-e2e` to run e2e tests.
28+
29+
Other supported commands:
30+
- `make test-e2e-service-account` - to run e2e tests using a service account only.
31+
- set `OP_SERVICE_ACCOUNT_TOKEN` env variable before run.
32+
- `make test-e2e-connect` - to run e2e tests using Connect only.
33+
- set `OP_CONNECT_TOKEN`, `OP_CONNECT_HOST` env variables before run.
34+
- `make test-e2e-account` - to run e2e test using desktop app authentication only.
35+
- set `OP_ACCOUNT` and `OP_TEST_VAULT_NAME` env variables before run.

0 commit comments

Comments
 (0)