Fix zrpc code generation error with --remote (#1739)
Co-authored-by: anqiansong <anqiansong@bytedance.com>
This commit is contained in:
@@ -83,6 +83,14 @@ func Test_RemoveGoctlFlag(t *testing.T) {
|
||||
source: strings.Fields(`protoc --go_opt=. --go-grpc_out=. --zrpc_out=. foo.proto`),
|
||||
expected: "protoc --go_opt=. --go-grpc_out=. foo.proto",
|
||||
},
|
||||
{
|
||||
source: strings.Fields(`protoc --go_opt=. --go-grpc_out=. --zrpc_out=. --remote=foo --branch=bar foo.proto`),
|
||||
expected: "protoc --go_opt=. --go-grpc_out=. foo.proto",
|
||||
},
|
||||
{
|
||||
source: strings.Fields(`protoc --go_opt=. --go-grpc_out=. --zrpc_out=. --remote foo --branch bar foo.proto`),
|
||||
expected: "protoc --go_opt=. --go-grpc_out=. foo.proto",
|
||||
},
|
||||
}
|
||||
for _, e := range testData {
|
||||
cmd := strings.Join(removeGoctlFlag(e.source), " ")
|
||||
|
||||
Reference in New Issue
Block a user