Skip to content

Commit

Permalink
test(generator/rust): move protobuf golden files
Browse files Browse the repository at this point in the history
Make room to generate the files for google/type,
google/cloud/locations, and google/cloud/iam
  • Loading branch information
coryan committed Nov 13, 2024
1 parent bc04172 commit b387a2e
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 7 deletions.
14 changes: 14 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ members = [
"types",
"gax",
"generator/testdata/rust/openapi/golden",
"generator/testdata/rust/gclient/golden",
"generator/testdata/rust/gclient/golden/secretmanager",
]
8 changes: 4 additions & 4 deletions generator/cmd/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func TestRustFromOpenAPI(t *testing.T) {
func TestRustFromProtobuf(t *testing.T) {
const (
projectRoot = ".."
outDir = "testdata/rust/gclient/golden"
outDir = "testdata/rust/gclient/golden/secretmanager"
)

popts := &genclient.ParserOptions{
Expand All @@ -84,12 +84,12 @@ func TestRustFromProtobuf(t *testing.T) {
copts := &genclient.CodecOptions{
Language: "rust",
ProjectRoot: projectRoot,
OutDir: "testdata/rust/gclient/golden",
OutDir: outDir,
TemplateDir: "../templates",
Options: map[string]string{
"package-name-override": "secretmanager-golden-gclient",
"package:gax_placeholder": "package=types,path=../../../../../types,source=google.protobuf",
"package:gax": "package=gax,path=../../../../../gax",
"package:gax_placeholder": "package=types,path=../../../../../../types,source=google.protobuf",
"package:gax": "package=gax,path=../../../../../../gax",
},
}
err := Generate("protobuf", popts, copts)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ serde_json = "1.0.132"
time = { version = "0.3.36", features = ["formatting", "parsing"] }
reqwest = { version = "0.12.9", features = ["json"] }
bytes = { version = "1.8.0", features = ["serde"] }
gax = { path = "../../../../../gax", package = "gax" }
gax_placeholder = { path = "../../../../../types", package = "types" }
gax = { path = "../../../../../../gax", package = "gax" }
gax_placeholder = { path = "../../../../../../types", package = "types" }

0 comments on commit b387a2e

Please sign in to comment.