Skip to content

Commit 8f0cc1e

Browse files
committed
docs, remove docker CLI, name CL nodes consistently
1 parent 4764f4e commit 8f0cc1e

File tree

5 files changed

+14
-55
lines changed

5 files changed

+14
-55
lines changed

book/src/framework/getting_started.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,7 @@ Create an `.envrc` file and put common parameters there (you can use [direnv](ht
2323
```
2424
export CTF_LOG_LEVEL=info
2525
export CTF_LOKI_STREAM=true
26-
export LOKI_TENANT_ID=promtail
27-
export LOKI_URL=http://host.docker.internal:3030/loki/api/v1/push
2826
export TESTCONTAINERS_RYUK_DISABLED=true
29-
export RESTY_DEBUG=false
3027
3128
export CTF_CONFIGS=smoke.toml
3229
export PRIVATE_KEY="ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80"

book/src/framework/overview.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
## Chainlink Testing Framework Harness
1+
## Framework
22

3-
This module includes the CTFv2 harness, a lightweight, modular, and data-driven framework designed for combining off-chain and on-chain components while implementing best practices for end-to-end system-level testing:
3+
The Framework module a lightweight, modular, and data-driven framework designed for combining off-chain and on-chain components while implementing best practices for end-to-end system-level testing:
44

5-
- **Non-nil configuration**: All test variables must have defaults, automatic validation.
6-
- **Component isolation**: Components are decoupled via input/output structs, without exposing internal details.
75
- **Modular configuration**: No arcane knowledge of framework settings is required; the config is simply a reflection of the components being used in the test. Components declare their own configuration—'what you see is what you get.'
6+
- **Component isolation**: Components are decoupled via input/output structs, without exposing internal details.
87
- **Replaceability and extensibility**: Since components are decoupled via outputs, any deployment component can be swapped with a real service without altering the test code.
9-
- **Caching**: any component can use cached configs to skip environment setup for faster test development
10-
- **Integrated observability stack**: use `ctf obs up` to spin up a local observability stack.
8+
- **Caching**: any component can use cached configs to skip setup for faster test development.
9+
- **Integrated observability stack**: get all the info you need to develop end-to-end tests: metrics, logs, traces, profiles.
1110

book/src/overview.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
# Intro
22

33

4-
The Chainlink Testing Framework (CTF) is a blockchain development framework written in Go. Its primary purpose is to help chainlink developers create extensive integration, e2e, performance, and chaos tests to ensure the stability of the chainlink project. It can also be helpful to those who just want to use chainlink oracles in their projects to help test their contracts, or even for those that aren't using chainlink.
4+
The Chainlink Testing Framework (CTF) is a blockchain development framework written in Go.
5+
Its primary purpose is to help chainlink developers create extensive integration, e2e, performance, and chaos tests to ensure the stability of the chainlink project.
6+
It can also be helpful to those who just want to use chainlink oracles in their projects to help test their contracts, or even for those that aren't using chainlink.
7+
8+
[Repository](https://github.com/smartcontractkit/chainlink-testing-framework) contains two major pieces:
9+
- [Framework](framework/overview.md)
10+
- [Libraries](libraries.md)

framework/cmd/main.go

Lines changed: 1 addition & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package main
22

33
import (
44
"embed"
5-
"errors"
65
"fmt"
76
"github.com/pelletier/go-toml"
87
"github.com/rs/zerolog"
@@ -53,7 +52,7 @@ func main() {
5352
Usage: "Control docker containers marked with 'framework=ctf' label",
5453
Subcommands: []*cli.Command{
5554
{
56-
Name: "clean",
55+
Name: "remove",
5756
Aliases: []string{"rm"},
5857
Usage: "Remove Docker containers and networks with 'framework=ctf' label",
5958
Action: func(c *cli.Context) error {
@@ -64,48 +63,6 @@ func main() {
6463
return nil
6564
},
6665
},
67-
{
68-
Name: "build",
69-
Aliases: []string{"c"},
70-
Flags: []cli.Flag{
71-
&cli.StringFlag{
72-
Name: "dockerfile",
73-
Aliases: []string{"f"},
74-
Usage: "Path to the Dockerfile",
75-
},
76-
&cli.StringFlag{
77-
Name: "context",
78-
Aliases: []string{"c"},
79-
Usage: "Build context for the Docker image",
80-
},
81-
&cli.StringFlag{
82-
Name: "image_name",
83-
Aliases: []string{"n"},
84-
Usage: "Image name",
85-
},
86-
},
87-
Usage: "Builds you image and pushes it to a local registry",
88-
UsageText: `
89-
Builds your image and pushes it to a local registry.
90-
If you don't have a registry spins it up, default registry is localhost:5050.
91-
It always build with one tag - "latest" and it is useful if you'd like to quickly rebuild some images
92-
93-
Example command for Chainlink image (e2e/capabilities dir):
94-
ctf docker build -f ../../core/chainlink.Dockerfile -c ../.. -n chainlink
95-
96-
You can reference this image in config as:
97-
localhost:5050/chainlink:latest`,
98-
99-
Action: func(c *cli.Context) error {
100-
dockerfile := c.String("dockerfile")
101-
buildContext := c.String("context")
102-
imgName := c.String("image_name")
103-
if dockerfile == "" || buildContext == "" || imgName == "" {
104-
return errors.New(`dockerfile, build context and image name must be provided\nex.: -f ./core/chainlink.Dockerfile -c . -n chainlink`)
105-
}
106-
return BuildDocker(dockerfile, buildContext, imgName)
107-
},
108-
},
10966
},
11067
},
11168
{

framework/components/clnode/clnode.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ func newNode(in *Input, pgOut *postgres.Output) (*NodeOut, error) {
147147
if in.Node.Name != "" {
148148
containerName = in.Node.Name
149149
} else {
150-
containerName = framework.DefaultTCName("clnode")
150+
containerName = framework.DefaultTCName("node")
151151
}
152152

153153
req := tc.ContainerRequest{

0 commit comments

Comments
 (0)