File tree Expand file tree Collapse file tree 3 files changed +20
-3
lines changed
Expand file tree Collapse file tree 3 files changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ linters-settings:
2424 exhaustive :
2525 default-signifies-exhaustive : true
2626 goimports :
27- local-prefixes : github.com/smartcontractkit/chainlink-testing-framework/lib
27+ local-prefixes : github.com/smartcontractkit/chainlink-testing-framework/
2828 gosec :
2929 exclude-generated : true
3030 govet :
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ import (
1818 "github.com/smartcontractkit/chainlink-testing-framework/parrot"
1919)
2020
21- const defaultParrotImage = "kalverra/parrot:v0.4.5 "
21+ const defaultParrotImage = "kalverra/parrot:v0.5.0 "
2222
2323// Parrot is a test environment component that wraps a Parrot server.
2424type Parrot struct {
Original file line number Diff line number Diff line change 11package test_env
22
33import (
4+ "net/http"
45 "testing"
56
7+ "github.com/stretchr/testify/require"
8+
69 "github.com/smartcontractkit/chainlink-testing-framework/lib/docker"
710 "github.com/smartcontractkit/chainlink-testing-framework/lib/logging"
8- "github.com/stretchr/testify/require "
11+ "github.com/smartcontractkit/chainlink-testing-framework/parrot "
912)
1013
1114func TestParrot (t * testing.T ) {
@@ -18,4 +21,18 @@ func TestParrot(t *testing.T) {
1821 p := NewParrot ([]string {network .Name }).WithTestInstance (t )
1922 err = p .StartContainer ()
2023 require .NoError (t , err )
24+
25+ route := & parrot.Route {
26+ Method : http .MethodGet ,
27+ Path : "/test" ,
28+ RawResponseBody : "Squawk" ,
29+ ResponseStatusCode : http .StatusOK ,
30+ }
31+ err = p .Client .RegisterRoute (route )
32+ require .NoError (t , err , "failed to register route" )
33+
34+ resp , err := p .Client .CallRoute (route .Method , route .Path )
35+ require .NoError (t , err , "failed to call route" )
36+ require .Equal (t , http .StatusOK , resp .StatusCode ())
37+ require .Equal (t , "Squawk" , string (resp .Body ()))
2138}
You can’t perform that action at this time.
0 commit comments