File tree Expand file tree Collapse file tree
core/scripts/cre/environment/environment Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11package environment
22
33import (
4+ "os"
45 "testing"
56
67 "github.com/Masterminds/semver/v3"
@@ -131,8 +132,13 @@ func TestResolveContractAddressAndVersion(t *testing.T) {
131132func TestToDockerHostRPC (t * testing.T ) {
132133 t .Parallel ()
133134
134- require .Equal (t , "http://host.docker.internal:8545" , toDockerHostRPC ("http://localhost:8545" ))
135- require .Equal (t , "http://host.docker.internal:8545" , toDockerHostRPC ("http://127.0.0.1:8545" ))
135+ expected := "http://host.docker.internal:8545"
136+ if os .Getenv ("CI" ) == "true" {
137+ expected = "http://172.17.0.1:8545"
138+ }
139+
140+ require .Equal (t , expected , toDockerHostRPC ("http://localhost:8545" ))
141+ require .Equal (t , expected , toDockerHostRPC ("http://127.0.0.1:8545" ))
136142}
137143
138144func newCobraCommand () * cobra.Command {
You can’t perform that action at this time.
0 commit comments