File tree Expand file tree Collapse file tree 4 files changed +13
-4
lines changed
framework/examples/myproject/fakes Expand file tree Collapse file tree 4 files changed +13
-4
lines changed Original file line number Diff line number Diff line change 2626 - [ Components Caching] ( framework/components/caching.md )
2727 - [ Components Resources] ( framework/components/resources.md )
2828 - [ Containers Network Isolation] ( framework/components/network_isolation.md )
29- - [ Mocking Services] ( framework/components/mocking.md )
29+ - [ Faking Services] ( framework/components/mocking.md )
3030 - [ Copying Files] ( framework/copying_files.md )
3131 - [ External Environment] ( framework/components/external.md )
3232 - [ Troubleshooting] ( framework/components/troubleshooting.md )
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ Use `framework.HostDockerInternal()` to reference `host.docker.internal` in your
2525
2626## Dockerized Usage
2727
28- Copy this example into your project, write the logic of fake, build and upload it and run.
28+ Copy this example into your project, write the logic of fake using ` fake.JSON ` and ` fake.Func ` , build and upload it and run.
2929
3030## Install
3131
@@ -62,6 +62,14 @@ task publish -- $tag
6262See full [ example] ( https://github.com/smartcontractkit/chainlink-testing-framework/blob/main/framework/examples/myproject/fake_docker_test.go )
6363
6464Run it
65+ ``` toml
66+ [fake ]
67+ # the image you've built
68+ image = " test-fakes:myproduct-1.0"
69+ # port for Gin server
70+ port = 9111
71+ ```
72+
6573```
6674CTF_CONFIGS=fake_docker.toml go test -v -run TestDockerFakes
6775```
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ replace github.com/smartcontractkit/chainlink-testing-framework/framework/compon
66
77require (
88 github.com/gin-gonic/gin v1.10.1
9+ github.com/rs/zerolog v1.33.0
910 github.com/smartcontractkit/chainlink-testing-framework/framework v0.9.9
1011)
1112
@@ -76,7 +77,6 @@ require (
7677 github.com/pkg/errors v0.9.1 // indirect
7778 github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
7879 github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
79- github.com/rs/zerolog v1.33.0 // indirect
8080 github.com/shirou/gopsutil/v4 v4.25.1 // indirect
8181 github.com/sirupsen/logrus v1.9.3 // indirect
8282 github.com/stretchr/testify v1.10.0 // indirect
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ package main
22
33import (
44 "github.com/gin-gonic/gin"
5+ "github.com/rs/zerolog/log"
56
67 "github.com/smartcontractkit/chainlink-testing-framework/framework/components/fake"
78)
@@ -17,7 +18,7 @@ func main() {
1718 })
1819 })
1920 if err != nil {
20- panic ( err )
21+ log . Fatal (). Err ( err ). Msg ( "failed to stark fake server API" )
2122 }
2223 select {}
2324}
You can’t perform that action at this time.
0 commit comments