Skip to content

Commit

Permalink
chore: update test path to not conflict with docker
Browse files Browse the repository at this point in the history
  • Loading branch information
mefellows committed Mar 14, 2021
1 parent 5c95dc0 commit 45423e2
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions examples/v3/provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,24 @@ func TestV3HTTPProvider(t *testing.T) {

// Verify the Provider with local Pact Files
err := verifier.VerifyProvider(t, v3.VerifyRequest{
ProviderBaseURL: "http://localhost:8000",
ProviderBaseURL: "http://localhost:8111",
PactFiles: []string{filepath.ToSlash(fmt.Sprintf("%s/V3Consumer-V3Provider.json", pactDir))},
RequestFilter: f,
BeforeEach: func() error {
log.Println("[DEBUG] HOOK before each")
return nil
},
AfterEach: func() error {
log.Println("[DEBUG] HOOK after each")
return nil
},
StateHandlers: v3.StateHandlers{
"User foo exists": func(setup bool, s v3.ProviderStateV3) (v3.ProviderStateV3Response, error) {

if setup {
log.Println("[DEBUG] calling user foo exists state handler", s)
log.Println("[DEBUG] HOOK calling user foo exists state handler", s)
} else {
log.Println("[DEBUG] teardown the 'User foo exists' state")
log.Println("[DEBUG] HOOK teardown the 'User foo exists' state")
}

// ... do something
Expand Down Expand Up @@ -140,7 +148,7 @@ func startServer() {
)
})

log.Fatal(http.ListenAndServe("localhost:8000", mux))
log.Fatal(http.ListenAndServe("localhost:8111", mux))
}

type User struct {
Expand Down

0 comments on commit 45423e2

Please sign in to comment.