Skip to content

Commit

Permalink
chore: log levels + docker image updates
Browse files Browse the repository at this point in the history
  • Loading branch information
YOU54F committed May 2, 2024
1 parent 844ed97 commit 45a94eb
Show file tree
Hide file tree
Showing 12 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "3"

services:
httpbin:
image: kennethreitz/httpbin
image: kong/httpbin # https://github.com/Kong/httpbin
ports:
- "8000:80"

Expand All @@ -18,7 +18,7 @@ services:
POSTGRES_DB: postgres

broker_app:
image: pactfoundation/pact-broker:latest-multi
image: pactfoundation/pact-broker:latest
links:
- postgres
ports:
Expand Down
6 changes: 3 additions & 3 deletions examples/consumer_v2_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ var ArrayMinLike = matchers.ArrayMinLike
type Map = matchers.MapMatcher

func TestConsumerV2(t *testing.T) {
log.SetLogLevel("TRACE")
log.SetLogLevel("INFO")

mockProvider, err := consumer.NewV2Pact(consumer.MockHTTPProviderConfig{
Consumer: "PactGoV2Consumer",
Expand Down Expand Up @@ -79,7 +79,7 @@ func TestConsumerV2(t *testing.T) {
}

func TestConsumerV2_Match(t *testing.T) {
log.SetLogLevel("TRACE")
log.SetLogLevel("INFO")

mockProvider, err := consumer.NewV2Pact(consumer.MockHTTPProviderConfig{
Consumer: "PactGoV2ConsumerMatch",
Expand Down Expand Up @@ -111,7 +111,7 @@ func TestConsumerV2_Match(t *testing.T) {
}

func TestConsumerV2AllInOne(t *testing.T) {
log.SetLogLevel("TRACE")
log.SetLogLevel("INFO")

mockProvider, err := consumer.NewV2Pact(consumer.MockHTTPProviderConfig{
Consumer: "PactGoV2ConsumerAllInOne",
Expand Down
4 changes: 2 additions & 2 deletions examples/consumer_v3_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ var TimeGenerated = matchers.TimeGenerated
var DateTimeGenerated = matchers.DateTimeGenerated

func TestConsumerV3(t *testing.T) {
log.SetLogLevel("TRACE")
log.SetLogLevel("INFO")

mockProvider, err := consumer.NewV3Pact(consumer.MockHTTPProviderConfig{
Consumer: "PactGoV3Consumer",
Expand Down Expand Up @@ -90,7 +90,7 @@ func TestConsumerV3(t *testing.T) {
assert.NoError(t, err)
}
func TestMessagePact(t *testing.T) {
log.SetLogLevel("TRACE")
log.SetLogLevel("INFO")

provider, err := message.NewMessagePact(message.Config{
Consumer: "PactGoV3MessageConsumer",
Expand Down
2 changes: 1 addition & 1 deletion examples/consumer_v4_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
)

func TestConsumerV4(t *testing.T) {
log.SetLogLevel("TRACE")
log.SetLogLevel("INFO")

mockProvider, err := consumer.NewV4Pact(consumer.MockHTTPProviderConfig{
Consumer: "PactGoV4Consumer",
Expand Down
2 changes: 1 addition & 1 deletion examples/grpc/grpc_provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (

func TestGrpcProvider(t *testing.T) {
go startProvider()
l.SetLogLevel("TRACE")
l.SetLogLevel("INFO")

verifier := provider.NewVerifier()

Expand Down
2 changes: 1 addition & 1 deletion examples/protobuf-message/protobuf_provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func TestPluginMessageProvider(t *testing.T) {
var dir, _ = os.Getwd()
var pactDir = fmt.Sprintf("%s/../pacts", dir)

err := pactlog.SetLogLevel("TRACE")
err := pactlog.SetLogLevel("INFO")
assert.NoError(t, err)

pactversion.CheckVersion()
Expand Down
4 changes: 2 additions & 2 deletions examples/provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ var requestFilterCalled = false
var stateHandlerCalled = false

func TestV3HTTPProvider(t *testing.T) {
log.SetLogLevel("TRACE")
log.SetLogLevel("INFO")
version.CheckVersion()

// Start provider API in the background
Expand Down Expand Up @@ -101,7 +101,7 @@ func TestV3HTTPProvider(t *testing.T) {
}

func TestV3MessageProvider(t *testing.T) {
log.SetLogLevel("TRACE")
log.SetLogLevel("INFO")
var user *User

verifier := provider.NewVerifier()
Expand Down
4 changes: 2 additions & 2 deletions internal/native/message_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ func TestGetPluginAsyncMessageContentsAsBytes(t *testing.T) {
func TestGrpcPluginInteraction(t *testing.T) {
tmpPactFolder, err := os.MkdirTemp("", "pact-go")
assert.NoError(t, err)
_ = log.SetLogLevel("TRACE")
_ = log.SetLogLevel("INFO")

m := NewMessageServer("test-message-consumer", "test-message-provider")

Expand Down Expand Up @@ -426,7 +426,7 @@ func TestGrpcPluginInteraction(t *testing.T) {
func TestGrpcPluginInteraction_ErrorResponse(t *testing.T) {
tmpPactFolder, err := os.MkdirTemp("", "pact-go")
assert.NoError(t, err)
_ = log.SetLogLevel("TRACE")
_ = log.SetLogLevel("INFO")

m := NewMessageServer("test-message-consumer", "test-message-provider")

Expand Down
2 changes: 1 addition & 1 deletion internal/native/mock_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ func TestHandleBasedHTTPTests(t *testing.T) {
func TestPluginInteraction(t *testing.T) {
tmpPactFolder, err := os.MkdirTemp("", "pact-go")
assert.NoError(t, err)
_ = log.SetLogLevel("trace")
_ = log.SetLogLevel("INFO")

m := NewHTTPPact("test-plugin-consumer", "test-plugin-provider")

Expand Down
2 changes: 1 addition & 1 deletion internal/native/verifier_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func TestVerifier_Verify(t *testing.T) {
"--state-change-url",
"http://localhost:55827/__setup/",
"--loglevel",
"trace",
"info",
}

res := v.Verify(args)
Expand Down
2 changes: 1 addition & 1 deletion message/v4/asynchronous_message_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ func TestAsyncTypeSystem(t *testing.T) {
Provider: "asyncprovider",
PactDir: "/tmp/",
})
_ = log.SetLogLevel("TRACE")
_ = log.SetLogLevel("INFO")

type foo struct {
Foo string `json:"foo"`
Expand Down
2 changes: 1 addition & 1 deletion message/v4/synchronous_message_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func TestSyncTypeSystem(t *testing.T) {
Provider: "provider",
PactDir: "/tmp/",
})
_ = log.SetLogLevel("TRACE")
_ = log.SetLogLevel("INFO")

dir, _ := os.Getwd()
path := fmt.Sprintf("%s/../../internal/native/pact_plugin.proto", dir)
Expand Down

0 comments on commit 45a94eb

Please sign in to comment.