Bruno Holanda
10/27/2023, 6:47 PMMatt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Bruno Holanda
10/30/2023, 12:23 PMtype Config struct {
Consumer string
Provider string
PactDir string
}
So in the end of the TestMessagePact we didn't declare this part
provider, err := message.NewMessagePact(message.Config{
Consumer: "PactGoV3MessageConsumer",
Provider: "V3MessageProvider", // must be different to the HTTP one, can't mix both interaction styles
})
Bruno Holanda
10/30/2023, 12:47 PMfunc (p *AsynchronousPact) validateConfig() error {
log.Println("[DEBUG] pact message validate config")
dir, _ := os.Getwd()
if p.config.PactDir == "" {
p.config.PactDir = filepath.Join(dir, "pacts")
}
p.messageserver = mockserver.NewMessageServer(p.config.Consumer, p.config.Provider)
return nil
}