Skip to content

Commit

Permalink
refactor: migrate to /v2 path
Browse files Browse the repository at this point in the history
  • Loading branch information
mefellows committed Jun 7, 2021
1 parent c2b16eb commit 56c9e0a
Show file tree
Hide file tree
Showing 1,671 changed files with 422,537 additions and 175,358 deletions.
4 changes: 1 addition & 3 deletions .github/issue_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ TBC

## Steps to reproduce

Provide a repository, gist or reproducable code snippet so that we can test the problem.

Consider forking the project and modifying the [E2E test](https://github.com/pact-foundation/pact-go/blob/master/dsl/pact_integration_test.go)
Provide a repository, gist or reproducable code snippet so that we can test the problem. You may also want to adapt one of the examples in the repository to demonstrate the problem.

## Relevent log files

Expand Down
118 changes: 0 additions & 118 deletions Gopkg.lock

This file was deleted.

50 changes: 0 additions & 50 deletions Gopkg.toml

This file was deleted.

17 changes: 9 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@ clean:

deps:
@echo "--- 🐿 Fetching build dependencies "
go get github.com/axw/gocov/gocov
go get github.com/mattn/goveralls
go get golang.org/x/tools/cmd/cover
go get github.com/modocache/gover
go get github.com/mitchellh/gox
go get -a
cd /tmp; \
go get github.com/axw/gocov/gocov; \
go get github.com/mattn/goveralls; \
go get golang.org/x/tools/cmd/cover; \
go get github.com/modocache/gover; \
go get github.com/mitchellh/gox; \
cd -

goveralls:
goveralls -service="travis-ci" -coverprofile=coverage.txt -repotoken $(COVERALLS_TOKEN)
Expand All @@ -41,8 +42,8 @@ install: bin
pact: clean install #docker
@echo "--- 🔨 Running Pact examples"
mkdir -p ./examples/v3/pacts
go test -v -tags=consumer -count=1 github.com/pact-foundation/pact-go/examples/...
go test -v -timeout=10s -tags=provider -count=1 github.com/pact-foundation/pact-go/examples/...
go test -v -tags=consumer -count=1 github.com/pact-foundation/pact-go/v2/examples/...
go test -v -timeout=10s -tags=provider -count=1 github.com/pact-foundation/pact-go/v2/examples/...

release:
echo "--- 🚀 Releasing it"
Expand Down
2 changes: 1 addition & 1 deletion command/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"log"
"os"

"github.com/pact-foundation/pact-go/installer"
"github.com/pact-foundation/pact-go/v2/installer"

"github.com/spf13/cobra"
)
Expand Down
8 changes: 4 additions & 4 deletions consumer/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ import (
"path/filepath"
"time"

native "github.com/pact-foundation/pact-go/internal/native/mockserver"
logging "github.com/pact-foundation/pact-go/log"
"github.com/pact-foundation/pact-go/models"
"github.com/pact-foundation/pact-go/utils"
native "github.com/pact-foundation/pact-go/v2/internal/native/mockserver"
logging "github.com/pact-foundation/pact-go/v2/log"
"github.com/pact-foundation/pact-go/v2/models"
"github.com/pact-foundation/pact-go/v2/utils"
)

func init() {
Expand Down
2 changes: 1 addition & 1 deletion consumer/http_v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package consumer
import (
"log"

"github.com/pact-foundation/pact-go/models"
"github.com/pact-foundation/pact-go/v2/models"
)

// HTTPMockProviderV2 is the entrypoint for V3 http consumer tests
Expand Down
2 changes: 1 addition & 1 deletion consumer/http_v3.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package consumer
import (
"log"

"github.com/pact-foundation/pact-go/models"
"github.com/pact-foundation/pact-go/v2/models"
)

// HTTPMockProviderV3 is the entrypoint for V3 http consumer tests
Expand Down
8 changes: 4 additions & 4 deletions consumer/interaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (
"log"
"strings"

"github.com/pact-foundation/pact-go/internal/native/mockserver"
"github.com/pact-foundation/pact-go/matchers"
"github.com/pact-foundation/pact-go/models"
"github.com/pact-foundation/pact-go/utils"
"github.com/pact-foundation/pact-go/v2/internal/native/mockserver"
"github.com/pact-foundation/pact-go/v2/matchers"
"github.com/pact-foundation/pact-go/v2/models"
"github.com/pact-foundation/pact-go/v2/utils"
)

// Interaction is the main implementation of the Pact interface.
Expand Down
4 changes: 2 additions & 2 deletions consumer/interaction_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"errors"
"testing"

"github.com/pact-foundation/pact-go/matchers"
"github.com/pact-foundation/pact-go/models"
"github.com/pact-foundation/pact-go/v2/matchers"
"github.com/pact-foundation/pact-go/v2/models"
"github.com/stretchr/testify/assert"
)

Expand Down
2 changes: 1 addition & 1 deletion consumer/interaction_v3.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package consumer

import "github.com/pact-foundation/pact-go/models"
import "github.com/pact-foundation/pact-go/v2/models"

// InteractionV3 sets up an expected request/response on a mock server
// and is replayed on the provider side for verification
Expand Down
2 changes: 1 addition & 1 deletion doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ This example will result in a response body from the mock server that looks like
}
See the examples in the dsl package and the matcher tests
(https://github.com/pact-foundation/pact-go/blob/master/dsl/matcher_test.go)
(https://github.com/pact-foundation/pact-go/v2/blob/master/dsl/matcher_test.go)
for more matching examples.
NOTE: You will need to use valid Ruby regular expressions
Expand Down
4 changes: 2 additions & 2 deletions examples/consumer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
"strings"
"testing"

v3 "github.com/pact-foundation/pact-go/consumer"
. "github.com/pact-foundation/pact-go/sugar"
v3 "github.com/pact-foundation/pact-go/v2/consumer"
. "github.com/pact-foundation/pact-go/v2/sugar"
"github.com/stretchr/testify/assert"
)

Expand Down
30 changes: 0 additions & 30 deletions examples/customTls/certs/ca.key

This file was deleted.

22 changes: 0 additions & 22 deletions examples/customTls/certs/ca.pem

This file was deleted.

22 changes: 0 additions & 22 deletions examples/customTls/certs/server-cert.pem

This file was deleted.

Loading

0 comments on commit 56c9e0a

Please sign in to comment.