forked from TrueCloudLab/frostfs-api-go
Airat Arifullin
bc16a32c24
* Add plugin option for protogen in Makefile * Fix the generator for the plugin in util/protogen * Erase convertable types, move helpful methods to gRPC protobufs * Erase helpers for convertations * Generate StableMarshlal/StableSize for protobufs by the protoc plugin Signed-off-by: Airat Arifullin a.arifullin@yadro.com
47 lines
3.3 KiB
Go
47 lines
3.3 KiB
Go
package container_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
containertest "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/container/test"
|
|
messagetest "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/rpc/message/test"
|
|
"google.golang.org/protobuf/proto"
|
|
)
|
|
|
|
func TestMessageConvert(t *testing.T) {
|
|
messagetest.TestRPCMessage(t,
|
|
func(empty bool) proto.Message { return containertest.GenerateAttribute(empty) },
|
|
func(empty bool) proto.Message { return containertest.GenerateContainer(empty) },
|
|
func(empty bool) proto.Message { return containertest.GeneratePutRequestBody(empty) },
|
|
func(empty bool) proto.Message { return containertest.GeneratePutRequest(empty) },
|
|
func(empty bool) proto.Message { return containertest.GeneratePutResponseBody(empty) },
|
|
func(empty bool) proto.Message { return containertest.GeneratePutResponse(empty) },
|
|
func(empty bool) proto.Message { return containertest.GenerateGetRequestBody(empty) },
|
|
func(empty bool) proto.Message { return containertest.GenerateGetRequest(empty) },
|
|
func(empty bool) proto.Message { return containertest.GenerateGetResponseBody(empty) },
|
|
func(empty bool) proto.Message { return containertest.GenerateGetResponse(empty) },
|
|
func(empty bool) proto.Message { return containertest.GenerateDeleteRequestBody(empty) },
|
|
func(empty bool) proto.Message { return containertest.GenerateDeleteRequest(empty) },
|
|
func(empty bool) proto.Message { return containertest.GenerateDeleteResponseBody(empty) },
|
|
func(empty bool) proto.Message { return containertest.GenerateDeleteResponse(empty) },
|
|
func(empty bool) proto.Message { return containertest.GenerateListRequestBody(empty) },
|
|
func(empty bool) proto.Message { return containertest.GenerateListRequest(empty) },
|
|
func(empty bool) proto.Message { return containertest.GenerateListResponseBody(empty) },
|
|
func(empty bool) proto.Message { return containertest.GenerateListResponse(empty) },
|
|
func(empty bool) proto.Message { return containertest.GenerateSetExtendedACLRequestBody(empty) },
|
|
func(empty bool) proto.Message { return containertest.GenerateSetExtendedACLRequest(empty) },
|
|
func(empty bool) proto.Message { return containertest.GenerateGetRequestBody(empty) },
|
|
func(empty bool) proto.Message { return containertest.GenerateGetRequest(empty) },
|
|
func(empty bool) proto.Message { return containertest.GenerateGetResponseBody(empty) },
|
|
func(empty bool) proto.Message { return containertest.GenerateGetResponse(empty) },
|
|
func(empty bool) proto.Message { return containertest.GenerateGetExtendedACLRequestBody(empty) },
|
|
func(empty bool) proto.Message { return containertest.GenerateGetExtendedACLRequest(empty) },
|
|
func(empty bool) proto.Message { return containertest.GenerateGetExtendedACLResponseBody(empty) },
|
|
func(empty bool) proto.Message { return containertest.GenerateGetExtendedACLResponse(empty) },
|
|
func(empty bool) proto.Message { return containertest.GenerateUsedSpaceAnnouncement(empty) },
|
|
func(empty bool) proto.Message { return containertest.GenerateAnnounceUsedSpaceRequestBody(empty) },
|
|
func(empty bool) proto.Message { return containertest.GenerateAnnounceUsedSpaceRequest(empty) },
|
|
func(empty bool) proto.Message { return containertest.GenerateAnnounceUsedSpaceResponseBody(empty) },
|
|
func(empty bool) proto.Message { return containertest.GenerateAnnounceUsedSpaceResponse(empty) },
|
|
)
|
|
}
|