Skip to content

Commit b518d24

Browse files
committed
add documentation
1 parent ac76827 commit b518d24

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

TESTING.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,16 @@ Running a single test:
6262
```sh
6363
TF_UPDATE_CASSETTES=true TF_LOG=DEBUG SCW_DEBUG=1 TF_ACC=1 go test ./scaleway -v -run=TestAccScalewayDataSourceRDBInstance_Basic -timeout=120m -parallel=10
6464
```
65+
66+
## Compressing the cassettes
67+
68+
We record interactions with the Scaleway API in cassettes, which are stored in the `testdata` directory of each service.
69+
Each wait function used in the resources will perform several requests to the API for pulling a resource state, which can lead to large cassettes.
70+
We use a compressor to reduce the size of these cassettes once they are recorded.
71+
By doing so, tests can run faster and the cassettes are easier to read.
72+
73+
To use the compressor on a given cassette, run the following command:
74+
75+
```sh
76+
go run -v ./cmd/vcr-compressor internal/services/rdb/testdata/acl-basic.cassette
77+
```

0 commit comments

Comments
 (0)