Skip to content

Commit

Permalink
chore: enable wip/pending pacts
Browse files Browse the repository at this point in the history
  • Loading branch information
YOU54F committed Sep 27, 2024
1 parent b0639e7 commit 6356ef7
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion user_service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,22 @@ import (
"fmt"
"os"
"testing"
"time"

"github.com/gin-gonic/gin"
"github.com/pact-foundation/pact-go/dsl"
"github.com/pact-foundation/pact-go/types"
"github.com/pact-foundation/pact-go/utils"
)

func parseDate(dateStr string) *time.Time {
date, err := time.Parse("2006-01-02", dateStr)
if err != nil {
panic(err)
}
return &date
}

func TestPactProvider(t *testing.T) {
go startProvider()

Expand All @@ -27,13 +36,16 @@ func TestPactProvider(t *testing.T) {
PublishVerificationResults: envBool("PACT_BROKER_PUBLISH_VERIFICATION_RESULTS"),
ProviderVersion: os.Getenv("GIT_COMMIT"),
StateHandlers: stateHandlers,
EnablePending: envBool("PENDING"),
EnablePending: true,
IncludeWIPPactsSince: parseDate("2024-01-01"),
ProviderBranch: os.Getenv("GIT_BRANCH"),
})

if err != nil {
t.Fatalf("%v", err)
}


}

// Provider state handlers
Expand Down

0 comments on commit 6356ef7

Please sign in to comment.