Skip to content

Commit

Permalink
test: fix tests after requiring correct path (#34)
Browse files Browse the repository at this point in the history
Co-authored-by: Aaron Craelius <aaron@regen.network>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
3 people committed Feb 2, 2023
1 parent 6b922a0 commit 7f07934
Show file tree
Hide file tree
Showing 408 changed files with 19,655 additions and 19,343 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
protobuf_version: [3.19.4, 3.0.2, 2.6.1]
protobuf_version: [3.19.4]
fail-fast: false
steps:
- name: Checkout branch
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## [Unreleased]

### Bug Fixes

- [#34](https://github.com/cosmos/gogoproto/pull/34) Allow empty package name, as per gogo original behavior. Fix regression introduced in v1.4.4

## [v1.4.3](https://github.com/cosmos/gogoproto/releases/tag/v1.4.2) - 2022-10-14

### Bug Fixes
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,11 @@ regenerate: install
make -C vanity/test regenerate
make -C test/sizeunderscore regenerate
make -C test/issue34 regenerate
make -C test/empty-issue70 regenerate
make -C test/indeximport-issue72 regenerate
make -C test/empty_issue70 regenerate
make -C test/indeximport_issue72 regenerate
make -C test/fuzztests regenerate
make -C test/oneofembed regenerate
make -C test/asymetric-issue125 regenerate
make -C test/asymetric_issue125 regenerate
make -C test/filedotname regenerate
make -C test/nopackage regenerate
make -C test/types regenerate
Expand All @@ -129,7 +129,7 @@ regenerate: install
make -C test/int64support regenerate
make -C test/issue322 regenerate
make -C test/issue330 regenerate
make -C test/importcustom-issue389 regenerate
make -C test/importcustom_issue389 regenerate
make -C test/merge regenerate
make -C test/cachedsize regenerate
make -C test/deterministic regenerate
Expand Down
5 changes: 3 additions & 2 deletions conformance/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,13 @@ test:
./test.sh $(PROTOBUF_ROOT)

regenerate:
cd internal && \
protoc-min-version --version="3.0.0" --proto_path=../protobuf:. --gogo_out=\
Mgoogle/protobuf/any.proto=github.com/cosmos/gogoproto/types,\
Mgoogle/protobuf/duration.proto=github.com/cosmos/gogoproto/types,\
Mgoogle/protobuf/struct.proto=github.com/cosmos/gogoproto/types,\
Mgoogle/protobuf/timestamp.proto=github.com/cosmos/gogoproto/types,\
Mgoogle/protobuf/wrappers.proto=github.com/cosmos/gogoproto/types,\
Mgoogle/protobuf/field_mask.proto=github.com/cosmos/gogoproto/types\
:. ./internal/conformance_proto/conformance.proto\
-I ../gogoproto -I ../protobuf
:. ./conformance_proto/conformance.proto\
-I ../../gogoproto -I ../../protobuf
426 changes: 213 additions & 213 deletions conformance/internal/conformance_proto/conformance.pb.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion conformance/internal/conformance_proto/conformance.proto
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

syntax = "proto3";
package conformance;
package conformance_proto;
option java_package = "com.google.protobuf.conformance";

import "google/protobuf/any.proto";
Expand Down
14 changes: 9 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@ module github.com/cosmos/gogoproto

go 1.19

require google.golang.org/grpc v1.52.3
require (
github.com/golang/protobuf v1.5.2
google.golang.org/grpc v1.52.3
)

require (
github.com/golang/protobuf v1.5.2 // indirect
golang.org/x/net v0.4.0 // indirect
golang.org/x/sys v0.3.0 // indirect
golang.org/x/text v0.5.0 // indirect
golang.org/x/mod v0.7.0 // indirect
golang.org/x/net v0.5.0 // indirect
golang.org/x/sys v0.4.0 // indirect
golang.org/x/text v0.6.0 // indirect
golang.org/x/tools v0.5.0 // indirect
google.golang.org/genproto v0.0.0-20221118155620-16455021b5e6 // indirect
google.golang.org/protobuf v1.28.1 // indirect
)
16 changes: 10 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,16 @@ github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
golang.org/x/net v0.4.0 h1:Q5QPcMlvfxFTAPV0+07Xz/MpK9NTXu2VDUuy0FeMfaU=
golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE=
golang.org/x/sys v0.3.0 h1:w8ZOecv6NaNa/zC8944JTU3vz4u6Lagfk4RPQxv92NQ=
golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/text v0.5.0 h1:OLmvp0KP+FVG99Ct/qFiL/Fhk4zp4QQnZ7b2U+5piUM=
golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/mod v0.7.0 h1:LapD9S96VoQRhi/GrNTqeBJFrUjs5UHCAtTlgwA5oZA=
golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/net v0.5.0 h1:GyT4nK/YDHSqa1c4753ouYCDajOYKTja9Xb/OHtgvSw=
golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws=
golang.org/x/sys v0.4.0 h1:Zr2JFtRQNX3BCZ8YtxRE9hNJYC8J6I1MVbMg6owUp18=
golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/text v0.6.0 h1:3XmdazWV+ubf7QgHSTWeykHOci5oeekaGJBLkrkaw4k=
golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/tools v0.5.0 h1:+bSpV5HIeWkuvgaMfI3UmKRThoTA5ODJTUd8T17NO+4=
golang.org/x/tools v0.5.0/go.mod h1:N+Kgy78s5I24c24dU8OfWNEotWjutIs8SnJvn5IDq+k=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/genproto v0.0.0-20221118155620-16455021b5e6 h1:a2S6M0+660BgMNl++4JPlcAO/CjkqYItDEZwkoDQK7c=
google.golang.org/genproto v0.0.0-20221118155620-16455021b5e6/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg=
Expand Down
20 changes: 10 additions & 10 deletions jsonpb/jsonpb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -338,23 +338,23 @@ var (
complexNumber = &pb.Complex{Imaginary: proto.Float64(0.5772156649)}
realNumberJSON = `{` +
`"value":3.14159265359,` +
`"[jsonpb.Complex.real_extension]":{"imaginary":0.5772156649},` +
`"[jsonpb.name]":"Pi"` +
`"[jsonpb_test_proto.Complex.real_extension]":{"imaginary":0.5772156649},` +
`"[jsonpb_test_proto.name]":"Pi"` +
`}`

anySimple = &pb.KnownTypes{
An: &types.Any{
TypeUrl: "something.example.com/jsonpb.Simple",
TypeUrl: "something.example.com/jsonpb_test_proto.Simple",
Value: []byte{
// &pb.Simple{OBool:true}
1 << 3, 1,
},
},
}
anySimpleJSON = `{"an":{"@type":"something.example.com/jsonpb.Simple","oBool":true}}`
anySimpleJSON = `{"an":{"@type":"something.example.com/jsonpb_test_proto.Simple","oBool":true}}`
anySimplePrettyJSON = `{
"an": {
"@type": "something.example.com/jsonpb.Simple",
"@type": "something.example.com/jsonpb_test_proto.Simple",
"oBool": true
}
}`
Expand Down Expand Up @@ -1077,7 +1077,7 @@ func TestUnmarshalAnyJSONPBUnmarshaler(t *testing.T) {
}

const (
dynamicMessageName = "google.protobuf.jsonpb.testing.dynamicMessage"
dynamicMessageName = "google.protobuf.jsonpb_test_proto.testing.dynamicMessage"
)

func init() {
Expand Down Expand Up @@ -1200,12 +1200,12 @@ func TestUnmarshalUnsetRequiredFields(t *testing.T) {
{
desc: "any containing message with required field set to null",
pb: &pb.KnownTypes{},
json: `{"an": {"@type": "example.com/jsonpb.MsgWithRequired", "str": null}}`,
json: `{"an": {"@type": "example.com/jsonpb_test_proto.MsgWithRequired", "str": null}}`,
},
{
desc: "any containing message with missing required field",
pb: &pb.KnownTypes{},
json: `{"an": {"@type": "example.com/jsonpb.MsgWithRequired"}}`,
json: `{"an": {"@type": "example.com/jsonpb_test_proto.MsgWithRequired"}}`,
},
{
desc: "missing required in map value",
Expand Down Expand Up @@ -1240,12 +1240,12 @@ func TestUnmarshalUnsetRequiredFields(t *testing.T) {
{
desc: "required field in extension missing",
pb: &pb.Real{},
json: `{"[jsonpb.extm]":{}}`,
json: `{"[jsonpb_test_proto.extm]":{}}`,
},
{
desc: "required field in extension set to null",
pb: &pb.Real{},
json: `{"[jsonpb.extm]":{"str": null}}`,
json: `{"[jsonpb_test_proto.extm]":{"str": null}}`,
},
}

Expand Down
2 changes: 1 addition & 1 deletion jsonpb/jsonpb_test_proto/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

regenerate:
protoc-min-version --version="3.0.0" --gogo_out=Mgoogle/protobuf/any.proto=github.com/cosmos/gogoproto/types,Mgoogle/protobuf/duration.proto=github.com/cosmos/gogoproto/types,Mgoogle/protobuf/timestamp.proto=github.com/cosmos/gogoproto/types,Mgoogle/protobuf/wrappers.proto=github.com/cosmos/gogoproto/types,Mgoogle/protobuf/struct.proto=github.com/cosmos/gogoproto/types:. *.proto -I . -I ../../ -I ../../protobuf/
cd .. && protoc-min-version --version="3.0.0" --gogo_out=Mgoogle/protobuf/any.proto=github.com/cosmos/gogoproto/types,Mgoogle/protobuf/duration.proto=github.com/cosmos/gogoproto/types,Mgoogle/protobuf/timestamp.proto=github.com/cosmos/gogoproto/types,Mgoogle/protobuf/wrappers.proto=github.com/cosmos/gogoproto/types,Mgoogle/protobuf/struct.proto=github.com/cosmos/gogoproto/types:. jsonpb_test_proto/*.proto -I . -I ../ -I ../protobuf/
2 changes: 1 addition & 1 deletion jsonpb/jsonpb_test_proto/bytes.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package jsonpb
package jsonpb_test_proto

// Byte is used to test that []byte type aliases are serialized to base64.
type Byte byte
Expand Down
Loading

0 comments on commit 7f07934

Please sign in to comment.