Skip to content

Commit 2965757

Browse files
authored
Merge branch 'main' into havocDocs
2 parents b8d3294 + 65ca88e commit 2965757

35 files changed

+245
-194
lines changed

.github/workflows/framework-golden-tests.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,16 @@ jobs:
2222
config: smoke.toml
2323
count: 1
2424
timeout: 10m
25-
- name: TestLoad
26-
config: load.toml
25+
- name: TestPerformanceBaseline
26+
config: performance_baseline.toml
2727
count: 1
2828
timeout: 10m
2929
- name: TestChaos
3030
config: chaos.toml
3131
count: 1
3232
timeout: 10m
33-
- name: TestUpgradeAll
34-
config: upgrade_all.toml
35-
count: 1
36-
timeout: 10m
37-
- name: TestUpgradeSome
38-
config: upgrade_some.toml
33+
- name: TestUpgrade
34+
config: upgrade.toml
3935
count: 1
4036
timeout: 10m
4137
steps:

.github/workflows/modgraph.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Module graph
2+
on:
3+
pull_request:
4+
jobs:
5+
modgraph:
6+
runs-on: ubuntu-latest
7+
name: modgraph
8+
steps:
9+
- name: Checkout the Repo
10+
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
11+
- name: Setup Go
12+
uses: actions/setup-go@v5
13+
- run: make modgraph
14+
- name: Ensure clean modgraph
15+
run: git diff --minimal --exit-code

CONTRIBUTING.md

Lines changed: 0 additions & 30 deletions
This file was deleted.

Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.PHONY: modgraph
2+
modgraph:
3+
go install github.com/jmank88/[email protected]
4+
go install github.com/jmank88/[email protected]
5+
./modgraph > go.md

book/src/SUMMARY.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
- [Configuration](./framework/configuration.md)
1616
- [Test Configuration](./framework/test_configuration_overrides.md)
1717
- [Components Persistence](framework/components/state.md)
18+
- [Components Cleanup](framework/components/cleanup.md)
1819
- [Components Caching](framework/components/caching.md)
1920
- [External Environment](framework/components/external.md)
2021
- [Secrets]()
21-
- [Docker](framework/docker.md)
2222
- [Observability Stack](framework/observability/observability_stack.md)
2323
- [Metrics](framework/observability/metrics.md)
2424
- [Logs](framework/observability/logs.md)
@@ -39,7 +39,7 @@
3939
- [Chainlink]()
4040
- [RPC]()
4141
- [Loki]()
42-
- [Testing](framework/testing.md)
42+
- [Testing Maturity Model](framework/testing.md)
4343
- [Smoke]()
4444
- [Performance]()
4545
- [Chaos]()
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Components Cleanup
2+
3+
Managing state is challenging, especially in end-to-end testing, we use [ryuk](https://golang.testcontainers.org/features/garbage_collector/#ryuk) and following simple rules:
4+
- If `TESTCONTAINERS_RYUK_DISABLED=true`, no cleanup occurs — containers, volumes, and networks remain on your machine.
5+
6+
Feel free to use `ctf d rm` to remove containers when you are ready.
7+
- If `TESTCONTAINERS_RYUK_DISABLED` is unset, the test environment will be automatically cleaned up a few seconds after the test completes.
8+
9+
10+
Keep in mind that all components are mapped to [static ports](state.md), so without cleanup, only one environment can run at a time.
11+
12+
This design choice simplifies debugging.
13+
14+
A simplified command is available to prune unused volumes, containers, and build caches. Use it when you’re running low on space on your machine.
15+
```
16+
ctf d c
17+
```
18+
19+
<div class="warning">
20+
21+
The framework manages cleanup for both on-chain and off-chain Docker components. However, if your test involves actions like configuring Chainlink jobs, it's best practice to make these actions idempotent, so they can be applied reliably in any environment.
22+
23+
</div>

book/src/framework/docker.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

book/src/framework/first_test.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Run the test
4646
CTF_CONFIGS=smoke.toml go test -v -run TestMe
4747
```
4848

49-
Remove containers
49+
Remove containers (read more about cleanup [here](components/cleanup.md))
5050
```
5151
ctf d rm
5252
```

book/src/framework/getting_started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Allow it to run in `System Settings -> Security Settings` (OS X)
3737
![img.png](images/img.png)
3838

3939

40-
Create an `.envrc` file and do `source .envrc`
40+
Create an `.envrc` file and do `source .envrc` (we recommend to use [direnv](https://direnv.net/), so you don't need to load it every time)
4141
```
4242
export TESTCONTAINERS_RYUK_DISABLED=true # do not remove containers while we develop locally
4343
```

book/src/framework/testing.md

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,21 @@
1-
# "Golden" Templates
1+
# Testing Maturity Model
22

33
[Here](https://github.com/smartcontractkit/chainlink-testing-framework/actions/runs/11739154666/job/32703095118?pr=1311) are our "golden" templates for end-to-end tests, covering every test type:
44

55
- `Smoke`
6-
- `Performance`
6+
- `PerformanceBaseline`
77
- `Chaos`
88
- `Upgrade`
99

1010
These tests act as a maturity model and are implemented across all our products.
1111

12-
Run them locally:
12+
Refer to this README to understand the rationale behind our testing approach and to explore the stages of maturity in end-to-end testing.
13+
14+
## Developing
15+
Run the tests locally
1316
```
1417
CTF_CONFIGS=smoke.toml go test -v -run TestSmoke
15-
CTF_CONFIGS=load.toml go test -v -run TestLoad
18+
CTF_CONFIGS=performance_baseline.toml go test -v -run TestPerformanceBaseline
1619
CTF_CONFIGS=chaos.toml go test -v -run TestChaos
17-
CTF_CONFIGS=upgrade_some.toml go test -v -run TestUpgradeSome
20+
CTF_CONFIGS=upgrade.toml go test -v -run TestUpgrade
1821
```
19-
20-
Use this [workflow](https://github.com/smartcontractkit/chainlink-testing-framework/actions/runs/11739154666/workflow?pr=1311) as a starting point for developing a new end-to-end integration test.
21-
22-
Set the count to 5-10 during development, and once stable, set the timeout and proceed to merge.
23-
24-
If you need to structure a lot of different tests (not only end-to-end) follow [this](https://github.com/smartcontractkit/.github/tree/main/.github/workflows) guide.

0 commit comments

Comments
 (0)