Skip to content

Commit

Permalink
Merge pull request #49 from form3tech-oss/jk-bump-deps
Browse files Browse the repository at this point in the history
Bump go to 1.22 & all deps
  • Loading branch information
joshkeegan-form3 authored Apr 5, 2024
2 parents 31d0387 + 57bfe91 commit 5e36fe5
Show file tree
Hide file tree
Showing 447 changed files with 28,995 additions and 8,868 deletions.
2 changes: 1 addition & 1 deletion build/package/pact-proxy/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.18-alpine AS build-env
FROM golang:1.22-alpine AS build-env

ARG APPNAME
ENV GO111MODULE=auto
Expand Down
32 changes: 16 additions & 16 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
module github.com/form3tech-oss/pact-proxy

go 1.18
go 1.22

require (
github.com/PaesslerAG/jsonpath v0.1.1
github.com/avast/retry-go/v4 v4.3.1
github.com/labstack/echo/v4 v4.9.1
github.com/pact-foundation/pact-go v1.7.0
github.com/avast/retry-go/v4 v4.5.1
github.com/labstack/echo/v4 v4.11.4
github.com/pact-foundation/pact-go v1.8.0
github.com/pkg/errors v0.9.1
github.com/sethvargo/go-envconfig v0.8.2
github.com/sirupsen/logrus v1.9.0
github.com/stretchr/testify v1.8.1
github.com/sethvargo/go-envconfig v1.0.1
github.com/sirupsen/logrus v1.9.3
github.com/stretchr/testify v1.9.0
github.com/tidwall/sjson v1.2.5
)

require (
github.com/PaesslerAG/gval v1.2.1 // indirect
github.com/PaesslerAG/gval v1.2.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/golang-jwt/jwt v3.2.2+incompatible // indirect
github.com/hashicorp/go-version v1.6.0 // indirect
github.com/hashicorp/logutils v1.0.0 // indirect
github.com/labstack/gommon v0.4.0 // indirect
github.com/labstack/gommon v0.4.2 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.16 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/shopspring/decimal v1.3.1 // indirect
github.com/tidwall/gjson v1.14.4 // indirect
github.com/tidwall/gjson v1.17.1 // indirect
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.1 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasttemplate v1.2.2 // indirect
golang.org/x/crypto v0.3.0 // indirect
golang.org/x/net v0.2.0 // indirect
golang.org/x/sys v0.2.0 // indirect
golang.org/x/text v0.4.0 // indirect
golang.org/x/time v0.0.0-20201208040808-7e3f01d25324 // indirect
golang.org/x/crypto v0.22.0 // indirect
golang.org/x/net v0.24.0 // indirect
golang.org/x/sys v0.19.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.5.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
317 changes: 47 additions & 270 deletions go.sum

Large diffs are not rendered by default.

8 changes: 6 additions & 2 deletions internal/app/configuration/proxyconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,20 @@ import (
"context"
"net/url"

"github.com/form3tech-oss/pact-proxy/internal/app/pactproxy"
"github.com/pkg/errors"
"github.com/sethvargo/go-envconfig"

"github.com/form3tech-oss/pact-proxy/internal/app/pactproxy"
)

func NewFromEnv() (pactproxy.Config, error) {
ctx := context.Background()

var config pactproxy.Config
err := envconfig.Process(ctx, &config)
err := envconfig.ProcessWith(ctx, &envconfig.Config{
Target: &config,
DefaultNoInit: true,
})
if err != nil {
return config, errors.Wrap(err, "process env config")
}
Expand Down
13 changes: 12 additions & 1 deletion internal/app/configuration/proxyconfig_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ import (
"testing"
"time"

"github.com/form3tech-oss/pact-proxy/internal/app/pactproxy"
"github.com/pact-foundation/pact-go/utils"
"github.com/stretchr/testify/require"

"github.com/form3tech-oss/pact-proxy/internal/app/pactproxy"
)

const (
Expand Down Expand Up @@ -183,6 +184,16 @@ func TestConfigureProxy_MTLS(t *testing.T) {
}
}

// When no server address env var is specified, config.ServerAddress should be the zero value.
// This is used during ConfigureProxy logic, but is no longer the default behaviour of envconfig.Process due to url.URL
// containing a pointer.
func TestProxyConfig_NewFromEnv_EmptyServerAddress(t *testing.T) {
os.Clearenv()
config, err := NewFromEnv()
require.NoError(t, err)
require.Equal(t, url.URL{}, config.ServerAddress)
}

func TestProxyConfig_ForwardUnrecognisedRequests(t *testing.T) {
os.Clearenv()
config, err := NewFromEnv()
Expand Down
2 changes: 1 addition & 1 deletion vendor/github.com/PaesslerAG/gval/evaluable.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions vendor/github.com/PaesslerAG/gval/language.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/github.com/PaesslerAG/gval/parse.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/github.com/PaesslerAG/gval/parser.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

82 changes: 73 additions & 9 deletions vendor/github.com/avast/retry-go/v4/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/github.com/avast/retry-go/v4/VERSION

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

54 changes: 38 additions & 16 deletions vendor/github.com/avast/retry-go/v4/options.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 5e36fe5

Please sign in to comment.