From 5cd0104ce69e851362ab10041d51eaaf9dde5440 Mon Sep 17 00:00:00 2001 From: Stanislav Vodetskyi Date: Mon, 18 Sep 2023 14:53:47 -0700 Subject: [PATCH 01/19] feat: allow disabling coloured output in Verifier --- examples/provider_test.go | 1 + internal/native/verifier.go | 5 +++++ provider/verify_request.go | 4 ++++ 3 files changed, 10 insertions(+) diff --git a/examples/provider_test.go b/examples/provider_test.go index 909e5eb18..852cfd411 100644 --- a/examples/provider_test.go +++ b/examples/provider_test.go @@ -92,6 +92,7 @@ func TestV3HTTPProvider(t *testing.T) { return models.ProviderStateResponse{"uuid": "1234"}, nil }, }, + DisableColoredOutput: true, }) assert.NoError(t, err) diff --git a/internal/native/verifier.go b/internal/native/verifier.go index 012c62824..ae781840a 100644 --- a/internal/native/verifier.go +++ b/internal/native/verifier.go @@ -32,6 +32,7 @@ void pactffi_verifier_broker_source_with_selectors(VerifierHandle *handle, const int pactffi_verifier_execute(VerifierHandle *handle); void pactffi_verifier_add_provider_transport(VerifierHandle *handle, const char *protocol, uint32_t port, const char *path, const char *scheme); void pactffi_verifier_set_no_pacts_is_error(VerifierHandle *handle, bool is_error); +int pactffi_verifier_set_coloured_output(struct VerifierHandle *handle, bool coloured_output); */ import "C" @@ -247,6 +248,10 @@ func (v *Verifier) SetNoPactsIsError(isError bool) { C.pactffi_verifier_set_no_pacts_is_error(v.handle, boolToCInt(isError)) } +func (v *Verifier) SetColoredOutput(isColoredOutput bool) { + C.pactffi_verifier_set_coloured_output(v.handle, boolToCInt(isColoredOutput)) +} + func stringArrayToCStringArray(inputs []string) **C.char { if len(inputs) == 0 { return nil diff --git a/provider/verify_request.go b/provider/verify_request.go index 36b33d633..c2ba9acb7 100644 --- a/provider/verify_request.go +++ b/provider/verify_request.go @@ -164,6 +164,9 @@ type VerifyRequest struct { // Disable SSL verification for HTTP requests DisableSSLVerification bool + + // If true, will disable colored output in console. + DisableColoredOutput bool } // Validate checks that the minimum fields are provided. @@ -261,6 +264,7 @@ func (v *VerifyRequest) validate(handle *native.Verifier) error { } handle.SetNoPactsIsError(v.FailIfNoPactsFound) + handle.SetColoredOutput(!v.DisableColoredOutput) return nil } From e83db810c1b913b9616f3c5f061bad46e78ad113 Mon Sep 17 00:00:00 2001 From: Yousaf Nabi Date: Tue, 3 Oct 2023 13:03:58 +0100 Subject: [PATCH 02/19] deps: go 1.17 deprecations --- command/root.go | 4 ++-- command/root_test.go | 4 ++-- doc.go | 2 +- examples/avro/avro_consumer_test.go | 4 ++-- examples/avro/codec.go | 6 +++--- examples/consumer_v2_test.go | 4 ++-- examples/grpc/routeguide/server/server.go | 4 ++-- examples/plugin/consumer_plugin_test.go | 6 +++--- installer/installer.go | 5 ++--- internal/native/message_server_test.go | 14 +++++++------- internal/native/mock_server_test.go | 14 +++++++------- message/v4/asynchronous_message_test.go | 2 +- message/verifier.go | 4 ++-- provider/verifier.go | 5 ++--- 14 files changed, 38 insertions(+), 40 deletions(-) diff --git a/command/root.go b/command/root.go index 139e25c88..58f6c1c3f 100644 --- a/command/root.go +++ b/command/root.go @@ -3,7 +3,7 @@ package command import ( "fmt" - "io/ioutil" + "io" "log" "os" @@ -50,6 +50,6 @@ func setLogLevel(verbose bool, level string) { log.SetOutput(filter) if !verbose { - log.SetOutput(ioutil.Discard) + log.SetOutput(io.Discard) } } diff --git a/command/root_test.go b/command/root_test.go index b9f6ef8b6..aa786e684 100644 --- a/command/root_test.go +++ b/command/root_test.go @@ -1,7 +1,7 @@ package command import ( - "io/ioutil" + "io" "log" "os" "strings" @@ -55,7 +55,7 @@ func captureOutput(action func()) string { action() w.Close() - out, _ := ioutil.ReadAll(r) + out, _ := io.ReadAll(r) os.Stderr = rescueStderr return strings.TrimSpace(string(out)) diff --git a/doc.go b/doc.go index 66debd29e..295025c06 100644 --- a/doc.go +++ b/doc.go @@ -207,7 +207,7 @@ An example route using the standard Go http package might look like this: // Retrieve the Provider State var state types.ProviderState - body, _ := ioutil.ReadAll(req.Body) + body, _ := io.ReadAll(req.Body) req.Body.Close() json.Unmarshal(body, &state) diff --git a/examples/avro/avro_consumer_test.go b/examples/avro/avro_consumer_test.go index 0c3c640b1..3e590d448 100644 --- a/examples/avro/avro_consumer_test.go +++ b/examples/avro/avro_consumer_test.go @@ -5,7 +5,7 @@ package avro import ( "fmt" - "io/ioutil" + "io" "net/http" "net/url" "os" @@ -82,7 +82,7 @@ func callServiceHTTP(msc consumer.MockServerConfig) (*User, error) { return nil, err } - bytes, err := ioutil.ReadAll(res.Body) + bytes, err := io.ReadAll(res.Body) if err != nil { return nil, err diff --git a/examples/avro/codec.go b/examples/avro/codec.go index b12606942..fb4d2aca8 100644 --- a/examples/avro/codec.go +++ b/examples/avro/codec.go @@ -1,13 +1,13 @@ package avro import ( - "io/ioutil" - + + "os" "github.com/linkedin/goavro/v2" ) func getCodec() *goavro.Codec { - schema, err := ioutil.ReadFile("user.avsc") + schema, err := os.ReadFile("user.avsc") if err != nil { panic(err) } diff --git a/examples/consumer_v2_test.go b/examples/consumer_v2_test.go index b80092006..0c5ae0871 100644 --- a/examples/consumer_v2_test.go +++ b/examples/consumer_v2_test.go @@ -6,7 +6,7 @@ package main import ( "fmt" - "io/ioutil" + "io" "net/http" "net/url" "strings" @@ -188,7 +188,7 @@ var rawTest = func(query string) func(config consumer.MockServerConfig) error { Path: "/foobar", RawQuery: query, }, - Body: ioutil.NopCloser(strings.NewReader(`{"id": 27, "name":"billy", "lastName":"sampson", "datetime":"2021-01-01T08:00:45"}`)), + Body: io.NopCloser(strings.NewReader(`{"id": 27, "name":"billy", "lastName":"sampson", "datetime":"2021-01-01T08:00:45"}`)), Header: make(http.Header), } diff --git a/examples/grpc/routeguide/server/server.go b/examples/grpc/routeguide/server/server.go index 2c6596784..1c8b4c678 100644 --- a/examples/grpc/routeguide/server/server.go +++ b/examples/grpc/routeguide/server/server.go @@ -28,7 +28,7 @@ import ( "flag" "fmt" "io" - "io/ioutil" + "os" "log" "math" "net" @@ -155,7 +155,7 @@ func (s *routeGuideServer) loadFeatures(filePath string) { var data []byte if filePath != "" { var err error - data, err = ioutil.ReadFile(filePath) + data, err = os.ReadFile(filePath) if err != nil { log.Fatalf("Failed to load default features: %v", err) } diff --git a/examples/plugin/consumer_plugin_test.go b/examples/plugin/consumer_plugin_test.go index 303172d9a..edb3b8d44 100644 --- a/examples/plugin/consumer_plugin_test.go +++ b/examples/plugin/consumer_plugin_test.go @@ -6,7 +6,7 @@ package plugin import ( "bufio" "fmt" - "io/ioutil" + "io" "net" "net/http" "net/url" @@ -99,7 +99,7 @@ func callMattServiceHTTP(msc consumer.MockServerConfig, message string) (string, Scheme: "http", Path: "/matt", }, - Body: ioutil.NopCloser(strings.NewReader(generateMattMessage(message))), + Body: io.NopCloser(strings.NewReader(generateMattMessage(message))), Header: make(http.Header), } @@ -111,7 +111,7 @@ func callMattServiceHTTP(msc consumer.MockServerConfig, message string) (string, return "", err } - bytes, err := ioutil.ReadAll(res.Body) + bytes, err := io.ReadAll(res.Body) if err != nil { return "", err diff --git a/installer/installer.go b/installer/installer.go index 7b5a20e13..66637835d 100644 --- a/installer/installer.go +++ b/installer/installer.go @@ -5,7 +5,6 @@ package installer import ( "fmt" "io" - "io/ioutil" "log" "os" "os/exec" @@ -444,7 +443,7 @@ func (configuration) readConfig() pactConfig { Libraries: map[string]packageMetadata{}, } - bytes, err := ioutil.ReadFile(pactConfigPath) + bytes, err := os.ReadFile(pactConfigPath) if err != nil { log.Println("[DEBUG] error reading file", pactConfigPath, "error: ", err) return c @@ -474,7 +473,7 @@ func (configuration) writeConfig(c pactConfig) error { } log.Println("[DEBUG] writing yaml config to file", string(bytes)) - return ioutil.WriteFile(pactConfigPath, bytes, 0644) + return os.WriteFile(pactConfigPath, bytes, 0644) } type hasher interface { diff --git a/internal/native/message_server_test.go b/internal/native/message_server_test.go index e592f9dcd..b6e081453 100644 --- a/internal/native/message_server_test.go +++ b/internal/native/message_server_test.go @@ -6,9 +6,9 @@ import ( context "context" "encoding/json" "fmt" - "io/ioutil" - l "log" + "io" "os" + l"log" "testing" "time" @@ -21,7 +21,7 @@ import ( ) func TestHandleBasedMessageTestsWithString(t *testing.T) { - tmpPactFolder, err := ioutil.TempDir("", "pact-go") + tmpPactFolder, err := os.MkdirTemp("", "pact-go") assert.NoError(t, err) s := NewMessageServer("test-message-consumer", "test-message-provider") @@ -48,7 +48,7 @@ func TestHandleBasedMessageTestsWithString(t *testing.T) { } func TestHandleBasedMessageTestsWithJSON(t *testing.T) { - tmpPactFolder, err := ioutil.TempDir("", "pact-go") + tmpPactFolder, err := os.MkdirTemp("", "pact-go") assert.NoError(t, err) s := NewMessageServer("test-message-consumer", "test-message-provider") @@ -82,7 +82,7 @@ func TestHandleBasedMessageTestsWithJSON(t *testing.T) { } func TestHandleBasedMessageTestsWithBinary(t *testing.T) { - tmpPactFolder, err := ioutil.TempDir("", "pact-go") + tmpPactFolder, err := os.MkdirTemp("", "pact-go") assert.NoError(t, err) s := NewMessageServer("test-binarymessage-consumer", "test-binarymessage-provider"). @@ -116,7 +116,7 @@ func TestHandleBasedMessageTestsWithBinary(t *testing.T) { // Extract binary payload, base 64 decode it, unzip it r, err := gzip.NewReader(bytes.NewReader(body)) assert.NoError(t, err) - result, _ := ioutil.ReadAll(r) + result, _ := io.ReadAll(r) assert.Equal(t, encodedMessage, string(result)) @@ -281,7 +281,7 @@ func TestGetPluginAsyncMessageContentsAsBytes(t *testing.T) { } func TestGrpcPluginInteraction(t *testing.T) { - tmpPactFolder, err := ioutil.TempDir("", "pact-go") + tmpPactFolder, err := os.MkdirTemp("", "pact-go") assert.NoError(t, err) _ = log.SetLogLevel("TRACE") diff --git a/internal/native/mock_server_test.go b/internal/native/mock_server_test.go index 23a2d427c..bb3e595c2 100644 --- a/internal/native/mock_server_test.go +++ b/internal/native/mock_server_test.go @@ -2,7 +2,7 @@ package native import ( "fmt" - "io/ioutil" + "io" "net/http" "os" "testing" @@ -58,7 +58,7 @@ func TestMockServer_MismatchesFail(t *testing.T) { } func TestMockServer_VerifySuccess(t *testing.T) { - tmpPactFolder, err := ioutil.TempDir("", "pact-go") + tmpPactFolder, err := os.MkdirTemp("", "pact-go") assert.NoError(t, err) m := MockServer{} @@ -81,7 +81,7 @@ func TestMockServer_VerifySuccess(t *testing.T) { } func TestMockServer_VerifyFail(t *testing.T) { - tmpPactFolder, err := ioutil.TempDir("", "pact-go") + tmpPactFolder, err := os.MkdirTemp("", "pact-go") assert.NoError(t, err) m := MockServer{} port, _ := m.CreateMockServer(pactSimple, "0.0.0.0:0", false) @@ -97,7 +97,7 @@ func TestMockServer_VerifyFail(t *testing.T) { } func TestMockServer_WritePactfile(t *testing.T) { - tmpPactFolder, err := ioutil.TempDir("", "pact-go") + tmpPactFolder, err := os.MkdirTemp("", "pact-go") assert.NoError(t, err) m := MockServer{} @@ -126,7 +126,7 @@ func TestVersion(t *testing.T) { } func TestHandleBasedHTTPTests(t *testing.T) { - tmpPactFolder, err := ioutil.TempDir("", "pact-go") + tmpPactFolder, err := os.MkdirTemp("", "pact-go") assert.NoError(t, err) m := NewHTTPPact("test-http-consumer", "test-http-provider") @@ -165,7 +165,7 @@ func TestHandleBasedHTTPTests(t *testing.T) { } func TestPluginInteraction(t *testing.T) { - tmpPactFolder, err := ioutil.TempDir("", "pact-go") + tmpPactFolder, err := os.MkdirTemp("", "pact-go") assert.NoError(t, err) _ = log.SetLogLevel("trace") @@ -202,7 +202,7 @@ func TestPluginInteraction(t *testing.T) { res, err := http.Get(fmt.Sprintf("http://0.0.0.0:%d/protobuf", port)) assert.NoError(t, err) - bytes, err := ioutil.ReadAll(res.Body) + bytes, err := io.ReadAll(res.Body) assert.NoError(t, err) initPluginRequest := &InitPluginRequest{} diff --git a/message/v4/asynchronous_message_test.go b/message/v4/asynchronous_message_test.go index d5d756086..e8706627f 100644 --- a/message/v4/asynchronous_message_test.go +++ b/message/v4/asynchronous_message_test.go @@ -64,7 +64,7 @@ func TestAsyncTypeSystem(t *testing.T) { ExpectsToReceive("some csv content"). UsingPlugin(PluginConfig{ Plugin: "csv", - Version: "0.0.1", + Version: "0.0.3", }). WithContents(csvInteraction, "text/csv"). // StartTransport("notarealtransport", "127.0.0.1", nil). diff --git a/message/verifier.go b/message/verifier.go index 563b2a0dd..eeecc25cf 100644 --- a/message/verifier.go +++ b/message/verifier.go @@ -3,7 +3,7 @@ package message import ( "encoding/base64" "encoding/json" - "io/ioutil" + "io" "log" "net/http" @@ -58,7 +58,7 @@ func CreateMessageHandler(messageHandlers Handlers) proxy.Middleware { // Extract message var message messageVerificationHandlerRequest - body, err := ioutil.ReadAll(r.Body) + body, err := io.ReadAll(r.Body) r.Body.Close() log.Printf("[TRACE] message verification handler received request: %+s, %s", body, r.URL.Path) diff --git a/provider/verifier.go b/provider/verifier.go index 74feb8300..86b9fcc83 100644 --- a/provider/verifier.go +++ b/provider/verifier.go @@ -4,7 +4,6 @@ import ( "encoding/json" "fmt" "io" - "io/ioutil" "log" "net" "net/http" @@ -231,7 +230,7 @@ func getStateFromRequest(r *http.Request) (stateHandlerAction, error) { } // Body is consumed above, need to put it back after ;P - r.Body = ioutil.NopCloser(strings.NewReader(buf.String())) + r.Body = io.NopCloser(strings.NewReader(buf.String())) log.Println("[TRACE] getStateFromRequest received raw input", buf.String()) err = json.Unmarshal([]byte(buf.String()), &state) @@ -263,7 +262,7 @@ func stateHandlerMiddleware(stateHandlers models.StateHandlers, afterEach Hook) _, _ = io.ReadAll(tr) // Body is consumed above, need to put it back after ;P - r.Body = ioutil.NopCloser(strings.NewReader(buf.String())) + r.Body = io.NopCloser(strings.NewReader(buf.String())) log.Println("[TRACE] state handler received raw input", buf.String()) err := json.Unmarshal([]byte(buf.String()), &state) From fde24bd1445adcf82ed3cf5242fad8d4f5f02495 Mon Sep 17 00:00:00 2001 From: Yousaf Nabi Date: Tue, 3 Oct 2023 17:46:01 +0100 Subject: [PATCH 03/19] chore: drop return value in test --- installer/installer_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installer/installer_test.go b/installer/installer_test.go index 85ed2e1c0..68fc5b1df 100644 --- a/installer/installer_test.go +++ b/installer/installer_test.go @@ -79,7 +79,7 @@ func TestInstallerDownloader(t *testing.T) { return nil }) - i.downloadDependencies() // This will actually error on the "chmod" if the file doesn't exist + _ = i.downloadDependencies() // This will actually error on the "chmod" if the file doesn't exist assert.True(t, mock.called) }) From 553b0b6fcc1e2af852a07a4afdf1812113354fc5 Mon Sep 17 00:00:00 2001 From: Yousaf Nabi Date: Thu, 18 Jan 2024 22:30:35 +0000 Subject: [PATCH 04/19] chore: golangci-lint 1.55 --- .github/workflows/golangci-lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 90a58731c..033437734 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -32,7 +32,7 @@ jobs: with: # Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version. # version: v1.29 - version: v1.53 + version: v1.55 # Optional: working directory, useful for monorepos # working-directory: somedir From 2e5254e8d2b23934eeb3403327a4135c7ef7a6e2 Mon Sep 17 00:00:00 2001 From: Stanislav Vodetskyi <49661990+stan-confluent@users.noreply.github.com> Date: Tue, 14 Nov 2023 14:50:50 -0800 Subject: [PATCH 05/19] docs: correct link to consumer version selector combinations --- provider/consumer_version_selector.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/provider/consumer_version_selector.go b/provider/consumer_version_selector.go index b1b8ad134..b717ad8a0 100644 --- a/provider/consumer_version_selector.go +++ b/provider/consumer_version_selector.go @@ -7,7 +7,7 @@ package provider // Where a new selector is available in the broker but not yet supported here, // you may use the UntypedConsumerVersionSelector to pass in arbitrary key/values // -// Definitive list: https://github.com/pact-foundation/pact_broker/blob/master/spec/lib/pact_broker/api/contracts/verifiable_pacts_json_query_schema_combinations_spec.rb +// Definitive list: https://github.com/pact-foundation/pact_broker/blob/master/spec/lib/pact_broker/api/contracts/pacts_for_verification_json_query_schema_combinations_spec.rb type ConsumerVersionSelector struct { Tag string `json:"tag,omitempty"` FallbackTag string `json:"fallbackTag,omitempty"` From f4af4b62cb173a21ca4540f2a2569a95e965a0b8 Mon Sep 17 00:00:00 2001 From: Yousaf Nabi Date: Fri, 19 Jan 2024 11:15:42 +0000 Subject: [PATCH 06/19] chore: downgrade avro plugin --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index e2ed2879b..52dd4f2a4 100755 --- a/Makefile +++ b/Makefile @@ -46,7 +46,7 @@ download_plugins: ~/.pact/bin/pact-plugin-cli -y install https://github.com/pactflow/pact-protobuf-plugin/releases/tag/v-0.3.4 ~/.pact/bin/pact-plugin-cli -y install https://github.com/pact-foundation/pact-plugins/releases/tag/csv-plugin-0.0.1 ~/.pact/bin/pact-plugin-cli -y install https://github.com/mefellows/pact-matt-plugin/releases/tag/v0.0.9 - ~/.pact/bin/pact-plugin-cli -y install https://github.com/austek/pact-avro-plugin/releases/tag/v0.0.4 + ~/.pact/bin/pact-plugin-cli -y install https://github.com/austek/pact-avro-plugin/releases/tag/v0.0.3 cli: @if [ ! -d pact/bin ]; then\ From 94320b40d5b61ddbfe68a4bf5ae7326e437f8ecb Mon Sep 17 00:00:00 2001 From: Yousaf Nabi Date: Fri, 19 Jan 2024 11:20:51 +0000 Subject: [PATCH 07/19] chore: update pact-protobuf-plugin 0.3.8 --- Makefile | 2 +- consumer/http_v4_test.go | 2 +- examples/grpc/grpc_consumer_test.go | 2 +- examples/protobuf-message/protobuf_consumer_test.go | 2 +- internal/native/message_server_test.go | 6 +++--- message/v4/synchronous_message_test.go | 4 ++-- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 52dd4f2a4..28c348596 100755 --- a/Makefile +++ b/Makefile @@ -43,7 +43,7 @@ deps: download_plugins download_plugins: @echo "--- 🐿 Installing plugins"; \ ./scripts/install-cli.sh - ~/.pact/bin/pact-plugin-cli -y install https://github.com/pactflow/pact-protobuf-plugin/releases/tag/v-0.3.4 + ~/.pact/bin/pact-plugin-cli -y install https://github.com/pactflow/pact-protobuf-plugin/releases/tag/v-0.3.8 ~/.pact/bin/pact-plugin-cli -y install https://github.com/pact-foundation/pact-plugins/releases/tag/csv-plugin-0.0.1 ~/.pact/bin/pact-plugin-cli -y install https://github.com/mefellows/pact-matt-plugin/releases/tag/v0.0.9 ~/.pact/bin/pact-plugin-cli -y install https://github.com/austek/pact-avro-plugin/releases/tag/v0.0.3 diff --git a/consumer/http_v4_test.go b/consumer/http_v4_test.go index ca9db5e4e..154a8b227 100644 --- a/consumer/http_v4_test.go +++ b/consumer/http_v4_test.go @@ -58,7 +58,7 @@ func TestHttpV4TypeSystem(t *testing.T) { UponReceiving("some scenario"). UsingPlugin(PluginConfig{ Plugin: "protobuf", - Version: "0.3.0", + Version: "0.3.8", }). WithRequest("GET", "/"). // WithRequest("GET", "/", func(b *V4InteractionWithPluginRequestBuilder) { diff --git a/examples/grpc/grpc_consumer_test.go b/examples/grpc/grpc_consumer_test.go index d2d70a4da..962ad08b5 100644 --- a/examples/grpc/grpc_consumer_test.go +++ b/examples/grpc/grpc_consumer_test.go @@ -53,7 +53,7 @@ func TestGrpcInteraction(t *testing.T) { Given("feature 'Big Tree' exists"). UsingPlugin(message.PluginConfig{ Plugin: "protobuf", - Version: "0.3.4", + Version: "0.3.8", }). WithContents(grpcInteraction, "application/protobuf"). StartTransport("grpc", "127.0.0.1", nil). // For plugin tests, we can't assume if a transport is needed, so this is optional diff --git a/examples/protobuf-message/protobuf_consumer_test.go b/examples/protobuf-message/protobuf_consumer_test.go index 92e4ef2c3..a373653b5 100644 --- a/examples/protobuf-message/protobuf_consumer_test.go +++ b/examples/protobuf-message/protobuf_consumer_test.go @@ -42,7 +42,7 @@ func TestPluginMessageConsumer(t *testing.T) { ExpectsToReceive("feature message"). UsingPlugin(message.PluginConfig{ Plugin: "protobuf", - Version: "0.3.4", + Version: "0.3.8", }). WithContents(protoMessage, "application/protobuf"). ExecuteTest(t, func(m message.AsynchronousMessage) error { diff --git a/internal/native/message_server_test.go b/internal/native/message_server_test.go index b6e081453..d4cdf8619 100644 --- a/internal/native/message_server_test.go +++ b/internal/native/message_server_test.go @@ -191,7 +191,7 @@ func TestGetPluginSyncMessageContentsAsBytes(t *testing.T) { m := NewMessageServer("test-message-consumer", "test-message-provider") // Protobuf plugin test - err := m.UsingPlugin("protobuf", "0.3.0") + err := m.UsingPlugin("protobuf", "0.3.8") assert.NoError(t, err) i := m.NewSyncMessageInteraction("grpc interaction") @@ -248,7 +248,7 @@ func TestGetPluginAsyncMessageContentsAsBytes(t *testing.T) { m := NewMessageServer("test-message-consumer", "test-message-provider") // Protobuf plugin test - _ = m.UsingPlugin("protobuf", "0.3.0") + _ = m.UsingPlugin("protobuf", "0.3.8") i := m.NewAsyncMessageInteraction("grpc interaction") @@ -288,7 +288,7 @@ func TestGrpcPluginInteraction(t *testing.T) { m := NewMessageServer("test-message-consumer", "test-message-provider") // Protobuf plugin test - _ = m.UsingPlugin("protobuf", "0.3.0") + _ = m.UsingPlugin("protobuf", "0.3.8") i := m.NewSyncMessageInteraction("grpc interaction") diff --git a/message/v4/synchronous_message_test.go b/message/v4/synchronous_message_test.go index a10293eb5..87d87ff45 100644 --- a/message/v4/synchronous_message_test.go +++ b/message/v4/synchronous_message_test.go @@ -105,7 +105,7 @@ func TestSyncTypeSystem(t *testing.T) { Given("some state"). UsingPlugin(PluginConfig{ Plugin: "protobuf", - Version: "0.3.0", + Version: "0.3.8", }). WithContents(grpcInteraction, "application/protobuf"). StartTransport("grpc", "127.0.0.1", nil). // For plugin tests, we can't assume if a transport is needed, so this is optional @@ -128,7 +128,7 @@ func TestSyncTypeSystem(t *testing.T) { Given("some state"). UsingPlugin(PluginConfig{ Plugin: "protobuf", - Version: "0.3.0", + Version: "0.3.8", }). WithContents(grpcInteraction, "application/protobuf"). StartTransport("grpc", "127.0.0.1", nil). // For plugin tests, we can't assume if a transport is needed, so this is optional From 5aa9c49e3c1f3c537690a9f6c3cb494900a0dd5a Mon Sep 17 00:00:00 2001 From: Yousaf Nabi Date: Fri, 19 Jan 2024 11:34:53 +0000 Subject: [PATCH 08/19] chore: rm pact files --- examples/pacts/MattConsumer-MattProvider.json | 63 ---- ...GoProductAPIConsumer-PactGoProductAPI.json | 50 --- .../pacts/PactGoV2Consumer-V2Provider.json | 102 ------ .../PactGoV2ConsumerAllInOne-V2Provider.json | 86 ----- ...PactGoV2ConsumerMatch-V2ProviderMatch.json | 98 ------ .../pacts/PactGoV3Consumer-V3Provider.json | 292 ----------------- ...GoV3MessageConsumer-V3MessageProvider.json | 61 ---- .../pacts/PactGoV4Consumer-V4Provider.json | 310 ------------------ examples/pacts/grpcconsumer-grpcprovider.json | 120 ------- .../matttcpconsumer-matttcpprovider.json | 57 ---- 10 files changed, 1239 deletions(-) delete mode 100644 examples/pacts/MattConsumer-MattProvider.json delete mode 100644 examples/pacts/PactGoProductAPIConsumer-PactGoProductAPI.json delete mode 100644 examples/pacts/PactGoV2Consumer-V2Provider.json delete mode 100644 examples/pacts/PactGoV2ConsumerAllInOne-V2Provider.json delete mode 100644 examples/pacts/PactGoV2ConsumerMatch-V2ProviderMatch.json delete mode 100644 examples/pacts/PactGoV3Consumer-V3Provider.json delete mode 100644 examples/pacts/PactGoV3MessageConsumer-V3MessageProvider.json delete mode 100644 examples/pacts/PactGoV4Consumer-V4Provider.json delete mode 100644 examples/pacts/grpcconsumer-grpcprovider.json delete mode 100644 examples/pacts/matttcpconsumer-matttcpprovider.json diff --git a/examples/pacts/MattConsumer-MattProvider.json b/examples/pacts/MattConsumer-MattProvider.json deleted file mode 100644 index fc2cf428c..000000000 --- a/examples/pacts/MattConsumer-MattProvider.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "consumer": { - "name": "MattConsumer" - }, - "interactions": [ - { - "description": "A request to do a matt", - "key": "c544877c9301bb17", - "pending": false, - "request": { - "body": { - "content": "MATThelloMATT", - "contentType": "application/matt", - "contentTypeHint": "DEFAULT", - "encoded": false - }, - "headers": { - "content-type": [ - "application/matt" - ] - }, - "method": "POST", - "path": "/matt" - }, - "response": { - "body": { - "content": "MATTworldMATT", - "contentType": "application/matt", - "contentTypeHint": "DEFAULT", - "encoded": false - }, - "headers": { - "content-type": [ - "application/matt" - ] - }, - "status": 200 - }, - "transport": "http", - "type": "Synchronous/HTTP" - } - ], - "metadata": { - "pactRust": { - "ffi": "0.3.18", - "mockserver": "0.9.8", - "models": "1.0.2" - }, - "pactSpecification": { - "version": "4.0" - }, - "plugins": [ - { - "configuration": {}, - "name": "matt", - "version": "0.0.7" - } - ] - }, - "provider": { - "name": "MattProvider" - } -} \ No newline at end of file diff --git a/examples/pacts/PactGoProductAPIConsumer-PactGoProductAPI.json b/examples/pacts/PactGoProductAPIConsumer-PactGoProductAPI.json deleted file mode 100644 index 43cad6c15..000000000 --- a/examples/pacts/PactGoProductAPIConsumer-PactGoProductAPI.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "consumer": { - "name": "PactGoProductAPIConsumer" - }, - "interactions": [ - { - "description": "A request for Product 10", - "providerState": "A product with ID 10 exists", - "request": { - "method": "GET", - "path": "/products/10" - }, - "response": { - "body": { - "id": 10, - "name": "Billy", - "price": "23.33" - }, - "headers": { - "Content-Type": "application/json" - }, - "matchingRules": { - "$.body.id": { - "match": "type" - }, - "$.body.name": { - "match": "type" - }, - "$.body.price": { - "match": "type" - } - }, - "status": 200 - } - } - ], - "metadata": { - "pactRust": { - "ffi": "0.3.18", - "mockserver": "0.9.8", - "models": "1.0.2" - }, - "pactSpecification": { - "version": "2.0.0" - } - }, - "provider": { - "name": "PactGoProductAPI" - } -} \ No newline at end of file diff --git a/examples/pacts/PactGoV2Consumer-V2Provider.json b/examples/pacts/PactGoV2Consumer-V2Provider.json deleted file mode 100644 index bf22d1cae..000000000 --- a/examples/pacts/PactGoV2Consumer-V2Provider.json +++ /dev/null @@ -1,102 +0,0 @@ -{ - "consumer": { - "name": "PactGoV2Consumer" - }, - "interactions": [ - { - "description": "A request to do a foo", - "providerState": "User foo exists", - "request": { - "body": { - "datetime": "2020-01-01'T'08:00:45", - "id": 27, - "lastName": "billy", - "name": "billy" - }, - "headers": { - "Authorization": "Bearer 1234", - "Content-Type": "application/json" - }, - "matchingRules": { - "$.body.datetime": { - "match": "type" - }, - "$.body.id": { - "match": "type" - }, - "$.body.lastName": { - "match": "type" - }, - "$.body.name": { - "match": "type" - }, - "$.header.$.Authorization[0]": { - "match": "type" - }, - "$.path": { - "match": "regex", - "regex": "\\/foo.*" - }, - "$.query.$.baz[0]": { - "match": "regex", - "regex": "[a-z]+" - }, - "$.query.$.baz[1]": { - "match": "regex", - "regex": "[a-z]+" - }, - "$.query.$.baz[2]": { - "match": "regex", - "regex": "[a-z]+" - } - }, - "method": "POST", - "path": "/foobar", - "query": "baz=bar&baz=bat&baz=baz" - }, - "response": { - "body": { - "datetime": "2020-01-01", - "itemsMin": [ - "thereshouldbe3ofthese", - "thereshouldbe3ofthese", - "thereshouldbe3ofthese" - ], - "lastName": "Sampson", - "name": "Billy" - }, - "headers": { - "Content-Type": "application/json" - }, - "matchingRules": { - "$.body.datetime": { - "match": "regex", - "regex": "[0-9\\-]+" - }, - "$.body.itemsMin": { - "match": "type", - "min": 3 - }, - "$.header.$['Content-Type'][0]": { - "match": "regex", - "regex": "application\\/json" - } - }, - "status": 200 - } - } - ], - "metadata": { - "pactRust": { - "ffi": "0.3.18", - "mockserver": "0.9.8", - "models": "1.0.2" - }, - "pactSpecification": { - "version": "2.0.0" - } - }, - "provider": { - "name": "V2Provider" - } -} \ No newline at end of file diff --git a/examples/pacts/PactGoV2ConsumerAllInOne-V2Provider.json b/examples/pacts/PactGoV2ConsumerAllInOne-V2Provider.json deleted file mode 100644 index 5b2a72506..000000000 --- a/examples/pacts/PactGoV2ConsumerAllInOne-V2Provider.json +++ /dev/null @@ -1,86 +0,0 @@ -{ - "consumer": { - "name": "PactGoV2ConsumerAllInOne" - }, - "interactions": [ - { - "description": "A request to do a foo", - "providerState": "User foo exists", - "request": { - "body": { - "datetime": "2020-01-01'T'08:00:45", - "id": 27, - "lastName": "billy", - "name": "billy" - }, - "headers": { - "Content-Type": "application/json" - }, - "matchingRules": { - "$.body.datetime": { - "match": "type" - }, - "$.body.id": { - "match": "type" - }, - "$.body.lastName": { - "match": "type" - }, - "$.body.name": { - "match": "type" - }, - "$.path": { - "match": "regex", - "regex": "\\/foo.*" - }, - "$.query.$.baz[0]": { - "match": "regex", - "regex": "[a-zA-Z]+" - } - }, - "method": "POST", - "path": "/foobar", - "query": "baz=bat" - }, - "response": { - "body": { - "datetime": "2020-01-01", - "itemsMin": [ - "thereshouldbe3ofthese", - "thereshouldbe3ofthese", - "thereshouldbe3ofthese" - ], - "lastName": "Sampson", - "name": "Billy" - }, - "headers": { - "Content-Type": "application/json" - }, - "matchingRules": { - "$.body.datetime": { - "match": "regex", - "regex": "[0-9\\-]+" - }, - "$.body.itemsMin": { - "match": "type", - "min": 3 - } - }, - "status": 200 - } - } - ], - "metadata": { - "pactRust": { - "ffi": "0.3.18", - "mockserver": "0.9.8", - "models": "1.0.2" - }, - "pactSpecification": { - "version": "2.0.0" - } - }, - "provider": { - "name": "V2Provider" - } -} \ No newline at end of file diff --git a/examples/pacts/PactGoV2ConsumerMatch-V2ProviderMatch.json b/examples/pacts/PactGoV2ConsumerMatch-V2ProviderMatch.json deleted file mode 100644 index a592305af..000000000 --- a/examples/pacts/PactGoV2ConsumerMatch-V2ProviderMatch.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "consumer": { - "name": "PactGoV2ConsumerMatch" - }, - "interactions": [ - { - "description": "A request to do a foo", - "providerState": "User foo exists", - "request": { - "body": { - "datetime": "2020-01-01'T'08:00:45,format=yyyy-MM-dd'T'HH:mm:ss,generator=datetime", - "id": 27, - "lastName": "Sampson", - "name": "Billy" - }, - "headers": { - "Authorization": "Bearer 1234", - "Content-Type": "application/json" - }, - "matchingRules": { - "$.body.datetime": { - "match": "type" - }, - "$.body.id": { - "match": "type" - }, - "$.body.lastName": { - "match": "type" - }, - "$.body.name": { - "match": "type" - }, - "$.header.$.Authorization[0]": { - "match": "type" - }, - "$.query.$.baz[0]": { - "match": "regex", - "regex": "[a-z]+" - }, - "$.query.$.baz[1]": { - "match": "regex", - "regex": "[a-z]+" - }, - "$.query.$.baz[2]": { - "match": "regex", - "regex": "[a-z]+" - } - }, - "method": "POST", - "path": "/foobar", - "query": "baz=bar&baz=bat&baz=baz" - }, - "response": { - "body": { - "datetime": "2020-01-01'T'08:00:45,format=yyyy-MM-dd'T'HH:mm:ss,generator=datetime", - "id": 27, - "lastName": "Sampson", - "name": "Billy" - }, - "headers": { - "Content-Type": "application/json" - }, - "matchingRules": { - "$.body.datetime": { - "match": "type" - }, - "$.body.id": { - "match": "type" - }, - "$.body.lastName": { - "match": "type" - }, - "$.body.name": { - "match": "type" - }, - "$.header.$['Content-Type'][0]": { - "match": "regex", - "regex": "application\\/json" - } - }, - "status": 200 - } - } - ], - "metadata": { - "pactRust": { - "ffi": "0.3.18", - "mockserver": "0.9.8", - "models": "1.0.2" - }, - "pactSpecification": { - "version": "2.0.0" - } - }, - "provider": { - "name": "V2ProviderMatch" - } -} \ No newline at end of file diff --git a/examples/pacts/PactGoV3Consumer-V3Provider.json b/examples/pacts/PactGoV3Consumer-V3Provider.json deleted file mode 100644 index 666df7aa7..000000000 --- a/examples/pacts/PactGoV3Consumer-V3Provider.json +++ /dev/null @@ -1,292 +0,0 @@ -{ - "consumer": { - "name": "PactGoV3Consumer" - }, - "interactions": [ - { - "description": "A request to do a foo", - "providerStates": [ - { - "name": "state 1" - }, - { - "name": "User foo exists", - "params": { - "id": "foo" - } - } - ], - "request": { - "body": { - "datetime": "2020-01-01T08:00:45", - "id": 27, - "lastName": "billy", - "name": "billy" - }, - "generators": { - "body": { - "$.datetime": { - "format": "yyyy-MM-dd'T'HH:mm:ss", - "type": "DateTime" - }, - "$.name": { - "expression": "${name}", - "type": "ProviderState" - } - } - }, - "headers": { - "Authorization": "Bearer 1234", - "Content-Type": "application/json" - }, - "matchingRules": { - "body": { - "$.datetime": { - "combine": "AND", - "matchers": [ - { - "format": "yyyy-MM-dd'T'HH:mm:ss", - "match": "datetime" - } - ] - }, - "$.id": { - "combine": "AND", - "matchers": [ - { - "match": "type" - } - ] - }, - "$.lastName": { - "combine": "AND", - "matchers": [ - { - "match": "type" - } - ] - }, - "$.name": { - "combine": "AND", - "matchers": [ - { - "match": "type" - } - ] - } - }, - "header": { - "$.Authorization[0]": { - "combine": "AND", - "matchers": [ - { - "match": "type" - } - ] - } - }, - "query": { - "$.baz[0]": { - "combine": "AND", - "matchers": [ - { - "match": "regex", - "regex": "[a-z]+" - } - ] - }, - "$.baz[1]": { - "combine": "AND", - "matchers": [ - { - "match": "regex", - "regex": "[a-z]+" - } - ] - }, - "$.baz[2]": { - "combine": "AND", - "matchers": [ - { - "match": "regex", - "regex": "[a-z]+" - } - ] - } - } - }, - "method": "POST", - "path": "/foobar", - "query": { - "baz": [ - "bar", - "bat", - "baz" - ] - } - }, - "response": { - "body": { - "accountBalance": 123.76, - "arrayContaining": [ - "string", - 1, - { - "foo": "bar" - } - ], - "datetime": "2020-01-01", - "equality": "a thing", - "id": 12, - "itemsMin": [ - "thereshouldbe3ofthese", - "thereshouldbe3ofthese", - "thereshouldbe3ofthese" - ], - "itemsMinMax": [ - 27, - 27, - 27, - 27, - 27 - ], - "lastName": "Sampson", - "name": "Billy", - "superstring": "foo" - }, - "headers": { - "Content-Type": "application/json" - }, - "matchingRules": { - "body": { - "$.accountBalance": { - "combine": "AND", - "matchers": [ - { - "match": "decimal" - } - ] - }, - "$.arrayContaining": { - "combine": "AND", - "matchers": [ - { - "match": "arrayContains", - "variants": [ - { - "index": 0, - "rules": { - "$": { - "combine": "AND", - "matchers": [ - { - "match": "type" - } - ] - } - } - }, - { - "index": 1, - "rules": { - "$": { - "combine": "AND", - "matchers": [ - { - "match": "integer" - } - ] - } - } - }, - { - "index": 2, - "rules": { - "$.foo": { - "combine": "AND", - "matchers": [ - { - "match": "type" - } - ] - } - } - } - ] - } - ] - }, - "$.datetime": { - "combine": "AND", - "matchers": [ - { - "match": "regex", - "regex": "[0-9\\-]+" - } - ] - }, - "$.equality": { - "combine": "AND", - "matchers": [ - { - "match": "equality" - } - ] - }, - "$.id": { - "combine": "AND", - "matchers": [ - { - "match": "integer" - } - ] - }, - "$.itemsMin": { - "combine": "AND", - "matchers": [ - { - "match": "type", - "min": 3 - } - ] - }, - "$.itemsMinMax": { - "combine": "AND", - "matchers": [ - { - "match": "type", - "max": 5, - "min": 3 - } - ] - }, - "$.superstring": { - "combine": "AND", - "matchers": [ - { - "match": "include", - "value": "foo" - } - ] - } - }, - "header": {} - }, - "status": 200 - } - } - ], - "metadata": { - "pactRust": { - "ffi": "0.3.18", - "mockserver": "0.9.8", - "models": "1.0.2" - }, - "pactSpecification": { - "version": "3.0.0" - } - }, - "provider": { - "name": "V3Provider" - } -} \ No newline at end of file diff --git a/examples/pacts/PactGoV3MessageConsumer-V3MessageProvider.json b/examples/pacts/PactGoV3MessageConsumer-V3MessageProvider.json deleted file mode 100644 index 3b6014483..000000000 --- a/examples/pacts/PactGoV3MessageConsumer-V3MessageProvider.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "consumer": { - "name": "PactGoV3MessageConsumer" - }, - "messages": [ - { - "contents": { - "datetime": "2020-01-01", - "id": 12, - "lastName": "Sampson", - "name": "Billy" - }, - "description": "a user event", - "matchingRules": { - "body": { - "$.datetime": { - "combine": "AND", - "matchers": [ - { - "match": "regex", - "regex": "[0-9\\-]+" - } - ] - }, - "$.id": { - "combine": "AND", - "matchers": [ - { - "match": "integer" - } - ] - } - } - }, - "metadata": { - "Content-Type": "application/json", - "contentType": "application/json" - }, - "providerStates": [ - { - "name": "User with id 127 exists", - "params": { - "id": 127 - } - } - ] - } - ], - "metadata": { - "pactRust": { - "ffi": "0.3.18", - "models": "1.0.2" - }, - "pactSpecification": { - "version": "3.0.0" - } - }, - "provider": { - "name": "V3MessageProvider" - } -} \ No newline at end of file diff --git a/examples/pacts/PactGoV4Consumer-V4Provider.json b/examples/pacts/PactGoV4Consumer-V4Provider.json deleted file mode 100644 index 70e8f64df..000000000 --- a/examples/pacts/PactGoV4Consumer-V4Provider.json +++ /dev/null @@ -1,310 +0,0 @@ -{ - "consumer": { - "name": "PactGoV4Consumer" - }, - "interactions": [ - { - "description": "A request to do a foo", - "key": "723d6c7144f49156", - "pending": false, - "providerStates": [ - { - "name": "state 1" - }, - { - "name": "User foo exists", - "params": { - "id": "foo" - } - } - ], - "request": { - "body": { - "content": { - "datetime": "2020-01-01T08:00:45", - "id": 27, - "lastName": "billy", - "name": "billy" - }, - "contentType": "application/json", - "encoded": false - }, - "generators": { - "body": { - "$.datetime": { - "format": "yyyy-MM-dd'T'HH:mm:ss", - "type": "DateTime" - }, - "$.name": { - "expression": "${name}", - "type": "ProviderState" - } - } - }, - "headers": { - "Authorization": [ - "Bearer 1234" - ], - "Content-Type": [ - "application/json" - ] - }, - "matchingRules": { - "body": { - "$.datetime": { - "combine": "AND", - "matchers": [ - { - "format": "yyyy-MM-dd'T'HH:mm:ss", - "match": "datetime" - } - ] - }, - "$.id": { - "combine": "AND", - "matchers": [ - { - "match": "type" - } - ] - }, - "$.lastName": { - "combine": "AND", - "matchers": [ - { - "match": "type" - } - ] - }, - "$.name": { - "combine": "AND", - "matchers": [ - { - "match": "type" - } - ] - } - }, - "header": { - "$.Authorization[0]": { - "combine": "AND", - "matchers": [ - { - "match": "type" - } - ] - } - }, - "query": { - "$.baz[0]": { - "combine": "AND", - "matchers": [ - { - "match": "regex", - "regex": "[a-z]+" - } - ] - }, - "$.baz[1]": { - "combine": "AND", - "matchers": [ - { - "match": "regex", - "regex": "[a-z]+" - } - ] - }, - "$.baz[2]": { - "combine": "AND", - "matchers": [ - { - "match": "regex", - "regex": "[a-z]+" - } - ] - } - } - }, - "method": "POST", - "path": "/foobar", - "query": { - "baz": [ - "bar", - "bat", - "baz" - ] - } - }, - "response": { - "body": { - "content": { - "accountBalance": 123.76, - "arrayContaining": [ - "string", - 1, - { - "foo": "bar" - } - ], - "datetime": "2020-01-01", - "equality": "a thing", - "id": 12, - "itemsMin": [ - "thereshouldbe3ofthese", - "thereshouldbe3ofthese", - "thereshouldbe3ofthese" - ], - "itemsMinMax": [ - 27, - 27, - 27, - 27, - 27 - ], - "lastName": "Sampson", - "name": "Billy", - "superstring": "foo" - }, - "contentType": "application/json", - "encoded": false - }, - "headers": { - "Content-Type": [ - "application/json" - ] - }, - "matchingRules": { - "body": { - "$.accountBalance": { - "combine": "AND", - "matchers": [ - { - "match": "decimal" - } - ] - }, - "$.arrayContaining": { - "combine": "AND", - "matchers": [ - { - "match": "arrayContains", - "variants": [ - { - "index": 0, - "rules": { - "$": { - "combine": "AND", - "matchers": [ - { - "match": "type" - } - ] - } - } - }, - { - "index": 1, - "rules": { - "$": { - "combine": "AND", - "matchers": [ - { - "match": "integer" - } - ] - } - } - }, - { - "index": 2, - "rules": { - "$.foo": { - "combine": "AND", - "matchers": [ - { - "match": "type" - } - ] - } - } - } - ] - } - ] - }, - "$.datetime": { - "combine": "AND", - "matchers": [ - { - "match": "regex", - "regex": "[0-9\\-]+" - } - ] - }, - "$.equality": { - "combine": "AND", - "matchers": [ - { - "match": "equality" - } - ] - }, - "$.id": { - "combine": "AND", - "matchers": [ - { - "match": "integer" - } - ] - }, - "$.itemsMin": { - "combine": "AND", - "matchers": [ - { - "match": "type", - "min": 3 - } - ] - }, - "$.itemsMinMax": { - "combine": "AND", - "matchers": [ - { - "match": "type", - "max": 5, - "min": 3 - } - ] - }, - "$.superstring": { - "combine": "AND", - "matchers": [ - { - "match": "include", - "value": "foo" - } - ] - } - }, - "header": {} - }, - "status": 200 - }, - "transport": "http", - "type": "Synchronous/HTTP" - } - ], - "metadata": { - "pactRust": { - "ffi": "0.3.18", - "mockserver": "0.9.8", - "models": "1.0.2" - }, - "pactSpecification": { - "version": "4.0" - } - }, - "provider": { - "name": "V4Provider" - } -} \ No newline at end of file diff --git a/examples/pacts/grpcconsumer-grpcprovider.json b/examples/pacts/grpcconsumer-grpcprovider.json deleted file mode 100644 index ba9afe21c..000000000 --- a/examples/pacts/grpcconsumer-grpcprovider.json +++ /dev/null @@ -1,120 +0,0 @@ -{ - "consumer": { - "name": "grpcconsumer" - }, - "interactions": [ - { - "description": "Route guide - GetFeature", - "interactionMarkup": { - "markup": "```protobuf\nmessage Feature {\n string name = 1;\n message .routeguide.Point location = 2;\n}\n```\n", - "markupType": "COMMON_MARK" - }, - "key": "a5e3ef707bdd24a2", - "pending": false, - "pluginConfiguration": { - "protobuf": { - "descriptorKey": "32f7898819c9f3ece72c5f9de784d705", - "service": "RouteGuide/GetFeature" - } - }, - "providerStates": [ - { - "name": "feature 'Big Tree' exists" - } - ], - "request": { - "contents": { - "content": "CLQBEMgB", - "contentType": "application/protobuf;message=Point", - "contentTypeHint": "BINARY", - "encoded": "base64" - }, - "matchingRules": { - "body": { - "$.latitude": { - "combine": "AND", - "matchers": [ - { - "match": "number" - } - ] - }, - "$.longitude": { - "combine": "AND", - "matchers": [ - { - "match": "number" - } - ] - } - } - } - }, - "response": [ - { - "contents": { - "content": "CghCaWcgVHJlZRIGCLQBEMgB", - "contentType": "application/protobuf;message=Feature", - "contentTypeHint": "BINARY", - "encoded": "base64" - }, - "matchingRules": { - "body": { - "$.location.latitude": { - "combine": "AND", - "matchers": [ - { - "match": "number" - } - ] - }, - "$.location.longitude": { - "combine": "AND", - "matchers": [ - { - "match": "number" - } - ] - }, - "$.name": { - "combine": "AND", - "matchers": [ - { - "match": "type" - } - ] - } - } - } - } - ], - "transport": "grpc", - "type": "Synchronous/Messages" - } - ], - "metadata": { - "pactRust": { - "ffi": "0.3.18", - "mockserver": "0.9.8", - "models": "1.0.2" - }, - "pactSpecification": { - "version": "4.0" - }, - "plugins": [ - { - "configuration": { - "32f7898819c9f3ece72c5f9de784d705": { - "protoDescriptors": "CukGChFyb3V0ZV9ndWlkZS5wcm90bxIKcm91dGVndWlkZSJBCgVQb2ludBIaCghsYXRpdHVkZRgBIAEoBVIIbGF0aXR1ZGUSHAoJbG9uZ2l0dWRlGAIgASgFUglsb25naXR1ZGUiUQoJUmVjdGFuZ2xlEiEKAmxvGAEgASgLMhEucm91dGVndWlkZS5Qb2ludFICbG8SIQoCaGkYAiABKAsyES5yb3V0ZWd1aWRlLlBvaW50UgJoaSJMCgdGZWF0dXJlEhIKBG5hbWUYASABKAlSBG5hbWUSLQoIbG9jYXRpb24YAiABKAsyES5yb3V0ZWd1aWRlLlBvaW50Ughsb2NhdGlvbiJUCglSb3V0ZU5vdGUSLQoIbG9jYXRpb24YASABKAsyES5yb3V0ZWd1aWRlLlBvaW50Ughsb2NhdGlvbhIYCgdtZXNzYWdlGAIgASgJUgdtZXNzYWdlIpMBCgxSb3V0ZVN1bW1hcnkSHwoLcG9pbnRfY291bnQYASABKAVSCnBvaW50Q291bnQSIwoNZmVhdHVyZV9jb3VudBgCIAEoBVIMZmVhdHVyZUNvdW50EhoKCGRpc3RhbmNlGAMgASgFUghkaXN0YW5jZRIhCgxlbGFwc2VkX3RpbWUYBCABKAVSC2VsYXBzZWRUaW1lMoUCCgpSb3V0ZUd1aWRlEjYKCkdldEZlYXR1cmUSES5yb3V0ZWd1aWRlLlBvaW50GhMucm91dGVndWlkZS5GZWF0dXJlIgASPgoMTGlzdEZlYXR1cmVzEhUucm91dGVndWlkZS5SZWN0YW5nbGUaEy5yb3V0ZWd1aWRlLkZlYXR1cmUiADABEj4KC1JlY29yZFJvdXRlEhEucm91dGVndWlkZS5Qb2ludBoYLnJvdXRlZ3VpZGUuUm91dGVTdW1tYXJ5IgAoARI/CglSb3V0ZUNoYXQSFS5yb3V0ZWd1aWRlLlJvdXRlTm90ZRoVLnJvdXRlZ3VpZGUuUm91dGVOb3RlIgAoATABQmgKG2lvLmdycGMuZXhhbXBsZXMucm91dGVndWlkZUIPUm91dGVHdWlkZVByb3RvUAFaNmdvb2dsZS5nb2xhbmcub3JnL2dycGMvZXhhbXBsZXMvcm91dGVfZ3VpZGUvcm91dGVndWlkZWIGcHJvdG8z", - "protoFile": "// Copyright 2015 gRPC authors.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nsyntax = \"proto3\";\n\noption go_package = \"google.golang.org/grpc/examples/route_guide/routeguide\";\noption java_multiple_files = true;\noption java_package = \"io.grpc.examples.routeguide\";\noption java_outer_classname = \"RouteGuideProto\";\n\npackage routeguide;\n\n// Interface exported by the server.\nservice RouteGuide {\n // A simple RPC.\n //\n // Obtains the feature at a given position.\n //\n // A feature with an empty name is returned if there's no feature at the given\n // position.\n rpc GetFeature(Point) returns (Feature) {}\n\n // A server-to-client streaming RPC.\n //\n // Obtains the Features available within the given Rectangle. Results are\n // streamed rather than returned at once (e.g. in a response message with a\n // repeated field), as the rectangle may cover a large area and contain a\n // huge number of features.\n rpc ListFeatures(Rectangle) returns (stream Feature) {}\n\n // A client-to-server streaming RPC.\n //\n // Accepts a stream of Points on a route being traversed, returning a\n // RouteSummary when traversal is completed.\n rpc RecordRoute(stream Point) returns (RouteSummary) {}\n\n // A Bidirectional streaming RPC.\n //\n // Accepts a stream of RouteNotes sent while a route is being traversed,\n // while receiving other RouteNotes (e.g. from other users).\n rpc RouteChat(stream RouteNote) returns (stream RouteNote) {}\n}\n\n// Points are represented as latitude-longitude pairs in the E7 representation\n// (degrees multiplied by 10**7 and rounded to the nearest integer).\n// Latitudes should be in the range +/- 90 degrees and longitude should be in\n// the range +/- 180 degrees (inclusive).\nmessage Point {\n int32 latitude = 1;\n int32 longitude = 2;\n}\n\n// A latitude-longitude rectangle, represented as two diagonally opposite\n// points \"lo\" and \"hi\".\nmessage Rectangle {\n // One corner of the rectangle.\n Point lo = 1;\n\n // The other corner of the rectangle.\n Point hi = 2;\n}\n\n// A feature names something at a given point.\n//\n// If a feature could not be named, the name is empty.\nmessage Feature {\n // The name of the feature.\n string name = 1;\n\n // The point where the feature is detected.\n Point location = 2;\n}\n\n// A RouteNote is a message sent while at a given point.\nmessage RouteNote {\n // The location from which the message is sent.\n Point location = 1;\n\n // The message to be sent.\n string message = 2;\n}\n\n// A RouteSummary is received in response to a RecordRoute rpc.\n//\n// It contains the number of individual points received, the number of\n// detected features, and the total distance covered as the cumulative sum of\n// the distance between each point.\nmessage RouteSummary {\n // The number of points received.\n int32 point_count = 1;\n\n // The number of known features passed while traversing the route.\n int32 feature_count = 2;\n\n // The distance covered in metres.\n int32 distance = 3;\n\n // The duration of the traversal in seconds.\n int32 elapsed_time = 4;\n}\n" - } - }, - "name": "protobuf", - "version": "0.2.4" - } - ] - }, - "provider": { - "name": "grpcprovider" - } -} \ No newline at end of file diff --git a/examples/pacts/matttcpconsumer-matttcpprovider.json b/examples/pacts/matttcpconsumer-matttcpprovider.json deleted file mode 100644 index 3774ae6f4..000000000 --- a/examples/pacts/matttcpconsumer-matttcpprovider.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "consumer": { - "name": "matttcpconsumer" - }, - "interactions": [ - { - "description": "Matt message", - "key": "1d2254a9979327d8", - "pending": false, - "providerStates": [ - { - "name": "the world exists" - } - ], - "request": { - "contents": { - "content": "MATThellotcpMATT", - "contentType": "application/matt", - "contentTypeHint": "DEFAULT", - "encoded": false - } - }, - "response": [ - { - "contents": { - "content": "MATTtcpworldMATT", - "contentType": "application/matt", - "contentTypeHint": "DEFAULT", - "encoded": false - } - } - ], - "transport": "matt", - "type": "Synchronous/Messages" - } - ], - "metadata": { - "pactRust": { - "ffi": "0.3.18", - "mockserver": "0.9.8", - "models": "1.0.2" - }, - "pactSpecification": { - "version": "4.0" - }, - "plugins": [ - { - "configuration": {}, - "name": "matt", - "version": "0.0.7" - } - ] - }, - "provider": { - "name": "matttcpprovider" - } -} \ No newline at end of file From db87b6f1df1fe768a5ca9ff70a7d9d6637cc714d Mon Sep 17 00:00:00 2001 From: Yousaf Nabi Date: Fri, 19 Jan 2024 11:40:41 +0000 Subject: [PATCH 09/19] chore: dg avro 0.0.3 --- examples/avro/avro_consumer_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/avro/avro_consumer_test.go b/examples/avro/avro_consumer_test.go index 3e590d448..70836d814 100644 --- a/examples/avro/avro_consumer_test.go +++ b/examples/avro/avro_consumer_test.go @@ -45,7 +45,7 @@ func TestAvroHTTP(t *testing.T) { UponReceiving("A request to do get some Avro stuff"). UsingPlugin(consumer.PluginConfig{ Plugin: "avro", - Version: "0.0.4", + Version: "0.0.3", }). WithRequest("GET", "/avro"). WillRespondWith(200, func(res *consumer.V4InteractionWithPluginResponseBuilder) { From dea40946b8f2f495bf72c76058af77abf0554b3e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 19 Jan 2024 11:57:44 +0000 Subject: [PATCH 10/19] build(deps): bump actions/setup-go from 4 to 5 Bumps [actions/setup-go](https://github.com/actions/setup-go) from 4 to 5. - [Release notes](https://github.com/actions/setup-go/releases) - [Commits](https://github.com/actions/setup-go/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/setup-go dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/golangci-lint.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/test.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 033437734..0f54765c8 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -24,7 +24,7 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - name: Install Go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: go-version: ${{ matrix.go-version }} - name: golangci-lint diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 993b7b726..8dffae074 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,7 +16,7 @@ jobs: fetch-depth: 0 - name: Set up Go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: go-version: 1.20 - diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 372ec6554..8837c21e6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -29,7 +29,7 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - name: Install Go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: go-version: ${{ matrix.go-version }} - uses: actions/setup-java@v3 # Needed for the Avro example From 47ce5849c6b109181783d0ba404a32ec594bc704 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 19 Jan 2024 11:58:59 +0000 Subject: [PATCH 11/19] build(deps): bump github.com/spf13/cobra from 1.7.0 to 1.8.0 Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.7.0 to 1.8.0. - [Release notes](https://github.com/spf13/cobra/releases) - [Commits](https://github.com/spf13/cobra/compare/v1.7.0...v1.8.0) --- updated-dependencies: - dependency-name: github.com/spf13/cobra dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index 3f92f9916..a150cb80d 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/hashicorp/logutils v1.0.0 github.com/linkedin/goavro/v2 v2.12.0 github.com/spf13/afero v1.9.5 - github.com/spf13/cobra v1.7.0 + github.com/spf13/cobra v1.8.0 github.com/stretchr/testify v1.8.4 google.golang.org/grpc v1.58.1 google.golang.org/protobuf v1.31.0 diff --git a/go.sum b/go.sum index 4c7b62791..3c73501e8 100644 --- a/go.sum +++ b/go.sum @@ -214,7 +214,7 @@ github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= @@ -394,8 +394,8 @@ github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQD github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.9.5 h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM= github.com/spf13/afero v1.9.5/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= -github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= -github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= +github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= +github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= From bc702803459e0ea8c981b7d277ad0c89f4b0e092 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 19 Jan 2024 11:58:19 +0000 Subject: [PATCH 12/19] build(deps): bump github.com/hashicorp/go-getter from 1.7.2 to 1.7.3 Bumps [github.com/hashicorp/go-getter](https://github.com/hashicorp/go-getter) from 1.7.2 to 1.7.3. - [Release notes](https://github.com/hashicorp/go-getter/releases) - [Changelog](https://github.com/hashicorp/go-getter/blob/main/.goreleaser.yml) - [Commits](https://github.com/hashicorp/go-getter/compare/v1.7.2...v1.7.3) --- updated-dependencies: - dependency-name: github.com/hashicorp/go-getter dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index a150cb80d..1fb83789b 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.20 require ( github.com/golang/protobuf v1.5.3 - github.com/hashicorp/go-getter v1.7.2 + github.com/hashicorp/go-getter v1.7.3 github.com/hashicorp/go-version v1.6.0 github.com/hashicorp/logutils v1.0.0 github.com/linkedin/goavro/v2 v2.12.0 diff --git a/go.sum b/go.sum index 3c73501e8..478bc256d 100644 --- a/go.sum +++ b/go.sum @@ -338,8 +338,8 @@ github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8 github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= -github.com/hashicorp/go-getter v1.7.2 h1:uJDtyXwEfalmp1PqdxuhZqrNkUyClZAhVeZYTArbqkg= -github.com/hashicorp/go-getter v1.7.2/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= +github.com/hashicorp/go-getter v1.7.3 h1:bN2+Fw9XPFvOCjB0UOevFIMICZ7G2XSQHzfvLUyOM5E= +github.com/hashicorp/go-getter v1.7.3/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= github.com/hashicorp/go-safetemp v1.0.0 h1:2HR189eFNrjHQyENnQMMpCiBAsRxzbTMIgBhEyExpmo= github.com/hashicorp/go-safetemp v1.0.0/go.mod h1:oaerMy3BhqiTbVye6QuFhFtIceqFoDHxNAB65b+Rj1I= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= From e7a60569d5133b04a7d6365a0e7c79b8add2cc7b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 19 Jan 2024 11:59:10 +0000 Subject: [PATCH 13/19] build(deps): bump golang.org/x/net from 0.12.0 to 0.17.0 Bumps [golang.org/x/net](https://github.com/golang/net) from 0.12.0 to 0.17.0. - [Commits](https://github.com/golang/net/compare/v0.12.0...v0.17.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: indirect ... Signed-off-by: dependabot[bot] --- go.mod | 8 ++++---- go.sum | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/go.mod b/go.mod index 1fb83789b..55b1b03b5 100644 --- a/go.mod +++ b/go.mod @@ -45,12 +45,12 @@ require ( github.com/spf13/pflag v1.0.5 // indirect github.com/ulikunitz/xz v0.5.11 // indirect go.opencensus.io v0.24.0 // indirect - golang.org/x/crypto v0.11.0 // indirect - golang.org/x/net v0.12.0 // indirect + golang.org/x/crypto v0.14.0 // indirect + golang.org/x/net v0.17.0 // indirect golang.org/x/oauth2 v0.10.0 // indirect golang.org/x/sync v0.3.0 // indirect - golang.org/x/sys v0.10.0 // indirect - golang.org/x/text v0.11.0 // indirect + golang.org/x/sys v0.13.0 // indirect + golang.org/x/text v0.13.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect google.golang.org/api v0.130.0 // indirect google.golang.org/appengine v1.6.7 // indirect diff --git a/go.sum b/go.sum index 478bc256d..43ed9fe72 100644 --- a/go.sum +++ b/go.sum @@ -439,8 +439,8 @@ golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220314234659-1baeb1ce4c0b/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= -golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= +golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= +golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -526,8 +526,8 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.12.0 h1:cfawfvKITfUsFCeJIHJrbSxpeu/E81khclypR0GVT50= -golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= +golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= +golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -636,8 +636,8 @@ golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA= -golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= +golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -652,8 +652,8 @@ golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.11.0 h1:LAntKIrcmeSKERyiOh0XMV39LXS8IE9UL2yP7+f5ij4= -golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= From 176a00b55de5de588401311a61931a3329d953b4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 19 Jan 2024 12:12:59 +0000 Subject: [PATCH 14/19] build(deps): bump google.golang.org/grpc from 1.58.1 to 1.60.1 Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.58.1 to 1.60.1. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](https://github.com/grpc/grpc-go/compare/v1.58.1...v1.60.1) --- updated-dependencies: - dependency-name: google.golang.org/grpc dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 23 +++++++++++------------ go.sum | 42 ++++++++++++++++++++++-------------------- 2 files changed, 33 insertions(+), 32 deletions(-) diff --git a/go.mod b/go.mod index 55b1b03b5..79bd641fa 100644 --- a/go.mod +++ b/go.mod @@ -11,25 +11,24 @@ require ( github.com/spf13/afero v1.9.5 github.com/spf13/cobra v1.8.0 github.com/stretchr/testify v1.8.4 - google.golang.org/grpc v1.58.1 + google.golang.org/grpc v1.60.1 google.golang.org/protobuf v1.31.0 gopkg.in/yaml.v2 v2.4.0 ) require ( - cloud.google.com/go v0.110.4 // indirect - cloud.google.com/go/compute v1.21.0 // indirect + cloud.google.com/go v0.110.8 // indirect + cloud.google.com/go/compute v1.23.0 // indirect cloud.google.com/go/compute/metadata v0.2.3 // indirect - cloud.google.com/go/iam v1.1.1 // indirect + cloud.google.com/go/iam v1.1.2 // indirect cloud.google.com/go/storage v1.31.0 // indirect github.com/aws/aws-sdk-go v1.44.298 // indirect github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/snappy v0.0.4 // indirect - github.com/google/go-cmp v0.5.9 // indirect github.com/google/s2a-go v0.1.4 // indirect - github.com/google/uuid v1.3.0 // indirect + github.com/google/uuid v1.3.1 // indirect github.com/googleapis/enterprise-certificate-proxy v0.2.5 // indirect github.com/googleapis/gax-go/v2 v2.12.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect @@ -47,16 +46,16 @@ require ( go.opencensus.io v0.24.0 // indirect golang.org/x/crypto v0.14.0 // indirect golang.org/x/net v0.17.0 // indirect - golang.org/x/oauth2 v0.10.0 // indirect - golang.org/x/sync v0.3.0 // indirect + golang.org/x/oauth2 v0.13.0 // indirect + golang.org/x/sync v0.4.0 // indirect golang.org/x/sys v0.13.0 // indirect golang.org/x/text v0.13.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect google.golang.org/api v0.130.0 // indirect - google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect + google.golang.org/appengine v1.6.8 // indirect + google.golang.org/genproto v0.0.0-20231002182017-d307bd883b97 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20231002182017-d307bd883b97 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20231002182017-d307bd883b97 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 43ed9fe72..14c287255 100644 --- a/go.sum +++ b/go.sum @@ -32,8 +32,8 @@ cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w9 cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34hIU= cloud.google.com/go v0.104.0/go.mod h1:OO6xxXdJyvuJPcEPBLN9BJPD+jep5G1+2U5B5gkRYtA= -cloud.google.com/go v0.110.4 h1:1JYyxKMN9hd5dR2MYTPWkGUgcoxVVhg0LKNKEo0qvmk= -cloud.google.com/go v0.110.4/go.mod h1:+EYjdK8e5RME/VY/qLCAtuyALQ9q67dvuum8i+H5xsI= +cloud.google.com/go v0.110.8 h1:tyNdfIxjzaWctIiLYOTalaLKZ17SI44SKFW26QbOhME= +cloud.google.com/go v0.110.8/go.mod h1:Iz8AkXJf1qmxC3Oxoep8R1T36w8B92yU29PcBhHO5fk= cloud.google.com/go/aiplatform v1.22.0/go.mod h1:ig5Nct50bZlzV6NvKaTwmplLLddFx0YReh9WfTO5jKw= cloud.google.com/go/aiplatform v1.24.0/go.mod h1:67UUvRBKG6GTayHKV8DBv2RtR1t93YRu5B1P3x99mYY= cloud.google.com/go/analytics v0.11.0/go.mod h1:DjEWCu41bVbYcKyvlws9Er60YE4a//bK6mnhWvQeFNI= @@ -70,8 +70,8 @@ cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= cloud.google.com/go/compute v1.10.0/go.mod h1:ER5CLbMxl90o2jtNbGSbtfOpQKR0t15FOtRsugnLrlU= -cloud.google.com/go/compute v1.21.0 h1:JNBsyXVoOoNJtTQcnEY5uYpZIbeCTYIeDe0Xh1bySMk= -cloud.google.com/go/compute v1.21.0/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= +cloud.google.com/go/compute v1.23.0 h1:tP41Zoavr8ptEqaW6j+LQOnyBBhO7OkOMAGrgLopTwY= +cloud.google.com/go/compute v1.23.0/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= cloud.google.com/go/containeranalysis v0.5.1/go.mod h1:1D92jd8gRR/c0fGMlymRgxWD3Qw9C1ff6/T7mLgVL8I= @@ -111,8 +111,8 @@ cloud.google.com/go/gkehub v0.10.0/go.mod h1:UIPwxI0DsrpsVoWpLB0stwKCP+WFVG9+y97 cloud.google.com/go/grafeas v0.2.0/go.mod h1:KhxgtF2hb0P191HlY5besjYm6MqTSTj3LSI+M+ByZHc= cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= cloud.google.com/go/iam v0.5.0/go.mod h1:wPU9Vt0P4UmCux7mqtRu6jcpPAb74cP1fh50J3QpkUc= -cloud.google.com/go/iam v1.1.1 h1:lW7fzj15aVIXYHREOqjRBV9PsH0Z6u8Y46a1YGvQP4Y= -cloud.google.com/go/iam v1.1.1/go.mod h1:A5avdyVL2tCppe4unb0951eI9jreack+RJ0/d+KUZOU= +cloud.google.com/go/iam v1.1.2 h1:gacbrBdWcoVmGLozRuStX45YKvJtzIjJdAolzUs1sm4= +cloud.google.com/go/iam v1.1.2/go.mod h1:A5avdyVL2tCppe4unb0951eI9jreack+RJ0/d+KUZOU= cloud.google.com/go/language v1.4.0/go.mod h1:F9dRpNFQmJbkaop6g0JhSBXCNlO90e1KWx5iDdxbWic= cloud.google.com/go/language v1.6.0/go.mod h1:6dJ8t3B+lUYfStgls25GusK04NLh3eDLQnWM3mdEbhI= cloud.google.com/go/lifesciences v0.5.0/go.mod h1:3oIKy8ycWGPUyZDR/8RNnTOYevhaMLqh5vLUXs9zvT8= @@ -315,8 +315,9 @@ github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm4 github.com/google/s2a-go v0.1.4 h1:1kZ/sQM3srePvKs3tXAvQzo66XfcReoqFpIpIccE7Oc= github.com/google/s2a-go v0.1.4/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= +github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg= @@ -553,8 +554,8 @@ golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A= -golang.org/x/oauth2 v0.10.0 h1:zHCpF2Khkwy4mMB4bv0U37YtJdTGW8jI0glAApi0Kh8= -golang.org/x/oauth2 v0.10.0/go.mod h1:kTpgurOux7LqtuxjuyZa4Gj2gdezIt/jQtGnNFfypQI= +golang.org/x/oauth2 v0.13.0 h1:jDDenyj+WgFtmV3zYVoi8aE2BwtXFLWOA67ZfNWftiY= +golang.org/x/oauth2 v0.13.0/go.mod h1:/JMhi4ZRXAf4HG9LiNmxvk+45+96RUlVThiH8FzNBn0= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -569,8 +570,8 @@ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= -golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= +golang.org/x/sync v0.4.0 h1:zxkM55ReGkDlKSM+Fu41A+zmbZuaPVbGMzvvdUPznYQ= +golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -775,8 +776,9 @@ google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= +google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -880,12 +882,12 @@ google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e/go.mod h1:3526vdqw google.golang.org/genproto v0.0.0-20221014173430-6e2ab493f96b/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= google.golang.org/genproto v0.0.0-20221025140454-527a21cfbd71/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= -google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98 h1:Z0hjGZePRE0ZBWotvtrwxFNrNE9CUAGtplaDK5NNI/g= -google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98/go.mod h1:S7mY02OqCJTD0E1OiQy1F72PWFB4bZJ87cAtLPYgDR0= -google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98 h1:FmF5cCW94Ij59cfpoLiwTgodWmm60eEV0CjlsVg2fuw= -google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98/go.mod h1:rsr7RhLuwsDKL7RmgDDCUc6yaGr1iqceVb5Wv6f6YvQ= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 h1:bVf09lpb+OJbByTj913DRJioFFAjf/ZGxEz7MajTp2U= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= +google.golang.org/genproto v0.0.0-20231002182017-d307bd883b97 h1:SeZZZx0cP0fqUyA+oRzP9k7cSwJlvDFiROO72uwD6i0= +google.golang.org/genproto v0.0.0-20231002182017-d307bd883b97/go.mod h1:t1VqOqqvce95G3hIDCT5FeO3YUc6Q4Oe24L/+rNMxRk= +google.golang.org/genproto/googleapis/api v0.0.0-20231002182017-d307bd883b97 h1:W18sezcAYs+3tDZX4F80yctqa12jcP1PUS2gQu1zTPU= +google.golang.org/genproto/googleapis/api v0.0.0-20231002182017-d307bd883b97/go.mod h1:iargEX0SFPm3xcfMI0d1domjg0ZF4Aa0p2awqyxhvF0= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231002182017-d307bd883b97 h1:6GQBEOdGkX6MMTLT9V+TjtIRZCw9VPD5Z+yHY9wMgS0= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231002182017-d307bd883b97/go.mod h1:v7nGkzlmW8P3n/bKmWBn2WpBjpOEx8Q6gMueudAmKfY= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -921,8 +923,8 @@ google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACu google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.58.1 h1:OL+Vz23DTtrrldqHK49FUOPHyY75rvFqJfXC84NYW58= -google.golang.org/grpc v1.58.1/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= +google.golang.org/grpc v1.60.1 h1:26+wFr+cNqSGFcOXcabYC0lUVJVRa2Sb2ortSK7VrEU= +google.golang.org/grpc v1.60.1/go.mod h1:OlCHIeLYqSSsLi6i49B5QGdzaMZK9+M7LXN2FKz4eGM= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= From 73cf6881318d56a4cbb14ded1e516ff716346b37 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 19 Jan 2024 11:57:27 +0000 Subject: [PATCH 15/19] build(deps): bump actions/setup-java from 3 to 4 Bumps [actions/setup-java](https://github.com/actions/setup-java) from 3 to 4. - [Release notes](https://github.com/actions/setup-java/releases) - [Commits](https://github.com/actions/setup-java/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/setup-java dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8837c21e6..cb6f62d3c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -32,7 +32,7 @@ jobs: uses: actions/setup-go@v5 with: go-version: ${{ matrix.go-version }} - - uses: actions/setup-java@v3 # Needed for the Avro example + - uses: actions/setup-java@v4 # Needed for the Avro example with: distribution: 'zulu' java-version: '17' From eb6782deb7c060c9bcf39e4f124314da22960123 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 19 Jan 2024 12:21:27 +0000 Subject: [PATCH 16/19] build(deps): bump github.com/spf13/afero from 1.9.5 to 1.11.0 Bumps [github.com/spf13/afero](https://github.com/spf13/afero) from 1.9.5 to 1.11.0. - [Release notes](https://github.com/spf13/afero/releases) - [Commits](https://github.com/spf13/afero/compare/v1.9.5...v1.11.0) --- updated-dependencies: - dependency-name: github.com/spf13/afero dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 37 +++++++++++------------ go.sum | 93 ++++++++++++++++++++++++---------------------------------- 2 files changed, 58 insertions(+), 72 deletions(-) diff --git a/go.mod b/go.mod index 79bd641fa..75585379a 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/hashicorp/go-version v1.6.0 github.com/hashicorp/logutils v1.0.0 github.com/linkedin/goavro/v2 v2.12.0 - github.com/spf13/afero v1.9.5 + github.com/spf13/afero v1.11.0 github.com/spf13/cobra v1.8.0 github.com/stretchr/testify v1.8.4 google.golang.org/grpc v1.60.1 @@ -17,19 +17,19 @@ require ( ) require ( - cloud.google.com/go v0.110.8 // indirect - cloud.google.com/go/compute v1.23.0 // indirect + cloud.google.com/go v0.110.10 // indirect + cloud.google.com/go/compute v1.23.3 // indirect cloud.google.com/go/compute/metadata v0.2.3 // indirect - cloud.google.com/go/iam v1.1.2 // indirect - cloud.google.com/go/storage v1.31.0 // indirect + cloud.google.com/go/iam v1.1.5 // indirect + cloud.google.com/go/storage v1.35.1 // indirect github.com/aws/aws-sdk-go v1.44.298 // indirect github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/snappy v0.0.4 // indirect - github.com/google/s2a-go v0.1.4 // indirect - github.com/google/uuid v1.3.1 // indirect - github.com/googleapis/enterprise-certificate-proxy v0.2.5 // indirect + github.com/google/s2a-go v0.1.7 // indirect + github.com/google/uuid v1.4.0 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect github.com/googleapis/gax-go/v2 v2.12.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-safetemp v1.0.0 // indirect @@ -44,18 +44,19 @@ require ( github.com/spf13/pflag v1.0.5 // indirect github.com/ulikunitz/xz v0.5.11 // indirect go.opencensus.io v0.24.0 // indirect - golang.org/x/crypto v0.14.0 // indirect - golang.org/x/net v0.17.0 // indirect - golang.org/x/oauth2 v0.13.0 // indirect - golang.org/x/sync v0.4.0 // indirect - golang.org/x/sys v0.13.0 // indirect - golang.org/x/text v0.13.0 // indirect + golang.org/x/crypto v0.16.0 // indirect + golang.org/x/net v0.19.0 // indirect + golang.org/x/oauth2 v0.15.0 // indirect + golang.org/x/sync v0.5.0 // indirect + golang.org/x/sys v0.15.0 // indirect + golang.org/x/text v0.14.0 // indirect + golang.org/x/time v0.5.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect - google.golang.org/api v0.130.0 // indirect + google.golang.org/api v0.152.0 // indirect google.golang.org/appengine v1.6.8 // indirect - google.golang.org/genproto v0.0.0-20231002182017-d307bd883b97 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20231002182017-d307bd883b97 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20231002182017-d307bd883b97 // indirect + google.golang.org/genproto v0.0.0-20231106174013-bbf56f31fb17 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 14c287255..c2799d27b 100644 --- a/go.sum +++ b/go.sum @@ -3,7 +3,6 @@ cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= @@ -16,7 +15,6 @@ cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOY cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= @@ -32,8 +30,8 @@ cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w9 cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34hIU= cloud.google.com/go v0.104.0/go.mod h1:OO6xxXdJyvuJPcEPBLN9BJPD+jep5G1+2U5B5gkRYtA= -cloud.google.com/go v0.110.8 h1:tyNdfIxjzaWctIiLYOTalaLKZ17SI44SKFW26QbOhME= -cloud.google.com/go v0.110.8/go.mod h1:Iz8AkXJf1qmxC3Oxoep8R1T36w8B92yU29PcBhHO5fk= +cloud.google.com/go v0.110.10 h1:LXy9GEO+timppncPIAZoOj3l58LIU9k+kn48AN7IO3Y= +cloud.google.com/go v0.110.10/go.mod h1:v1OoFqYxiBkUrruItNM3eT4lLByNjxmJSV/xDKJNnic= cloud.google.com/go/aiplatform v1.22.0/go.mod h1:ig5Nct50bZlzV6NvKaTwmplLLddFx0YReh9WfTO5jKw= cloud.google.com/go/aiplatform v1.24.0/go.mod h1:67UUvRBKG6GTayHKV8DBv2RtR1t93YRu5B1P3x99mYY= cloud.google.com/go/analytics v0.11.0/go.mod h1:DjEWCu41bVbYcKyvlws9Er60YE4a//bK6mnhWvQeFNI= @@ -70,8 +68,8 @@ cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= cloud.google.com/go/compute v1.10.0/go.mod h1:ER5CLbMxl90o2jtNbGSbtfOpQKR0t15FOtRsugnLrlU= -cloud.google.com/go/compute v1.23.0 h1:tP41Zoavr8ptEqaW6j+LQOnyBBhO7OkOMAGrgLopTwY= -cloud.google.com/go/compute v1.23.0/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= +cloud.google.com/go/compute v1.23.3 h1:6sVlXXBmbd7jNX0Ipq0trII3e4n1/MsADLK6a+aiVlk= +cloud.google.com/go/compute v1.23.3/go.mod h1:VCgBUoMnIVIR0CscqQiPJLAG25E3ZRZMzcFZeQ+h8CI= cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= cloud.google.com/go/containeranalysis v0.5.1/go.mod h1:1D92jd8gRR/c0fGMlymRgxWD3Qw9C1ff6/T7mLgVL8I= @@ -111,8 +109,8 @@ cloud.google.com/go/gkehub v0.10.0/go.mod h1:UIPwxI0DsrpsVoWpLB0stwKCP+WFVG9+y97 cloud.google.com/go/grafeas v0.2.0/go.mod h1:KhxgtF2hb0P191HlY5besjYm6MqTSTj3LSI+M+ByZHc= cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= cloud.google.com/go/iam v0.5.0/go.mod h1:wPU9Vt0P4UmCux7mqtRu6jcpPAb74cP1fh50J3QpkUc= -cloud.google.com/go/iam v1.1.2 h1:gacbrBdWcoVmGLozRuStX45YKvJtzIjJdAolzUs1sm4= -cloud.google.com/go/iam v1.1.2/go.mod h1:A5avdyVL2tCppe4unb0951eI9jreack+RJ0/d+KUZOU= +cloud.google.com/go/iam v1.1.5 h1:1jTsCu4bcsNsE4iiqNT5SHwrDRCfRmIaaaVFhRveTJI= +cloud.google.com/go/iam v1.1.5/go.mod h1:rB6P/Ic3mykPbFio+vo7403drjlgvoWfYpJhMXEbzv8= cloud.google.com/go/language v1.4.0/go.mod h1:F9dRpNFQmJbkaop6g0JhSBXCNlO90e1KWx5iDdxbWic= cloud.google.com/go/language v1.6.0/go.mod h1:6dJ8t3B+lUYfStgls25GusK04NLh3eDLQnWM3mdEbhI= cloud.google.com/go/lifesciences v0.5.0/go.mod h1:3oIKy8ycWGPUyZDR/8RNnTOYevhaMLqh5vLUXs9zvT8= @@ -170,12 +168,11 @@ cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0Zeo cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= cloud.google.com/go/storage v1.22.1/go.mod h1:S8N1cAStu7BOeFfE8KAQzmyyLkK8p/vmRq6kuBTW58Y= cloud.google.com/go/storage v1.23.0/go.mod h1:vOEEDNFnciUMhBeT6hsJIn3ieU5cFRmzeLgDvXzfIXc= cloud.google.com/go/storage v1.27.0/go.mod h1:x9DOL8TK/ygDUMieqwfhdpQryTeEkhGKMi80i/iqR2s= -cloud.google.com/go/storage v1.31.0 h1:+S3LjjEN2zZ+L5hOwj4+1OkGCsLVe0NzpXKQ1pSdTCI= -cloud.google.com/go/storage v1.31.0/go.mod h1:81ams1PrhW16L4kF7qg+4mTq7SRs5HsbDTM0bWvrwJ0= +cloud.google.com/go/storage v1.35.1 h1:B59ahL//eDfx2IIKFBeT5Atm9wnNmj3+8xG/W4WB//w= +cloud.google.com/go/storage v1.35.1/go.mod h1:M6M/3V/D3KpzMTJyPOR/HU6n2Si5QdaXYEsng2xgOs8= cloud.google.com/go/talent v1.1.0/go.mod h1:Vl4pt9jiHKvOgF9KoZo6Kob9oV4lwd/ZD5Cto54zDRw= cloud.google.com/go/talent v1.2.0/go.mod h1:MoNF9bhFQbiJ6eFD3uSsg0uBALw4n4gaCaEjBw9zo8g= cloud.google.com/go/videointelligence v1.6.0/go.mod h1:w0DIDlVRKtwPCn/C4iwZIJdvC69yInhW0cfi+p546uU= @@ -288,8 +285,8 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= @@ -305,24 +302,23 @@ github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/s2a-go v0.1.4 h1:1kZ/sQM3srePvKs3tXAvQzo66XfcReoqFpIpIccE7Oc= -github.com/google/s2a-go v0.1.4/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= +github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= +github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= -github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= +github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg= -github.com/googleapis/enterprise-certificate-proxy v0.2.5 h1:UR4rDjcgpgEnqpIEvkiqTYKBCKLNmlge2eVjoZfySzM= -github.com/googleapis/enterprise-certificate-proxy v0.2.5/go.mod h1:RxW0N9901Cko1VOCW3SXCpWP+mlIEkk2tP7jnHy9a3w= +github.com/googleapis/enterprise-certificate-proxy v0.3.2 h1:Vie5ybvEvT75RniqhfFxPRy3Bf7vr3h0cechB90XaQs= +github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= @@ -335,7 +331,6 @@ github.com/googleapis/gax-go/v2 v2.6.0/go.mod h1:1mjbznJAPHFpesgE5ucqfYEscaz5kMd github.com/googleapis/gax-go/v2 v2.12.0 h1:A+gCJKdRfqXkr+BIRGtZLibNXf0m1f9E4HG56etFpas= github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU= github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= -github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= @@ -363,7 +358,6 @@ github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+o github.com/klauspost/compress v1.15.11/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= github.com/klauspost/compress v1.16.7 h1:2mk3MPGNzKyxErAw8YaohYh69+pa4sIQSC0fPGCFR9I= github.com/klauspost/compress v1.16.7/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= -github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= @@ -382,7 +376,6 @@ github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrk github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU= github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -393,8 +386,8 @@ github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZV github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/afero v1.9.5 h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM= -github.com/spf13/afero v1.9.5/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= +github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= +github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= @@ -436,12 +429,9 @@ golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20220314234659-1baeb1ce4c0b/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= -golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= +golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY= +golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -508,13 +498,11 @@ golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= @@ -527,8 +515,8 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= -golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= +golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -554,8 +542,8 @@ golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A= -golang.org/x/oauth2 v0.13.0 h1:jDDenyj+WgFtmV3zYVoi8aE2BwtXFLWOA67ZfNWftiY= -golang.org/x/oauth2 v0.13.0/go.mod h1:/JMhi4ZRXAf4HG9LiNmxvk+45+96RUlVThiH8FzNBn0= +golang.org/x/oauth2 v0.15.0 h1:s8pnnxNVzjWyrvYdFUQq5llS1PX2zhPXmccZv99h7uQ= +golang.org/x/oauth2 v0.15.0/go.mod h1:q48ptWNTY5XWf+JNten23lcvHpLJ0ZSxF5ttTHKVCAM= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -570,8 +558,8 @@ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.4.0 h1:zxkM55ReGkDlKSM+Fu41A+zmbZuaPVbGMzvvdUPznYQ= -golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= +golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= +golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -604,13 +592,11 @@ golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -637,8 +623,8 @@ golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= -golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= +golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -653,11 +639,13 @@ golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= +golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -703,7 +691,6 @@ golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= @@ -768,8 +755,8 @@ google.golang.org/api v0.96.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ google.golang.org/api v0.97.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= google.golang.org/api v0.98.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= google.golang.org/api v0.100.0/go.mod h1:ZE3Z2+ZOr87Rx7dqFsdRQkRBk36kDtp/h+QpHbB7a70= -google.golang.org/api v0.130.0 h1:A50ujooa1h9iizvfzA4rrJr2B7uRmWexwbekQ2+5FPQ= -google.golang.org/api v0.130.0/go.mod h1:J/LCJMYSDFvAVREGCbrESb53n4++NMBDetSHGL5I5RY= +google.golang.org/api v0.152.0 h1:t0r1vPnfMc260S2Ci+en7kfCZaLOPs5KI0sVV/6jZrY= +google.golang.org/api v0.152.0/go.mod h1:3qNJX5eOmhiWYc67jRA/3GsDw97UFb5ivv7Y2PrriAY= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -814,9 +801,7 @@ google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= @@ -882,12 +867,12 @@ google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e/go.mod h1:3526vdqw google.golang.org/genproto v0.0.0-20221014173430-6e2ab493f96b/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= google.golang.org/genproto v0.0.0-20221025140454-527a21cfbd71/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= -google.golang.org/genproto v0.0.0-20231002182017-d307bd883b97 h1:SeZZZx0cP0fqUyA+oRzP9k7cSwJlvDFiROO72uwD6i0= -google.golang.org/genproto v0.0.0-20231002182017-d307bd883b97/go.mod h1:t1VqOqqvce95G3hIDCT5FeO3YUc6Q4Oe24L/+rNMxRk= -google.golang.org/genproto/googleapis/api v0.0.0-20231002182017-d307bd883b97 h1:W18sezcAYs+3tDZX4F80yctqa12jcP1PUS2gQu1zTPU= -google.golang.org/genproto/googleapis/api v0.0.0-20231002182017-d307bd883b97/go.mod h1:iargEX0SFPm3xcfMI0d1domjg0ZF4Aa0p2awqyxhvF0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231002182017-d307bd883b97 h1:6GQBEOdGkX6MMTLT9V+TjtIRZCw9VPD5Z+yHY9wMgS0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231002182017-d307bd883b97/go.mod h1:v7nGkzlmW8P3n/bKmWBn2WpBjpOEx8Q6gMueudAmKfY= +google.golang.org/genproto v0.0.0-20231106174013-bbf56f31fb17 h1:wpZ8pe2x1Q3f2KyT5f8oP/fa9rHAKgFPr/HZdNuS+PQ= +google.golang.org/genproto v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:J7XzRzVy1+IPwWHZUzoD0IccYZIrXILAQpc+Qy9CMhY= +google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17 h1:JpwMPBpFN3uKhdaekDpiNlImDdkUAyiJ6ez/uxGaUSo= +google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:0xJLfVdJqpAPl8tDg1ujOCGzx6LFLttXT5NhllGOXY4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f h1:ultW7fxlIvee4HYrtnaRPon9HpEgFk5zYpmfMgtKB5I= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f/go.mod h1:L9KNLi232K1/xB6f7AlSX692koaRnKaWSR0stBki0Yc= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= From a97be4984d55615edfbefb2a37a6f344fcbc060c Mon Sep 17 00:00:00 2001 From: snyk-bot Date: Wed, 10 Jan 2024 20:03:03 +0000 Subject: [PATCH 17/19] fix: Dockerfile to reduce vulnerabilities The following vulnerabilities are fixed with an upgrade: - https://snyk.io/vuln/SNYK-DEBIAN12-GLIBC-5927132 - https://snyk.io/vuln/SNYK-DEBIAN12-GLIBC-5927132 - https://snyk.io/vuln/SNYK-DEBIAN12-GLIBC-5927132 - https://snyk.io/vuln/SNYK-DEBIAN12-GLIBC-5927132 - https://snyk.io/vuln/SNYK-DEBIAN12-NGHTTP2-5953379 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 22619d6c1..5bf7e9f85 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.19.11 +FROM golang:1.20.13 # Install pact ruby standalone binaries RUN curl -LO https://github.com/pact-foundation/pact-ruby-standalone/releases/download/v2.0.3/pact-2.0.3-linux-x86_64.tar.gz; \ From 84dd92ee2c4e7f6002ecc449d6ed18259e081746 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 19 Jan 2024 12:23:50 +0000 Subject: [PATCH 18/19] build(deps): bump golang.org/x/crypto from 0.11.0 to 0.17.0 Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.11.0 to 0.17.0. - [Commits](https://github.com/golang/crypto/compare/v0.11.0...v0.17.0) --- updated-dependencies: - dependency-name: golang.org/x/crypto dependency-type: indirect ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 75585379a..d24d10f43 100644 --- a/go.mod +++ b/go.mod @@ -44,7 +44,7 @@ require ( github.com/spf13/pflag v1.0.5 // indirect github.com/ulikunitz/xz v0.5.11 // indirect go.opencensus.io v0.24.0 // indirect - golang.org/x/crypto v0.16.0 // indirect + golang.org/x/crypto v0.17.0 // indirect golang.org/x/net v0.19.0 // indirect golang.org/x/oauth2 v0.15.0 // indirect golang.org/x/sync v0.5.0 // indirect diff --git a/go.sum b/go.sum index c2799d27b..79ea2c527 100644 --- a/go.sum +++ b/go.sum @@ -430,8 +430,8 @@ golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY= -golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= +golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= +golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= From 7c19237ca05a895ac771b3d189d3f512f9d6393f Mon Sep 17 00:00:00 2001 From: Stan Date: Mon, 29 Jan 2024 21:01:37 -0800 Subject: [PATCH 19/19] fix: allow empty message responses --- .github/workflows/update-ffi.yml | 21 ++ .gitignore | 1 + Makefile | 16 +- consumer/http_v4_test.go | 2 +- examples/grpc/common.go | 7 + examples/grpc/grpc_consumer_test.go | 151 +++++++++++- examples/grpc/grpc_provider_test.go | 5 +- examples/grpc/routeguide/route_guide.pb.go | 214 +++++++++--------- examples/grpc/routeguide/route_guide.proto | 6 + .../grpc/routeguide/route_guide_grpc.pb.go | 78 ++++++- examples/grpc/routeguide/server/server.go | 15 +- examples/plugin/provider_plugin_test.go | 1 + .../protobuf_consumer_test.go | 2 +- installer/installer.go | 2 +- internal/native/message_server.go | 18 +- internal/native/message_server_test.go | 145 +++++++++++- message/v4/synchronous_message_test.go | 4 +- scripts/create-pr-to-update-pact-ffi.sh | 27 +++ scripts/dispatch-ffi-released.sh | 38 ++++ 19 files changed, 610 insertions(+), 143 deletions(-) create mode 100644 .github/workflows/update-ffi.yml create mode 100644 examples/grpc/common.go create mode 100755 scripts/create-pr-to-update-pact-ffi.sh create mode 100755 scripts/dispatch-ffi-released.sh diff --git a/.github/workflows/update-ffi.yml b/.github/workflows/update-ffi.yml new file mode 100644 index 000000000..395479251 --- /dev/null +++ b/.github/workflows/update-ffi.yml @@ -0,0 +1,21 @@ +name: Update Pact FFI Library + +on: + repository_dispatch: + types: + - pact-ffi-released + +jobs: + update: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - run: | + git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com" + git config --global user.name "${GITHUB_ACTOR}" + git config pull.ff only + + - run: scripts/create-pr-to-update-pact-ffi.sh ${{ github.event.client_payload.version }} + env: + GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' diff --git a/.gitignore b/.gitignore index f63396501..dddbec92a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +/vendor/ # Compiled Object files, Static and Dynamic libs (Shared Objects) *.o *.a diff --git a/Makefile b/Makefile index 28c348596..f604fc0be 100755 --- a/Makefile +++ b/Makefile @@ -43,7 +43,7 @@ deps: download_plugins download_plugins: @echo "--- 🐿 Installing plugins"; \ ./scripts/install-cli.sh - ~/.pact/bin/pact-plugin-cli -y install https://github.com/pactflow/pact-protobuf-plugin/releases/tag/v-0.3.8 + ~/.pact/bin/pact-plugin-cli -y install https://github.com/pactflow/pact-protobuf-plugin/releases/tag/v-0.3.13 ~/.pact/bin/pact-plugin-cli -y install https://github.com/pact-foundation/pact-plugins/releases/tag/csv-plugin-0.0.1 ~/.pact/bin/pact-plugin-cli -y install https://github.com/mefellows/pact-matt-plugin/releases/tag/v0.0.9 ~/.pact/bin/pact-plugin-cli -y install https://github.com/austek/pact-avro-plugin/releases/tag/v0.0.3 @@ -97,3 +97,17 @@ updatedeps: go get -d -v -p 2 ./... .PHONY: install bin default dev test pact updatedeps clean release + +PROTOC ?= $(shell which protoc) + +.PHONY: protos +protos: + @echo "--- 🛠 Compiling Protobufs" + cd ./examples/grpc/routeguide && $(PROTOC) --go_out=paths=source_relative:. \ + --go-grpc_out=paths=source_relative:. ./route_guide.proto + +.PHONY: grpc-test +grpc-test: + rm -rf ./examples/pacts + go test -v -tags=consumer -count=1 github.com/pact-foundation/pact-go/v2/examples/grpc + go test -v -timeout=30s -tags=provider -count=1 github.com/pact-foundation/pact-go/v2/examples/grpc diff --git a/consumer/http_v4_test.go b/consumer/http_v4_test.go index 154a8b227..b2505bbeb 100644 --- a/consumer/http_v4_test.go +++ b/consumer/http_v4_test.go @@ -58,7 +58,7 @@ func TestHttpV4TypeSystem(t *testing.T) { UponReceiving("some scenario"). UsingPlugin(PluginConfig{ Plugin: "protobuf", - Version: "0.3.8", + Version: "0.3.13", }). WithRequest("GET", "/"). // WithRequest("GET", "/", func(b *V4InteractionWithPluginRequestBuilder) { diff --git a/examples/grpc/common.go b/examples/grpc/common.go new file mode 100644 index 000000000..5ffba450f --- /dev/null +++ b/examples/grpc/common.go @@ -0,0 +1,7 @@ +//go:build consumer || provider + +package grpc + +import "os" + +var dir, _ = os.Getwd() diff --git a/examples/grpc/grpc_consumer_test.go b/examples/grpc/grpc_consumer_test.go index 962ad08b5..44fdd8640 100644 --- a/examples/grpc/grpc_consumer_test.go +++ b/examples/grpc/grpc_consumer_test.go @@ -15,19 +15,18 @@ import ( "github.com/pact-foundation/pact-go/v2/log" message "github.com/pact-foundation/pact-go/v2/message/v4" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" ) -var dir, _ = os.Getwd() - -func TestGrpcInteraction(t *testing.T) { +func TestGetFeatureSuccess(t *testing.T) { p, _ := message.NewSynchronousPact(message.Config{ Consumer: "grpcconsumer", Provider: "grpcprovider", PactDir: filepath.ToSlash(fmt.Sprintf("%s/../pacts", dir)), }) - log.SetLogLevel("INFO") + log.SetLogLevel("DEBUG") dir, _ := os.Getwd() path := fmt.Sprintf("%s/routeguide/route_guide.proto", dir) @@ -53,7 +52,7 @@ func TestGrpcInteraction(t *testing.T) { Given("feature 'Big Tree' exists"). UsingPlugin(message.PluginConfig{ Plugin: "protobuf", - Version: "0.3.8", + Version: "0.3.13", }). WithContents(grpcInteraction, "application/protobuf"). StartTransport("grpc", "127.0.0.1", nil). // For plugin tests, we can't assume if a transport is needed, so this is optional @@ -93,3 +92,145 @@ func TestGrpcInteraction(t *testing.T) { assert.NoError(t, err) } + +func TestGetFeatureError(t *testing.T) { + log.SetLogLevel("DEBUG") + p, _ := message.NewSynchronousPact(message.Config{ + Consumer: "grpcconsumer", + Provider: "grpcprovider", + PactDir: filepath.ToSlash(fmt.Sprintf("%s/../pacts", dir)), + }) + + dir, _ := os.Getwd() + path := fmt.Sprintf("%s/routeguide/route_guide.proto", dir) + + grpcInteraction := `{ + "pact:proto": "` + path + `", + "pact:proto-service": "RouteGuide/GetFeature", + "pact:content-type": "application/protobuf", + "request": { + "latitude": "matching(number, -1)", + "longitude": "matching(number, -1)" + }, + "responseMetadata": { + "grpc-status": "NOT_FOUND", + "grpc-message": "matching(type, 'no feature was found at latitude:-1 longitude:-1')" + } + }` + + err := p.AddSynchronousMessage("Route guide - GetFeature - error response"). + Given("feature does not exist at -1, -1"). + UsingPlugin(message.PluginConfig{ + Plugin: "protobuf", + Version: "0.3.13", + }). + WithContents(grpcInteraction, "application/protobuf"). + StartTransport("grpc", "127.0.0.1", nil). // For plugin tests, we can't assume if a transport is needed, so this is optional + ExecuteTest(t, func(transport message.TransportConfig, m message.SynchronousMessage) error { + fmt.Println("gRPC transport running on", transport) + + // Establish the gRPC connection + conn, err := grpc.Dial(fmt.Sprintf("127.0.0.1:%d", transport.Port), grpc.WithTransportCredentials(insecure.NewCredentials())) + require.NoError(t, err) + defer conn.Close() + + // Create the gRPC client + c := routeguide.NewRouteGuideClient(conn) + + point := &routeguide.Point{ + Latitude: -1, + Longitude: -1, + } + + // Now we can make a normal gRPC request + ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) + defer cancel() + _, err = c.GetFeature(ctx, point) + + require.Error(t, err) + // TODO: uncomment once new FFI and new pact-protobuf plugin are released with a fix + // https://github.com/pact-foundation/pact-reference/commit/29b326e59b48a6a78a019b37e378b7742c728da5 + // require.ErrorContains(t, err, "no feature was found at latitude:-1 longitude:-1") + + return nil + }) + + assert.NoError(t, err) +} + +func TestSaveFeature(t *testing.T) { + p, _ := message.NewSynchronousPact(message.Config{ + Consumer: "grpcconsumer", + Provider: "grpcprovider", + PactDir: filepath.ToSlash(fmt.Sprintf("%s/../pacts", dir)), + }) + log.SetLogLevel("INFO") + + dir, _ := os.Getwd() + path := fmt.Sprintf("%s/routeguide/route_guide.proto", dir) + + grpcInteraction := `{ + "pact:proto": "` + path + `", + "pact:proto-service": "RouteGuide/SaveFeature", + "pact:content-type": "application/protobuf", + "request": { + "name": "notEmpty('A shed')", + "location": { + "latitude": "matching(number, 99)", + "longitude": "matching(number, 99)" + } + }, + "response": { + "name": "notEmpty('A shed')", + "location": { + "latitude": "matching(number, 99)", + "longitude": "matching(number, 99)" + } + } + }` + + err := p.AddSynchronousMessage("Route guide - SaveFeature"). + Given("feature does not exist at -1, -1"). + UsingPlugin(message.PluginConfig{ + Plugin: "protobuf", + Version: "0.3.13", + }). + WithContents(grpcInteraction, "application/protobuf"). + StartTransport("grpc", "127.0.0.1", nil). // For plugin tests, we can't assume if a transport is needed, so this is optional + ExecuteTest(t, func(transport message.TransportConfig, m message.SynchronousMessage) error { + fmt.Println("gRPC transport running on", transport) + + // Establish the gRPC connection + conn, err := grpc.Dial(fmt.Sprintf("127.0.0.1:%d", transport.Port), grpc.WithTransportCredentials(insecure.NewCredentials())) + if err != nil { + t.Fatal("unable to communicate to grpc server", err) + } + defer conn.Close() + + // Create the gRPC client + c := routeguide.NewRouteGuideClient(conn) + feature := &routeguide.Feature{ + Name: "A shed", + Location: &routeguide.Point{ + Latitude: 99, + Longitude: 99, + }, + } + + // Now we can make a normal gRPC request + ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) + defer cancel() + response, err := c.SaveFeature(ctx, feature) + + if err != nil { + t.Fatal(err.Error()) + } + + assert.Equal(t, feature.GetName(), response.GetName()) + assert.Equal(t, feature.GetLocation().GetLatitude(), feature.GetLocation().GetLatitude()) + + return nil + }) + + assert.NoError(t, err) +} diff --git a/examples/grpc/grpc_provider_test.go b/examples/grpc/grpc_provider_test.go index 8b8c87394..3ee67607a 100644 --- a/examples/grpc/grpc_provider_test.go +++ b/examples/grpc/grpc_provider_test.go @@ -8,7 +8,6 @@ import ( "log" "net" - "os" "path/filepath" "testing" @@ -20,8 +19,6 @@ import ( "google.golang.org/grpc" ) -var dir, _ = os.Getwd() - func TestGrpcProvider(t *testing.T) { go startProvider() l.SetLogLevel("TRACE") @@ -31,7 +28,7 @@ func TestGrpcProvider(t *testing.T) { err := verifier.VerifyProvider(t, provider.VerifyRequest{ ProviderBaseURL: "http://localhost:8222", Transports: []provider.Transport{ - provider.Transport{ + { Protocol: "grpc", Port: 8222, }, diff --git a/examples/grpc/routeguide/route_guide.pb.go b/examples/grpc/routeguide/route_guide.pb.go index 85c3033c7..e7c7f4442 100644 --- a/examples/grpc/routeguide/route_guide.pb.go +++ b/examples/grpc/routeguide/route_guide.pb.go @@ -14,14 +14,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: examples/route_guide/routeguide/route_guide.proto +// protoc-gen-go v1.32.0 +// protoc v4.25.2 +// source: route_guide.proto package routeguide import ( - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -35,10 +34,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Points are represented as latitude-longitude pairs in the E7 representation // (degrees multiplied by 10**7 and rounded to the nearest integer). // Latitudes should be in the range +/- 90 degrees and longitude should be in @@ -55,7 +50,7 @@ type Point struct { func (x *Point) Reset() { *x = Point{} if protoimpl.UnsafeEnabled { - mi := &file_examples_route_guide_routeguide_route_guide_proto_msgTypes[0] + mi := &file_route_guide_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -68,7 +63,7 @@ func (x *Point) String() string { func (*Point) ProtoMessage() {} func (x *Point) ProtoReflect() protoreflect.Message { - mi := &file_examples_route_guide_routeguide_route_guide_proto_msgTypes[0] + mi := &file_route_guide_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -81,7 +76,7 @@ func (x *Point) ProtoReflect() protoreflect.Message { // Deprecated: Use Point.ProtoReflect.Descriptor instead. func (*Point) Descriptor() ([]byte, []int) { - return file_examples_route_guide_routeguide_route_guide_proto_rawDescGZIP(), []int{0} + return file_route_guide_proto_rawDescGZIP(), []int{0} } func (x *Point) GetLatitude() int32 { @@ -114,7 +109,7 @@ type Rectangle struct { func (x *Rectangle) Reset() { *x = Rectangle{} if protoimpl.UnsafeEnabled { - mi := &file_examples_route_guide_routeguide_route_guide_proto_msgTypes[1] + mi := &file_route_guide_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -127,7 +122,7 @@ func (x *Rectangle) String() string { func (*Rectangle) ProtoMessage() {} func (x *Rectangle) ProtoReflect() protoreflect.Message { - mi := &file_examples_route_guide_routeguide_route_guide_proto_msgTypes[1] + mi := &file_route_guide_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -140,7 +135,7 @@ func (x *Rectangle) ProtoReflect() protoreflect.Message { // Deprecated: Use Rectangle.ProtoReflect.Descriptor instead. func (*Rectangle) Descriptor() ([]byte, []int) { - return file_examples_route_guide_routeguide_route_guide_proto_rawDescGZIP(), []int{1} + return file_route_guide_proto_rawDescGZIP(), []int{1} } func (x *Rectangle) GetLo() *Point { @@ -169,12 +164,14 @@ type Feature struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // The point where the feature is detected. Location *Point `protobuf:"bytes,2,opt,name=location,proto3" json:"location,omitempty"` + // A description of the feature. + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` } func (x *Feature) Reset() { *x = Feature{} if protoimpl.UnsafeEnabled { - mi := &file_examples_route_guide_routeguide_route_guide_proto_msgTypes[2] + mi := &file_route_guide_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -187,7 +184,7 @@ func (x *Feature) String() string { func (*Feature) ProtoMessage() {} func (x *Feature) ProtoReflect() protoreflect.Message { - mi := &file_examples_route_guide_routeguide_route_guide_proto_msgTypes[2] + mi := &file_route_guide_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -200,7 +197,7 @@ func (x *Feature) ProtoReflect() protoreflect.Message { // Deprecated: Use Feature.ProtoReflect.Descriptor instead. func (*Feature) Descriptor() ([]byte, []int) { - return file_examples_route_guide_routeguide_route_guide_proto_rawDescGZIP(), []int{2} + return file_route_guide_proto_rawDescGZIP(), []int{2} } func (x *Feature) GetName() string { @@ -217,6 +214,13 @@ func (x *Feature) GetLocation() *Point { return nil } +func (x *Feature) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + // A RouteNote is a message sent while at a given point. type RouteNote struct { state protoimpl.MessageState @@ -232,7 +236,7 @@ type RouteNote struct { func (x *RouteNote) Reset() { *x = RouteNote{} if protoimpl.UnsafeEnabled { - mi := &file_examples_route_guide_routeguide_route_guide_proto_msgTypes[3] + mi := &file_route_guide_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -245,7 +249,7 @@ func (x *RouteNote) String() string { func (*RouteNote) ProtoMessage() {} func (x *RouteNote) ProtoReflect() protoreflect.Message { - mi := &file_examples_route_guide_routeguide_route_guide_proto_msgTypes[3] + mi := &file_route_guide_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -258,7 +262,7 @@ func (x *RouteNote) ProtoReflect() protoreflect.Message { // Deprecated: Use RouteNote.ProtoReflect.Descriptor instead. func (*RouteNote) Descriptor() ([]byte, []int) { - return file_examples_route_guide_routeguide_route_guide_proto_rawDescGZIP(), []int{3} + return file_route_guide_proto_rawDescGZIP(), []int{3} } func (x *RouteNote) GetLocation() *Point { @@ -298,7 +302,7 @@ type RouteSummary struct { func (x *RouteSummary) Reset() { *x = RouteSummary{} if protoimpl.UnsafeEnabled { - mi := &file_examples_route_guide_routeguide_route_guide_proto_msgTypes[4] + mi := &file_route_guide_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -311,7 +315,7 @@ func (x *RouteSummary) String() string { func (*RouteSummary) ProtoMessage() {} func (x *RouteSummary) ProtoReflect() protoreflect.Message { - mi := &file_examples_route_guide_routeguide_route_guide_proto_msgTypes[4] + mi := &file_route_guide_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -324,7 +328,7 @@ func (x *RouteSummary) ProtoReflect() protoreflect.Message { // Deprecated: Use RouteSummary.ProtoReflect.Descriptor instead. func (*RouteSummary) Descriptor() ([]byte, []int) { - return file_examples_route_guide_routeguide_route_guide_proto_rawDescGZIP(), []int{4} + return file_route_guide_proto_rawDescGZIP(), []int{4} } func (x *RouteSummary) GetPointCount() int32 { @@ -355,12 +359,10 @@ func (x *RouteSummary) GetElapsedTime() int32 { return 0 } -var File_examples_route_guide_routeguide_route_guide_proto protoreflect.FileDescriptor +var File_route_guide_proto protoreflect.FileDescriptor -var file_examples_route_guide_routeguide_route_guide_proto_rawDesc = []byte{ - 0x0a, 0x31, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, - 0x5f, 0x67, 0x75, 0x69, 0x64, 0x65, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x67, 0x75, 0x69, 0x64, - 0x65, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x67, 0x75, 0x69, 0x64, 0x65, 0x2e, 0x70, 0x72, +var file_route_guide_proto_rawDesc = []byte{ + 0x0a, 0x11, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x67, 0x75, 0x69, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x67, 0x75, 0x69, 0x64, 0x65, 0x22, 0x41, 0x0a, 0x05, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69, @@ -371,99 +373,107 @@ var file_examples_route_guide_routeguide_route_guide_proto_rawDesc = []byte{ 0x75, 0x74, 0x65, 0x67, 0x75, 0x69, 0x64, 0x65, 0x2e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x02, 0x6c, 0x6f, 0x12, 0x21, 0x0a, 0x02, 0x68, 0x69, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x67, 0x75, 0x69, 0x64, 0x65, 0x2e, 0x50, 0x6f, 0x69, 0x6e, - 0x74, 0x52, 0x02, 0x68, 0x69, 0x22, 0x4c, 0x0a, 0x07, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x74, 0x52, 0x02, 0x68, 0x69, 0x22, 0x6e, 0x0a, 0x07, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x67, 0x75, 0x69, 0x64, 0x65, 0x2e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x22, 0x54, 0x0a, 0x09, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4e, 0x6f, 0x74, 0x65, - 0x12, 0x2d, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x67, 0x75, 0x69, 0x64, 0x65, 0x2e, - 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x93, 0x01, 0x0a, 0x0c, 0x52, 0x6f, - 0x75, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x6f, - 0x69, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x0a, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x66, - 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x0c, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x69, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x08, 0x64, 0x69, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x21, 0x0a, 0x0c, - 0x65, 0x6c, 0x61, 0x70, 0x73, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x0b, 0x65, 0x6c, 0x61, 0x70, 0x73, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x32, - 0x85, 0x02, 0x0a, 0x0a, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x47, 0x75, 0x69, 0x64, 0x65, 0x12, 0x36, - 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x11, 0x2e, 0x72, - 0x6f, 0x75, 0x74, 0x65, 0x67, 0x75, 0x69, 0x64, 0x65, 0x2e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x1a, - 0x13, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x67, 0x75, 0x69, 0x64, 0x65, 0x2e, 0x46, 0x65, 0x61, - 0x74, 0x75, 0x72, 0x65, 0x22, 0x00, 0x12, 0x3e, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x65, - 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x15, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x67, 0x75, - 0x69, 0x64, 0x65, 0x2e, 0x52, 0x65, 0x63, 0x74, 0x61, 0x6e, 0x67, 0x6c, 0x65, 0x1a, 0x13, 0x2e, - 0x72, 0x6f, 0x75, 0x74, 0x65, 0x67, 0x75, 0x69, 0x64, 0x65, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x3e, 0x0a, 0x0b, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, - 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x11, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x67, 0x75, 0x69, - 0x64, 0x65, 0x2e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x1a, 0x18, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, - 0x67, 0x75, 0x69, 0x64, 0x65, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, - 0x72, 0x79, 0x22, 0x00, 0x28, 0x01, 0x12, 0x3f, 0x0a, 0x09, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, - 0x68, 0x61, 0x74, 0x12, 0x15, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x67, 0x75, 0x69, 0x64, 0x65, - 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4e, 0x6f, 0x74, 0x65, 0x1a, 0x15, 0x2e, 0x72, 0x6f, 0x75, - 0x74, 0x65, 0x67, 0x75, 0x69, 0x64, 0x65, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4e, 0x6f, 0x74, - 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x42, 0x68, 0x0a, 0x1b, 0x69, 0x6f, 0x2e, 0x67, 0x72, - 0x70, 0x63, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x72, 0x6f, 0x75, 0x74, - 0x65, 0x67, 0x75, 0x69, 0x64, 0x65, 0x42, 0x0f, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x47, 0x75, 0x69, - 0x64, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x36, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x72, 0x70, - 0x63, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, - 0x5f, 0x67, 0x75, 0x69, 0x64, 0x65, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x67, 0x75, 0x69, 0x64, - 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x54, 0x0a, 0x09, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4e, 0x6f, + 0x74, 0x65, 0x12, 0x2d, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x67, 0x75, 0x69, 0x64, + 0x65, 0x2e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x93, 0x01, 0x0a, 0x0c, + 0x52, 0x6f, 0x75, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x1f, 0x0a, 0x0b, + 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x0a, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x23, 0x0a, + 0x0d, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x69, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x64, 0x69, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x21, + 0x0a, 0x0c, 0x65, 0x6c, 0x61, 0x70, 0x73, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x65, 0x6c, 0x61, 0x70, 0x73, 0x65, 0x64, 0x54, 0x69, 0x6d, + 0x65, 0x32, 0xc0, 0x02, 0x0a, 0x0a, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x47, 0x75, 0x69, 0x64, 0x65, + 0x12, 0x36, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x11, + 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x67, 0x75, 0x69, 0x64, 0x65, 0x2e, 0x50, 0x6f, 0x69, 0x6e, + 0x74, 0x1a, 0x13, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x67, 0x75, 0x69, 0x64, 0x65, 0x2e, 0x46, + 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0x00, 0x12, 0x39, 0x0a, 0x0b, 0x53, 0x61, 0x76, 0x65, + 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x13, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x67, + 0x75, 0x69, 0x64, 0x65, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x13, 0x2e, 0x72, + 0x6f, 0x75, 0x74, 0x65, 0x67, 0x75, 0x69, 0x64, 0x65, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x22, 0x00, 0x12, 0x3e, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x65, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x73, 0x12, 0x15, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x67, 0x75, 0x69, 0x64, 0x65, + 0x2e, 0x52, 0x65, 0x63, 0x74, 0x61, 0x6e, 0x67, 0x6c, 0x65, 0x1a, 0x13, 0x2e, 0x72, 0x6f, 0x75, + 0x74, 0x65, 0x67, 0x75, 0x69, 0x64, 0x65, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, + 0x00, 0x30, 0x01, 0x12, 0x3e, 0x0a, 0x0b, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x6f, 0x75, + 0x74, 0x65, 0x12, 0x11, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x67, 0x75, 0x69, 0x64, 0x65, 0x2e, + 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x1a, 0x18, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x67, 0x75, 0x69, + 0x64, 0x65, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x22, + 0x00, 0x28, 0x01, 0x12, 0x3f, 0x0a, 0x09, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x68, 0x61, 0x74, + 0x12, 0x15, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x67, 0x75, 0x69, 0x64, 0x65, 0x2e, 0x52, 0x6f, + 0x75, 0x74, 0x65, 0x4e, 0x6f, 0x74, 0x65, 0x1a, 0x15, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x67, + 0x75, 0x69, 0x64, 0x65, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4e, 0x6f, 0x74, 0x65, 0x22, 0x00, + 0x28, 0x01, 0x30, 0x01, 0x42, 0x68, 0x0a, 0x1b, 0x69, 0x6f, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, + 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x67, 0x75, + 0x69, 0x64, 0x65, 0x42, 0x0f, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x47, 0x75, 0x69, 0x64, 0x65, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x36, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, + 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x65, + 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x67, 0x75, + 0x69, 0x64, 0x65, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x67, 0x75, 0x69, 0x64, 0x65, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_examples_route_guide_routeguide_route_guide_proto_rawDescOnce sync.Once - file_examples_route_guide_routeguide_route_guide_proto_rawDescData = file_examples_route_guide_routeguide_route_guide_proto_rawDesc + file_route_guide_proto_rawDescOnce sync.Once + file_route_guide_proto_rawDescData = file_route_guide_proto_rawDesc ) -func file_examples_route_guide_routeguide_route_guide_proto_rawDescGZIP() []byte { - file_examples_route_guide_routeguide_route_guide_proto_rawDescOnce.Do(func() { - file_examples_route_guide_routeguide_route_guide_proto_rawDescData = protoimpl.X.CompressGZIP(file_examples_route_guide_routeguide_route_guide_proto_rawDescData) +func file_route_guide_proto_rawDescGZIP() []byte { + file_route_guide_proto_rawDescOnce.Do(func() { + file_route_guide_proto_rawDescData = protoimpl.X.CompressGZIP(file_route_guide_proto_rawDescData) }) - return file_examples_route_guide_routeguide_route_guide_proto_rawDescData + return file_route_guide_proto_rawDescData } -var file_examples_route_guide_routeguide_route_guide_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_examples_route_guide_routeguide_route_guide_proto_goTypes = []interface{}{ +var file_route_guide_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_route_guide_proto_goTypes = []interface{}{ (*Point)(nil), // 0: routeguide.Point (*Rectangle)(nil), // 1: routeguide.Rectangle (*Feature)(nil), // 2: routeguide.Feature (*RouteNote)(nil), // 3: routeguide.RouteNote (*RouteSummary)(nil), // 4: routeguide.RouteSummary } -var file_examples_route_guide_routeguide_route_guide_proto_depIdxs = []int32{ +var file_route_guide_proto_depIdxs = []int32{ 0, // 0: routeguide.Rectangle.lo:type_name -> routeguide.Point 0, // 1: routeguide.Rectangle.hi:type_name -> routeguide.Point 0, // 2: routeguide.Feature.location:type_name -> routeguide.Point 0, // 3: routeguide.RouteNote.location:type_name -> routeguide.Point 0, // 4: routeguide.RouteGuide.GetFeature:input_type -> routeguide.Point - 1, // 5: routeguide.RouteGuide.ListFeatures:input_type -> routeguide.Rectangle - 0, // 6: routeguide.RouteGuide.RecordRoute:input_type -> routeguide.Point - 3, // 7: routeguide.RouteGuide.RouteChat:input_type -> routeguide.RouteNote - 2, // 8: routeguide.RouteGuide.GetFeature:output_type -> routeguide.Feature - 2, // 9: routeguide.RouteGuide.ListFeatures:output_type -> routeguide.Feature - 4, // 10: routeguide.RouteGuide.RecordRoute:output_type -> routeguide.RouteSummary - 3, // 11: routeguide.RouteGuide.RouteChat:output_type -> routeguide.RouteNote - 8, // [8:12] is the sub-list for method output_type - 4, // [4:8] is the sub-list for method input_type + 2, // 5: routeguide.RouteGuide.SaveFeature:input_type -> routeguide.Feature + 1, // 6: routeguide.RouteGuide.ListFeatures:input_type -> routeguide.Rectangle + 0, // 7: routeguide.RouteGuide.RecordRoute:input_type -> routeguide.Point + 3, // 8: routeguide.RouteGuide.RouteChat:input_type -> routeguide.RouteNote + 2, // 9: routeguide.RouteGuide.GetFeature:output_type -> routeguide.Feature + 2, // 10: routeguide.RouteGuide.SaveFeature:output_type -> routeguide.Feature + 2, // 11: routeguide.RouteGuide.ListFeatures:output_type -> routeguide.Feature + 4, // 12: routeguide.RouteGuide.RecordRoute:output_type -> routeguide.RouteSummary + 3, // 13: routeguide.RouteGuide.RouteChat:output_type -> routeguide.RouteNote + 9, // [9:14] is the sub-list for method output_type + 4, // [4:9] is the sub-list for method input_type 4, // [4:4] is the sub-list for extension type_name 4, // [4:4] is the sub-list for extension extendee 0, // [0:4] is the sub-list for field type_name } -func init() { file_examples_route_guide_routeguide_route_guide_proto_init() } -func file_examples_route_guide_routeguide_route_guide_proto_init() { - if File_examples_route_guide_routeguide_route_guide_proto != nil { +func init() { file_route_guide_proto_init() } +func file_route_guide_proto_init() { + if File_route_guide_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_examples_route_guide_routeguide_route_guide_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_route_guide_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Point); i { case 0: return &v.state @@ -475,7 +485,7 @@ func file_examples_route_guide_routeguide_route_guide_proto_init() { return nil } } - file_examples_route_guide_routeguide_route_guide_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_route_guide_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Rectangle); i { case 0: return &v.state @@ -487,7 +497,7 @@ func file_examples_route_guide_routeguide_route_guide_proto_init() { return nil } } - file_examples_route_guide_routeguide_route_guide_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_route_guide_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Feature); i { case 0: return &v.state @@ -499,7 +509,7 @@ func file_examples_route_guide_routeguide_route_guide_proto_init() { return nil } } - file_examples_route_guide_routeguide_route_guide_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_route_guide_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RouteNote); i { case 0: return &v.state @@ -511,7 +521,7 @@ func file_examples_route_guide_routeguide_route_guide_proto_init() { return nil } } - file_examples_route_guide_routeguide_route_guide_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_route_guide_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RouteSummary); i { case 0: return &v.state @@ -528,18 +538,18 @@ func file_examples_route_guide_routeguide_route_guide_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_examples_route_guide_routeguide_route_guide_proto_rawDesc, + RawDescriptor: file_route_guide_proto_rawDesc, NumEnums: 0, NumMessages: 5, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_examples_route_guide_routeguide_route_guide_proto_goTypes, - DependencyIndexes: file_examples_route_guide_routeguide_route_guide_proto_depIdxs, - MessageInfos: file_examples_route_guide_routeguide_route_guide_proto_msgTypes, + GoTypes: file_route_guide_proto_goTypes, + DependencyIndexes: file_route_guide_proto_depIdxs, + MessageInfos: file_route_guide_proto_msgTypes, }.Build() - File_examples_route_guide_routeguide_route_guide_proto = out.File - file_examples_route_guide_routeguide_route_guide_proto_rawDesc = nil - file_examples_route_guide_routeguide_route_guide_proto_goTypes = nil - file_examples_route_guide_routeguide_route_guide_proto_depIdxs = nil + File_route_guide_proto = out.File + file_route_guide_proto_rawDesc = nil + file_route_guide_proto_goTypes = nil + file_route_guide_proto_depIdxs = nil } diff --git a/examples/grpc/routeguide/route_guide.proto b/examples/grpc/routeguide/route_guide.proto index 966c434a8..9d4e6db95 100644 --- a/examples/grpc/routeguide/route_guide.proto +++ b/examples/grpc/routeguide/route_guide.proto @@ -31,6 +31,9 @@ service RouteGuide { // position. rpc GetFeature(Point) returns (Feature) {} + // Save the feature. + rpc SaveFeature(Feature) returns (Feature) {} + // A server-to-client streaming RPC. // // Obtains the Features available within the given Rectangle. Results are @@ -80,6 +83,9 @@ message Feature { // The point where the feature is detected. Point location = 2; + + // A description of the feature. + string description = 3; } // A RouteNote is a message sent while at a given point. diff --git a/examples/grpc/routeguide/route_guide_grpc.pb.go b/examples/grpc/routeguide/route_guide_grpc.pb.go index 32f7910a3..8ab71705c 100644 --- a/examples/grpc/routeguide/route_guide_grpc.pb.go +++ b/examples/grpc/routeguide/route_guide_grpc.pb.go @@ -1,8 +1,22 @@ +// Copyright 2015 gRPC authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc v3.14.0 -// source: examples/route_guide/routeguide/route_guide.proto +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.2 +// source: route_guide.proto package routeguide @@ -18,6 +32,14 @@ import ( // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 +const ( + RouteGuide_GetFeature_FullMethodName = "/routeguide.RouteGuide/GetFeature" + RouteGuide_SaveFeature_FullMethodName = "/routeguide.RouteGuide/SaveFeature" + RouteGuide_ListFeatures_FullMethodName = "/routeguide.RouteGuide/ListFeatures" + RouteGuide_RecordRoute_FullMethodName = "/routeguide.RouteGuide/RecordRoute" + RouteGuide_RouteChat_FullMethodName = "/routeguide.RouteGuide/RouteChat" +) + // RouteGuideClient is the client API for RouteGuide service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. @@ -29,6 +51,8 @@ type RouteGuideClient interface { // A feature with an empty name is returned if there's no feature at the given // position. GetFeature(ctx context.Context, in *Point, opts ...grpc.CallOption) (*Feature, error) + // Save the feature. + SaveFeature(ctx context.Context, in *Feature, opts ...grpc.CallOption) (*Feature, error) // A server-to-client streaming RPC. // // Obtains the Features available within the given Rectangle. Results are @@ -58,7 +82,16 @@ func NewRouteGuideClient(cc grpc.ClientConnInterface) RouteGuideClient { func (c *routeGuideClient) GetFeature(ctx context.Context, in *Point, opts ...grpc.CallOption) (*Feature, error) { out := new(Feature) - err := c.cc.Invoke(ctx, "/routeguide.RouteGuide/GetFeature", in, out, opts...) + err := c.cc.Invoke(ctx, RouteGuide_GetFeature_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *routeGuideClient) SaveFeature(ctx context.Context, in *Feature, opts ...grpc.CallOption) (*Feature, error) { + out := new(Feature) + err := c.cc.Invoke(ctx, RouteGuide_SaveFeature_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -66,7 +99,7 @@ func (c *routeGuideClient) GetFeature(ctx context.Context, in *Point, opts ...gr } func (c *routeGuideClient) ListFeatures(ctx context.Context, in *Rectangle, opts ...grpc.CallOption) (RouteGuide_ListFeaturesClient, error) { - stream, err := c.cc.NewStream(ctx, &RouteGuide_ServiceDesc.Streams[0], "/routeguide.RouteGuide/ListFeatures", opts...) + stream, err := c.cc.NewStream(ctx, &RouteGuide_ServiceDesc.Streams[0], RouteGuide_ListFeatures_FullMethodName, opts...) if err != nil { return nil, err } @@ -98,7 +131,7 @@ func (x *routeGuideListFeaturesClient) Recv() (*Feature, error) { } func (c *routeGuideClient) RecordRoute(ctx context.Context, opts ...grpc.CallOption) (RouteGuide_RecordRouteClient, error) { - stream, err := c.cc.NewStream(ctx, &RouteGuide_ServiceDesc.Streams[1], "/routeguide.RouteGuide/RecordRoute", opts...) + stream, err := c.cc.NewStream(ctx, &RouteGuide_ServiceDesc.Streams[1], RouteGuide_RecordRoute_FullMethodName, opts...) if err != nil { return nil, err } @@ -132,7 +165,7 @@ func (x *routeGuideRecordRouteClient) CloseAndRecv() (*RouteSummary, error) { } func (c *routeGuideClient) RouteChat(ctx context.Context, opts ...grpc.CallOption) (RouteGuide_RouteChatClient, error) { - stream, err := c.cc.NewStream(ctx, &RouteGuide_ServiceDesc.Streams[2], "/routeguide.RouteGuide/RouteChat", opts...) + stream, err := c.cc.NewStream(ctx, &RouteGuide_ServiceDesc.Streams[2], RouteGuide_RouteChat_FullMethodName, opts...) if err != nil { return nil, err } @@ -173,6 +206,8 @@ type RouteGuideServer interface { // A feature with an empty name is returned if there's no feature at the given // position. GetFeature(context.Context, *Point) (*Feature, error) + // Save the feature. + SaveFeature(context.Context, *Feature) (*Feature, error) // A server-to-client streaming RPC. // // Obtains the Features available within the given Rectangle. Results are @@ -200,6 +235,9 @@ type UnimplementedRouteGuideServer struct { func (UnimplementedRouteGuideServer) GetFeature(context.Context, *Point) (*Feature, error) { return nil, status.Errorf(codes.Unimplemented, "method GetFeature not implemented") } +func (UnimplementedRouteGuideServer) SaveFeature(context.Context, *Feature) (*Feature, error) { + return nil, status.Errorf(codes.Unimplemented, "method SaveFeature not implemented") +} func (UnimplementedRouteGuideServer) ListFeatures(*Rectangle, RouteGuide_ListFeaturesServer) error { return status.Errorf(codes.Unimplemented, "method ListFeatures not implemented") } @@ -232,7 +270,7 @@ func _RouteGuide_GetFeature_Handler(srv interface{}, ctx context.Context, dec fu } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/routeguide.RouteGuide/GetFeature", + FullMethod: RouteGuide_GetFeature_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(RouteGuideServer).GetFeature(ctx, req.(*Point)) @@ -240,6 +278,24 @@ func _RouteGuide_GetFeature_Handler(srv interface{}, ctx context.Context, dec fu return interceptor(ctx, in, info, handler) } +func _RouteGuide_SaveFeature_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Feature) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RouteGuideServer).SaveFeature(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RouteGuide_SaveFeature_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RouteGuideServer).SaveFeature(ctx, req.(*Feature)) + } + return interceptor(ctx, in, info, handler) +} + func _RouteGuide_ListFeatures_Handler(srv interface{}, stream grpc.ServerStream) error { m := new(Rectangle) if err := stream.RecvMsg(m); err != nil { @@ -324,6 +380,10 @@ var RouteGuide_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetFeature", Handler: _RouteGuide_GetFeature_Handler, }, + { + MethodName: "SaveFeature", + Handler: _RouteGuide_SaveFeature_Handler, + }, }, Streams: []grpc.StreamDesc{ { @@ -343,5 +403,5 @@ var RouteGuide_ServiceDesc = grpc.ServiceDesc{ ClientStreams: true, }, }, - Metadata: "examples/route_guide/routeguide/route_guide.proto", + Metadata: "route_guide.proto", } diff --git a/examples/grpc/routeguide/server/server.go b/examples/grpc/routeguide/server/server.go index 1c8b4c678..fa59e7ddf 100644 --- a/examples/grpc/routeguide/server/server.go +++ b/examples/grpc/routeguide/server/server.go @@ -28,17 +28,19 @@ import ( "flag" "fmt" "io" - "os" "log" "math" "net" + "os" "sync" "time" "google.golang.org/grpc" "github.com/pact-foundation/pact-go/v2/examples/grpc/routeguide/data" + "google.golang.org/grpc/codes" "google.golang.org/grpc/credentials" + "google.golang.org/grpc/status" "github.com/golang/protobuf/proto" @@ -69,7 +71,13 @@ func (s *routeGuideServer) GetFeature(ctx context.Context, point *pb.Point) (*pb } } // No feature was found, return an unnamed feature - return &pb.Feature{Location: point}, nil + return nil, status.Errorf(codes.NotFound, "no feature was found at %v", point) +} + +// SaveFeature saves the feature +func (s *routeGuideServer) SaveFeature(ctx context.Context, feature *pb.Feature) (*pb.Feature, error) { + s.savedFeatures = append(s.savedFeatures, feature) + return feature, nil } // ListFeatures lists all features contained within the given bounding Rectangle. @@ -849,5 +857,6 @@ var exampleData = []byte(`[{ "latitude": 180, "longitude": 200 }, - "name": "Really big tree" + "name": "Really big tree", + "description": "This tree is really big" }]`) diff --git a/examples/plugin/provider_plugin_test.go b/examples/plugin/provider_plugin_test.go index c7f17d737..82ed0a9f0 100644 --- a/examples/plugin/provider_plugin_test.go +++ b/examples/plugin/provider_plugin_test.go @@ -26,6 +26,7 @@ var dir, _ = os.Getwd() var pactDir = fmt.Sprintf("%s/../pacts", dir) func TestPluginProvider(t *testing.T) { + t.Skip() httpPort, _ := utils.GetFreePort() tcpPort, _ := utils.GetFreePort() diff --git a/examples/protobuf-message/protobuf_consumer_test.go b/examples/protobuf-message/protobuf_consumer_test.go index a373653b5..a7226acfe 100644 --- a/examples/protobuf-message/protobuf_consumer_test.go +++ b/examples/protobuf-message/protobuf_consumer_test.go @@ -42,7 +42,7 @@ func TestPluginMessageConsumer(t *testing.T) { ExpectsToReceive("feature message"). UsingPlugin(message.PluginConfig{ Plugin: "protobuf", - Version: "0.3.8", + Version: "0.3.13", }). WithContents(protoMessage, "application/protobuf"). ExecuteTest(t, func(m message.AsynchronousMessage) error { diff --git a/installer/installer.go b/installer/installer.go index 66637835d..89542dcff 100644 --- a/installer/installer.go +++ b/installer/installer.go @@ -381,7 +381,7 @@ const ( var packages = map[string]packageInfo{ FFIPackage: { libName: "libpact_ffi", - version: "0.4.5", + version: "0.4.15", semverRange: ">= 0.4.0, < 1.0.0", }, } diff --git a/internal/native/message_server.go b/internal/native/message_server.go index 1e6f50b6b..723ff6952 100644 --- a/internal/native/message_server.go +++ b/internal/native/message_server.go @@ -502,17 +502,15 @@ func (m *Message) GetMessageResponseContents() ([][]byte, error) { // Get Response body len := C.pactffi_sync_message_get_response_contents_length(message, C.size_t(i)) - if len == 0 { - return nil, errors.New("retrieved an empty message") - } - data := C.pactffi_sync_message_get_response_contents_bin(message, C.size_t(i)) - if data == nil { - return nil, errors.New("retrieved an empty pointer to the message contents") + if len != 0 { + data := C.pactffi_sync_message_get_response_contents_bin(message, C.size_t(i)) + if data == nil { + return nil, errors.New("retrieved an empty pointer to the message contents") + } + ptr := unsafe.Pointer(data) + bytes := C.GoBytes(ptr, C.int(len)) + responses[i] = bytes } - ptr := unsafe.Pointer(data) - bytes := C.GoBytes(ptr, C.int(len)) - - responses[i] = bytes } return responses, nil diff --git a/internal/native/message_server_test.go b/internal/native/message_server_test.go index d4cdf8619..c8746f750 100644 --- a/internal/native/message_server_test.go +++ b/internal/native/message_server_test.go @@ -7,8 +7,8 @@ import ( "encoding/json" "fmt" "io" + l "log" "os" - l"log" "testing" "time" @@ -187,11 +187,31 @@ func TestGetSyncMessageContentsAsBytes(t *testing.T) { assert.Equal(t, "response", v.Some) } +func TestGetSyncMessageContentsAsBytes_EmptyResponse(t *testing.T) { + s := NewMessageServer("test-message-consumer", "test-message-provider") + + m := s.NewSyncMessageInteraction(""). + Given("some state"). + GivenWithParameter("param", map[string]interface{}{ + "foo": "bar", + }). + ExpectsToReceive("some message"). + WithMetadata(map[string]string{ + "meta": "data", + }) + + bytes, err := m.GetMessageResponseContents() + assert.NoError(t, err) + assert.NotNil(t, bytes) + assert.Equal(t, 1, len(bytes)) + assert.Empty(t, bytes[0]) +} + func TestGetPluginSyncMessageContentsAsBytes(t *testing.T) { m := NewMessageServer("test-message-consumer", "test-message-provider") // Protobuf plugin test - err := m.UsingPlugin("protobuf", "0.3.8") + err := m.UsingPlugin("protobuf", "0.3.11") assert.NoError(t, err) i := m.NewSyncMessageInteraction("grpc interaction") @@ -244,11 +264,57 @@ func TestGetPluginSyncMessageContentsAsBytes(t *testing.T) { } +func TestGetPluginSyncMessageContentsAsBytes_EmptyResponse(t *testing.T) { + m := NewMessageServer("test-message-consumer", "test-message-provider") + + // Protobuf plugin test + err := m.UsingPlugin("protobuf", "0.3.11") + assert.NoError(t, err) + + i := m.NewSyncMessageInteraction("grpc interaction") + + dir, _ := os.Getwd() + path := fmt.Sprintf("%s/pact_plugin.proto", dir) + + grpcInteraction := `{ + "pact:proto": "` + path + `", + "pact:proto-service": "PactPlugin/InitPlugin", + "pact:content-type": "application/protobuf", + "request": { + "implementation": "notEmpty('pact-go-driver')", + "version": "matching(semver, '0.0.0')" + } + }` + + err = i. + Given("plugin state"). + // For gRPC interactions we prpvide the config once for both the request and response parts + WithPluginInteractionContents(INTERACTION_PART_REQUEST, "application/protobuf", grpcInteraction) + assert.NoError(t, err) + + bytes, err := i.GetMessageRequestContents() + assert.NoError(t, err) + assert.NotNil(t, bytes) + + // Should be able to convert request body back into a protobuf + p := &InitPluginRequest{} + err = proto.Unmarshal(bytes, p) + assert.NoError(t, err) + assert.Equal(t, "0.0.0", p.Version) + + // Should be able to convert response into a protobuf + response_bytes, err := i.GetMessageResponseContents() + assert.NoError(t, err) + assert.NotNil(t, response_bytes) + assert.Equal(t, 1, len(response_bytes)) + assert.Empty(t, response_bytes[0]) +} + func TestGetPluginAsyncMessageContentsAsBytes(t *testing.T) { m := NewMessageServer("test-message-consumer", "test-message-provider") // Protobuf plugin test - _ = m.UsingPlugin("protobuf", "0.3.8") + _ = m.UsingPlugin("protobuf", "0.3.11") i := m.NewAsyncMessageInteraction("grpc interaction") @@ -288,7 +354,7 @@ func TestGrpcPluginInteraction(t *testing.T) { m := NewMessageServer("test-message-consumer", "test-message-provider") // Protobuf plugin test - _ = m.UsingPlugin("protobuf", "0.3.8") + _ = m.UsingPlugin("protobuf", "0.3.11") i := m.NewSyncMessageInteraction("grpc interaction") @@ -356,3 +422,74 @@ func TestGrpcPluginInteraction(t *testing.T) { err = m.WritePactFileForServer(port, tmpPactFolder, true) assert.NoError(t, err) } + +func TestGrpcPluginInteraction_ErrorResponse(t *testing.T) { + tmpPactFolder, err := os.MkdirTemp("", "pact-go") + assert.NoError(t, err) + _ = log.SetLogLevel("TRACE") + + m := NewMessageServer("test-message-consumer", "test-message-provider") + + // Protobuf plugin test + _ = m.UsingPlugin("protobuf", "0.3.11") + + i := m.NewSyncMessageInteraction("grpc interaction") + + dir, _ := os.Getwd() + path := fmt.Sprintf("%s/pact_plugin.proto", dir) + + grpcInteraction := `{ + "pact:proto": "` + path + `", + "pact:proto-service": "PactPlugin/InitPlugin", + "pact:content-type": "application/protobuf", + "request": { + "implementation": "notEmpty('pact-go-driver')", + "version": "matching(semver, '0.0.0')" + }, + "responseMetadata": { + "grpc-status": "NOT_FOUND", + "grpc-message": "matching(type, 'not found')" + } + }` + + err = i. + Given("plugin state"). + // For gRPC interactions we prpvide the config once for both the request and response parts + WithPluginInteractionContents(INTERACTION_PART_REQUEST, "application/protobuf", grpcInteraction) + assert.NoError(t, err) + + // Start the gRPC mock server + port, err := m.StartTransport("grpc", "127.0.0.1", 0, make(map[string][]interface{})) + assert.NoError(t, err) + defer m.CleanupMockServer(port) + + // Now we can make a normal gRPC request + initPluginRequest := &InitPluginRequest{ + Implementation: "pact-go-test", + Version: "1.0.0", + } + + // Need to make a gRPC call here + conn, err := grpc.Dial(fmt.Sprintf("127.0.0.1:%d", port), grpc.WithTransportCredentials(insecure.NewCredentials())) + if err != nil { + l.Fatalf("did not connect: %v", err) + } + defer conn.Close() + c := NewPactPluginClient(conn) + + // Contact the server and print out its response. + ctx, cancel := context.WithTimeout(context.Background(), time.Second) + defer cancel() + r, err := c.InitPlugin(ctx, initPluginRequest) + assert.Nil(t, r) + assert.ErrorContains(t, err, "not found") + + mismatches := m.MockServerMismatchedRequests(port) + if len(mismatches) != 0 { + assert.Len(t, mismatches, 0) + t.Log(mismatches) + } + + err = m.WritePactFileForServer(port, tmpPactFolder, true) + assert.NoError(t, err) +} diff --git a/message/v4/synchronous_message_test.go b/message/v4/synchronous_message_test.go index 87d87ff45..0b546f022 100644 --- a/message/v4/synchronous_message_test.go +++ b/message/v4/synchronous_message_test.go @@ -105,7 +105,7 @@ func TestSyncTypeSystem(t *testing.T) { Given("some state"). UsingPlugin(PluginConfig{ Plugin: "protobuf", - Version: "0.3.8", + Version: "0.3.13", }). WithContents(grpcInteraction, "application/protobuf"). StartTransport("grpc", "127.0.0.1", nil). // For plugin tests, we can't assume if a transport is needed, so this is optional @@ -128,7 +128,7 @@ func TestSyncTypeSystem(t *testing.T) { Given("some state"). UsingPlugin(PluginConfig{ Plugin: "protobuf", - Version: "0.3.8", + Version: "0.3.13", }). WithContents(grpcInteraction, "application/protobuf"). StartTransport("grpc", "127.0.0.1", nil). // For plugin tests, we can't assume if a transport is needed, so this is optional diff --git a/scripts/create-pr-to-update-pact-ffi.sh b/scripts/create-pr-to-update-pact-ffi.sh new file mode 100755 index 000000000..5f0e8476f --- /dev/null +++ b/scripts/create-pr-to-update-pact-ffi.sh @@ -0,0 +1,27 @@ +#!/bin/sh + +set -e + +: "${1?Please supply the pact-ffi version to upgrade to}" + +FFI_VERSION=$1 +TYPE=${2:-fix} +DASHERISED_VERSION=$(echo "${FFI_VERSION}" | sed 's/\./\-/g') +BRANCH_NAME="chore/upgrade-to-pact-ffi-${DASHERISED_VERSION}" + +git checkout master +git checkout installer/installer.go +git pull origin master + +git checkout -b ${BRANCH_NAME} + +cat installer/installer.go | sed "s/version:.*/version: \"${FFI_VERSION}\",/" > tmp-install +mv tmp-install installer/installer.go + +git add installer/installer.go +git commit -m "${TYPE}: update pact-ffi to ${FFI_VERSION}" +git push --set-upstream origin ${BRANCH_NAME} + +gh pr create --title "${TYPE}: update pact-ffi to ${FFI_VERSION}" --fill + +git checkout master diff --git a/scripts/dispatch-ffi-released.sh b/scripts/dispatch-ffi-released.sh new file mode 100755 index 000000000..3ed226ed7 --- /dev/null +++ b/scripts/dispatch-ffi-released.sh @@ -0,0 +1,38 @@ +#!/bin/sh + +# Script to trigger an update of the pact ffi from pact-foundation/pact-reference to listening repos +# Requires a Github API token with repo scope stored in the +# environment variable GITHUB_ACCESS_TOKEN_FOR_PF_RELEASES + +: "${GITHUB_ACCESS_TOKEN_FOR_PF_RELEASES:?Please set environment variable GITHUB_ACCESS_TOKEN_FOR_PF_RELEASES}" + +if [ -n "$1" ]; then + name="\"${1}\"" +else + echo "name not provided as first param" + exit 1 +fi + +if [ -n "$2" ]; then + version="\"${2}\"" +else + echo "name not provided as second param" + exit 1 +fi + +repository_slug=$(git remote get-url origin | cut -d':' -f2 | sed 's/\.git//') + +output=$(curl -v https://api.github.com/repos/${repository_slug}/dispatches \ + -H 'Accept: application/vnd.github.everest-preview+json' \ + -H "Authorization: Bearer $GITHUB_ACCESS_TOKEN_FOR_PF_RELEASES" \ + -d "{\"event_type\": \"pact-ffi-released\", \"client_payload\": {\"name\": ${name}, \"version\" : ${version}}}" 2>&1) + +if ! echo "${output}" | grep "HTTP\/.* 204" > /dev/null; then + echo "$output" | sed "s/${GITHUB_ACCESS_TOKEN_FOR_PF_RELEASES}/********/g" + echo "Failed to trigger update" + exit 1 +else + echo "Update workflow triggered" +fi + +echo "See https://github.com/${repository_slug}/actions?query=workflow%3A%22Update+Pact+FFI+Library%22" \ No newline at end of file