diff --git a/main.go b/main.go index e1f21e3..84fc126 100644 --- a/main.go +++ b/main.go @@ -4,6 +4,6 @@ import "github.com/gin-gonic/gin" func main() { router := gin.Default() - router.GET("/product/:id", GetProduct) + router.GET("/bar/product/:id", GetProduct) router.Run("localhost:8080") } diff --git a/user_service_test.go b/user_service_test.go index 934bba6..691a2c5 100644 --- a/user_service_test.go +++ b/user_service_test.go @@ -28,7 +28,7 @@ func TestPactProvider(t *testing.T) { // Verify the Provider - fetch pacts from PactFlow verifyRequest := provider.VerifyRequest{ Provider: "pactflow-example-provider-golang", - ProviderBaseURL: fmt.Sprintf("http://127.0.0.1:%d", port), + ProviderBaseURL: fmt.Sprintf("http://127.0.0.1:%d/bar", port), BrokerToken: os.Getenv("PACT_BROKER_TOKEN"), BrokerUsername: os.Getenv("PACT_BROKER_USERNAME"), BrokerPassword: os.Getenv("PACT_BROKER_PASSWORD"), @@ -58,8 +58,6 @@ func TestPactProvider(t *testing.T) { t.Fatalf("%v", err) } - - } // Provider state handlers @@ -77,7 +75,7 @@ var stateHandlers = models.StateHandlers{ // Starts the provider API with hooks for provider states. func startProvider() { router := gin.Default() - router.GET("/product/:id", GetProduct) + router.GET("/bar/product/:id", GetProduct) router.Run(fmt.Sprintf(":%d", port)) }