diff --git a/examples/consumer/goconsumer/user_service_test.go b/examples/consumer/goconsumer/user_service_test.go index 249d066fc..e0f39686b 100644 --- a/examples/consumer/goconsumer/user_service_test.go +++ b/examples/consumer/goconsumer/user_service_test.go @@ -24,9 +24,7 @@ var pact dsl.Pact var form url.Values var rr http.ResponseWriter var req *http.Request - -// var name = "Jean-Marie de La Beaujardière😀😍" -var name = "billy" +var name = "Jean-Marie de La Beaujardière😀😍" var like = dsl.Like var eachLike = dsl.EachLike var term = dsl.Term @@ -79,7 +77,7 @@ func setup() { // Login form values form = url.Values{} - form.Add("username", "billy") + form.Add("username", name) form.Add("password", "issilly") // Create a request to pass to our handler. diff --git a/examples/gin/provider/user_service.go b/examples/gin/provider/user_service.go index c3a1340ec..2e5dc679b 100644 --- a/examples/gin/provider/user_service.go +++ b/examples/gin/provider/user_service.go @@ -15,9 +15,9 @@ type Login struct { var userRepository = &types.UserRepository{ Users: map[string]*types.User{ - "billy": &types.User{ - Name: "billy", - Username: "billy", + "Jean-Marie de La Beaujardière😀😍": &types.User{ + Name: "Jean-Marie de La Beaujardière😀😍", + Username: "Jean-Marie de La Beaujardière😀😍", Password: "issilly", Type: "admin", }, diff --git a/examples/gin/provider/user_service_test.go b/examples/gin/provider/user_service_test.go index c1b256841..3d956dcf7 100644 --- a/examples/gin/provider/user_service_test.go +++ b/examples/gin/provider/user_service_test.go @@ -14,7 +14,7 @@ import ( ) // The actual Provider test itself -func TestPact_Provider(t *testing.T) { +func TestPact_GinProvider(t *testing.T) { go startInstrumentedProvider() pact := createPact() @@ -69,14 +69,6 @@ func TestPact_Provider(t *testing.T) { } } -func assertExamples(t *testing.T, r types.ProviderVerifierResponse) { - for _, example := range r.Examples { - if example.Status != "passed" { - t.Errorf("%s\n%s\n", example.FullDescription, example.Exception.Message) - } - } -} - // Starts the provider API with hooks for provider states. // This essentially mirrors the main.go file, with extra routes added. func startInstrumentedProvider() { @@ -111,9 +103,9 @@ var port, _ = utils.GetFreePort() // Provider States data sets var billyExists = &examples.UserRepository{ Users: map[string]*examples.User{ - "billy": &examples.User{ - Name: "billy", - Username: "billy", + "Jean-Marie de La Beaujardière😀😍": &examples.User{ + Name: "Jean-Marie de La Beaujardière😀😍", + Username: "Jean-Marie de La Beaujardière😀😍", Password: "issilly", Type: "admin", }, @@ -124,9 +116,9 @@ var billyDoesNotExist = &examples.UserRepository{} var billyUnauthorized = &examples.UserRepository{ Users: map[string]*examples.User{ - "billy": &examples.User{ - Name: "billy", - Username: "billy", + "Jean-Marie de La Beaujardière😀😍": &examples.User{ + Name: "Jean-Marie de La Beaujardière😀😍", + Username: "Jean-Marie de La Beaujardière😀😍", Password: "issilly1", Type: "blocked", }, diff --git a/examples/go-kit/provider/user_service.go b/examples/go-kit/provider/user_service.go index 99e083137..16fa72b10 100644 --- a/examples/go-kit/provider/user_service.go +++ b/examples/go-kit/provider/user_service.go @@ -35,9 +35,9 @@ func NewInmemService() Service { return &userService{ userDatabase: &UserRepository{ users: map[string]*User{ - "billy": &User{ - Name: "billy", - username: "billy", + "Jean-Marie de La Beaujardière😀😍": &User{ + Name: "Jean-Marie de La Beaujardière😀😍", + username: "Jean-Marie de La Beaujardière😀😍", password: "issilly", Type: "admin", }, diff --git a/examples/go-kit/provider/user_service_test.go b/examples/go-kit/provider/user_service_test.go index 8061afa0e..cb2a282a2 100644 --- a/examples/go-kit/provider/user_service_test.go +++ b/examples/go-kit/provider/user_service_test.go @@ -29,9 +29,9 @@ var port, _ = utils.GetFreePort() // Provider States data sets var billyExists = &UserRepository{ users: map[string]*User{ - "billy": &User{ - Name: "billy", - username: "billy", + "Jean-Marie de La Beaujardière😀😍": &User{ + Name: "Jean-Marie de La Beaujardière😀😍", + username: "Jean-Marie de La Beaujardière😀😍", password: "issilly", Type: "admin", }, @@ -42,9 +42,9 @@ var billyDoesNotExist = &UserRepository{} var billyUnauthorized = &UserRepository{ users: map[string]*User{ - "billy": &User{ - Name: "billy", - username: "billy", + "Jean-Marie de La Beaujardière😀😍": &User{ + Name: "Jean-Marie de La Beaujardière😀😍", + username: "Jean-Marie de La Beaujardière😀😍", password: "issilly1", Type: "blocked", }, @@ -52,7 +52,7 @@ var billyUnauthorized = &UserRepository{ } // The actual Provider test itself -func TestPact_Provider(t *testing.T) { +func TestPact_GoKitProvider(t *testing.T) { go startInstrumentedProvider() pact := createPact() @@ -107,14 +107,6 @@ func TestPact_Provider(t *testing.T) { } } -func assertExamples(t *testing.T, r types.ProviderVerifierResponse) { - for _, example := range r.Examples { - if example.Status != "passed" { - t.Errorf("%s\n%s\n", example.FullDescription, example.Exception.Message) - } - } -} - // Setup the Pact client. func createPact() dsl.Pact { return dsl.Pact{ diff --git a/examples/mux/provider/user_service.go b/examples/mux/provider/user_service.go index 47b176bd1..f7e19a84e 100644 --- a/examples/mux/provider/user_service.go +++ b/examples/mux/provider/user_service.go @@ -11,8 +11,8 @@ import ( var userRepository = &types.UserRepository{ Users: map[string]*types.User{ "billy": &types.User{ - Name: "billy", - Username: "billy", + Name: "Jean-Marie de La Beaujardière😀😍", + Username: "Jean-Marie de La Beaujardière😀😍", Password: "issilly", }, }, diff --git a/examples/mux/provider/user_service_test.go b/examples/mux/provider/user_service_test.go index 1954071dd..18769bda3 100644 --- a/examples/mux/provider/user_service_test.go +++ b/examples/mux/provider/user_service_test.go @@ -18,7 +18,7 @@ import ( ) // The actual Provider test itself -func TestPact_Provider(t *testing.T) { +func TestPact_MuxProvider(t *testing.T) { go startInstrumentedProvider() pact := createPact() @@ -73,14 +73,6 @@ func TestPact_Provider(t *testing.T) { } } -func assertExamples(t *testing.T, r types.ProviderVerifierResponse) { - for _, example := range r.Examples { - if example.Status != "passed" { - t.Errorf("%s\n%s\n", example.FullDescription, example.Exception.Message) - } - } -} - // Starts the provider API with hooks for provider states. // This essentially mirrors the main.go file, with extra routes added. func startInstrumentedProvider() { @@ -137,9 +129,9 @@ var port, _ = utils.GetFreePort() // Provider States data sets var billyExists = &examples.UserRepository{ Users: map[string]*examples.User{ - "billy": &examples.User{ - Name: "billy", - Username: "billy", + "Jean-Marie de La Beaujardière😀😍": &examples.User{ + Name: "Jean-Marie de La Beaujardière😀😍", + Username: "Jean-Marie de La Beaujardière😀😍", Password: "issilly", Type: "admin", }, @@ -150,9 +142,9 @@ var billyDoesNotExist = &examples.UserRepository{} var billyUnauthorized = &examples.UserRepository{ Users: map[string]*examples.User{ - "billy": &examples.User{ - Name: "billy", - Username: "billy", + "Jean-Marie de La Beaujardière😀😍": &examples.User{ + Name: "Jean-Marie de La Beaujardière😀😍", + Username: "Jean-Marie de La Beaujardière😀😍", Password: "issilly1", Type: "blocked", },