Skip to content

Commit

Permalink
Change the lang in the validator to go instead of gogo; add test (#326)
Browse files Browse the repository at this point in the history
  • Loading branch information
ido-namely authored Aug 26, 2022
1 parent 8a171e9 commit f6418ca
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion all/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 10 additions & 0 deletions all/test/all_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit f6418ca

Please sign in to comment.