We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ec77f59 commit f086e7dCopy full SHA for f086e7d
4 files changed
internal/librarian/java/generate_test.go
@@ -677,6 +677,7 @@ func TestGenerate_Logic(t *testing.T) {
677
Libraries: []*config.Library{
678
library,
679
{Name: rootLibrary, Version: "1.2.3"},
680
+ {Name: parentPOM, Version: "1.2.3"},
681
},
682
}
683
// Setup mandatory files for postProcessAPI and syncPOMs
@@ -753,6 +754,7 @@ func TestGenerate_ProtoExclusion(t *testing.T) {
753
754
755
756
757
758
759
760
err := Generate(t.Context(), cfg, library, &sources.Sources{Googleapis: googleapisDir})
internal/librarian/java/pom.go
@@ -526,17 +526,13 @@ func findMonorepoVersion(cfg *config.Config) (string, error) {
526
return "", errMonorepoVersion
527
528
529
+// TODO(https://github.com/googleapis/librarian/issues/6411):
530
+// Simplify logic here and check at validate step.
531
func findParentPOMVersion(cfg *config.Config) (string, error) {
532
for _, lib := range cfg.Libraries {
533
if lib.Name == parentPOM {
534
return lib.Version, nil
535
536
- // Fallback to monorepoVersion if google-cloud-pom-parent is missing (e.g. in tests)
- for _, lib := range cfg.Libraries {
537
- if lib.Name == rootLibrary {
538
- return lib.Version, nil
539
- }
540
541
return "", errParentVersion
542
internal/librarian/java/postgenerate_test.go
@@ -41,6 +41,7 @@ func TestPostGenerate(t *testing.T) {
41
Language: "java",
42
43
44
45
{Name: "analytics-admin", Version: "0.98.0"},
46
{Name: "area120-tables", Version: "0.92.0"},
47
{Name: "aiplatform", Version: "3.89.0"},
@@ -196,6 +197,7 @@ func TestPostGenerate_SearchError(t *testing.T) {
196
197
cfg := &config.Config{
198
199
200
201
202
203
err := PostGenerate(t.Context(), tmpDir, cfg, nil)
@@ -215,6 +217,7 @@ func TestPostGenerate_Error(t *testing.T) {
215
217
216
218
219
220
221
222
223
internal/librarian/java/postprocess_test.go
@@ -520,6 +520,7 @@ func TestPostProcessLibrary(t *testing.T) {
520
defaultCfg := &config.Config{
521
522
{Name: rootLibrary, Version: "1.0.0"},
523
+ {Name: parentPOM, Version: "1.0.0"},
524
525
Default: &config.Default{
Java: &config.JavaModule{
@@ -621,6 +622,7 @@ func TestPostProcessLibrary_ErrorCase(t *testing.T) {
621
622
623
624
625
626
627
628
0 commit comments