From f6418ca3577de3f4ea6ea864b1893fc8829e9020 Mon Sep 17 00:00:00 2001 From: Ido David <36866853+ido-namely@users.noreply.github.com> Date: Fri, 26 Aug 2022 11:54:36 -0400 Subject: [PATCH] Change the lang in the validator to go instead of gogo; add test (#326) --- all/entrypoint.sh | 2 +- all/test/all_test.go | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/all/entrypoint.sh b/all/entrypoint.sh index 9d769a96..9a9545a9 100755 --- a/all/entrypoint.sh +++ b/all/entrypoint.sh @@ -409,7 +409,7 @@ if [[ $GEN_VALIDATOR == true && $GEN_LANG == "go" ]]; then fi if [[ $GEN_VALIDATOR == true && $GEN_LANG == "gogo" ]]; then - GEN_STRING="$GEN_STRING --validate_out=lang=gogo${VALIDATOR_SOURCE_RELATIVE}:$OUT_DIR" + GEN_STRING="$GEN_STRING --validate_out=lang=go${VALIDATOR_SOURCE_RELATIVE}:$OUT_DIR" fi if [[ $GEN_VALIDATOR == true && $GEN_LANG == "java" ]]; then diff --git a/all/test/all_test.go b/all/test/all_test.go index 0eb5a864..68a244a6 100644 --- a/all/test/all_test.go +++ b/all/test/all_test.go @@ -203,6 +203,16 @@ func (s *TestSuite) TestAllCases() { }, extraArgs: []string{"-o", "gen/foo/bar"}, }, + "gogo with validator": { + lang: "gogo", + protofileName: "all/test/test.proto", + expectedOutputDir: "gen/pb-gogo", + fileExpectations: []FileExpectation{ + {fileName: "all/test.pb.go"}, + {fileName: "all/test.pb.validate.go"}, + }, + extraArgs: []string{"--with-validator"}, + }, "php": { lang: "php", protofileName: "all/test/test.proto",