Commit 6f59f7c
tests: Use fixed copyright year in tests. (#4036)
The generator use the current year to generate copyright headers, so
there are multiple tests failing when a new year comes. The general fix
is to introduce an environment variable `TEST_CURRENT_YEAR` so that we
can override it in tests. See below for the exact fix for each scenario:
- Java generator golden unit tests
- [Override it with
Maven](https://github.com/googleapis/sdk-platform-java/blob/9ac79fc6c856a0b71111e28e2f69eeb0c01b4fc9/gapic-generator-java/pom.xml#L326-L328).
- Java generator golden integration tests
- Updated the golden files. These tests are generated from Bazel rules.
Bazel builds are pretty hermetic and I couldn't find a way to override
the environment variable. This is because the Bazel rule
`java_gapic_library` [calls the
generator](https://github.com/googleapis/sdk-platform-java/blob/b43f77c66d93d2423744d0f6d6a0a2a53a06e6d9/rules_java_gapic/java_gapic.bzl#L224-L235)
through `proto_custom_library` which does not pass any environment
variables.
- Python hermetic build scripts unit tests.
- Override it with
[mocks](https://github.com/googleapis/sdk-platform-java/blob/9ac79fc6c856a0b71111e28e2f69eeb0c01b4fc9/hermetic_build/library_generation/tests/owlbot/java_unit_tests.py#L176).
This requires a small refactoring in java.py.
- Hermetic build scripts integration tests.
- Changed these tests to non-required for now. These tests use a
[hardcoded generator
version](https://github.com/googleapis/sdk-platform-java/blob/b43f77c66d93d2423744d0f6d6a0a2a53a06e6d9/.cloudbuild/library_generation/cloudbuild-library-generation-integration-test.yaml#L69-L74)
that does not recognize the environment variable. Once the generator is
released, we can update the generator version and override the
environment variable in CloudBuild yamls.
- SpringCodeGen unit tests.
- Once the generator is released, we can override the same environment
variable with Maven in spring-cloud-gcp.
Separately, updated zlib version in Bazel build because there is a known
incompatibility between old zlib library and the latest macOS version.
fixes: #3547
---------
Co-authored-by: cloud-java-bot <[email protected]>1 parent b43f77c commit 6f59f7c
File tree
2,170 files changed
+2227
-2187
lines changed- gapic-generator-java
- src/main/java/com/google/api/generator/gapic/composer/comment
- hermetic_build/library_generation
- owlbot/synthtool/languages
- tests/owlbot
- java-common-protos
- grpc-google-common-protos/src/main/java/com/google
- cloud/location
- longrunning
- proto-google-common-protos/src/main/java/com/google
- api
- apps/card/v1
- cloud
- audit
- location
- geo/type
- logging/type
- longrunning
- rpc
- context
- shopping/type
- type
- java-iam
- grpc-google-iam-v1/src/main/java/com/google/iam/v1
- grpc-google-iam-v2beta/src/main/java/com/google/iam/v2beta
- grpc-google-iam-v2/src/main/java/com/google/iam/v2
- grpc-google-iam-v3beta/src/main/java/com/google/iam/v3beta
- grpc-google-iam-v3/src/main/java/com/google/iam/v3
- proto-google-iam-v1/src/main/java/com/google/iam/v1
- logging
- proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta
- proto-google-iam-v2/src/main/java/com/google/iam/v2
- proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta
- proto-google-iam-v3/src/main/java/com/google/iam/v3
- java-showcase
- gapic-showcase/src
- main/java/com/google/showcase/v1beta1
- stub
- test/java/com/google/showcase/v1beta1
- grpc-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1
- proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1
- samples/snippets/generated/com/google/showcase/v1beta1
- compliancesettings/repeatdatabody
- compliance
- create
- getenum
- getiampolicy
- getlocation
- listlocations
- repeatdatabodyinfo
- repeatdatabodypatch
- repeatdatabodyput
- repeatdatabody
- repeatdatapathresource
- repeatdatapathtrailingresource
- repeatdataquery
- repeatdatasimplepath
- setiampolicy
- testiampermissions
- verifyenum
- echosettings
- echo
- wait
- echo
- block
- chat
- collect
- create
- echoerrordetails
- echo
- expand
- failechowithdetails
- getiampolicy
- getlocation
- listlocations
- pagedexpandlegacymapped
- pagedexpandlegacy
- pagedexpand
- setiampolicy
- testiampermissions
- wait
- identitysettings/createuser
- identity
- createuser
- create
- deleteuser
- getiampolicy
- getlocation
- getuser
- listlocations
- listusers
- setiampolicy
- testiampermissions
- updateuser
- messagingsettings
- createroom
- searchblurbs
- messaging
- connect
- createblurb
- createroom
- create
- deleteblurb
- deleteroom
- getblurb
- getiampolicy
- getlocation
- getroom
- listblurbs
- listlocations
- listrooms
- searchblurbs
- sendblurbs
- setiampolicy
- streamblurbs
- testiampermissions
- updateblurb
- updateroom
- sequenceservicesettings/createsequence
- sequenceservice
- attemptsequence
- attemptstreamingsequence
- createsequence
- createstreamingsequence
- create
- getiampolicy
- getlocation
- getsequencereport
- getstreamingsequencereport
- listlocations
- setiampolicy
- testiampermissions
- stub
- compliancestubsettings/repeatdatabody
- echostubsettings
- echo
- wait
- identitystubsettings/createuser
- messagingstubsettings
- createroom
- searchblurbs
- sequenceservicestubsettings/createsequence
- testingstubsettings/createsession
- testingsettings/createsession
- testing
- createsession
- create
- deletesession
- deletetest
- getiampolicy
- getlocation
- getsession
- listlocations
- listsessions
- listtests
- reportsession
- setiampolicy
- testiampermissions
- verifytest
- test/integration/goldens
- apigeeconnect
- samples/snippets/generated/main/java/com/google/cloud/apigeeconnect/v1
- connectionservicesettings/listconnections
- connectionservice
- create
- listconnections
- stub
- connectionservicestubsettings/listconnections
- tetherstubsettings/egress
- tethersettings/egress
- tether
- create
- egress
- src/com/google/cloud/apigeeconnect/v1
- stub
- asset
- samples/snippets/generated/main/java/com/google/cloud/asset/v1
- assetservicesettings
- batchgetassetshistory
- exportassets
- assetservice
- analyzeiampolicylongrunning
- analyzeiampolicy
- analyzemove
- batchgetassetshistory
- batchgeteffectiveiampolicies
- createfeed
- createsavedquery
- create
- deletefeed
- deletesavedquery
- exportassets
- getfeed
- getsavedquery
- listassets
- listfeeds
- listsavedqueries
- queryassets
- searchalliampolicies
- searchallresources
- updatefeed
- updatesavedquery
- stub/assetservicestubsettings
- batchgetassetshistory
- exportassets
- src/com/google/cloud/asset/v1
- stub
- bigtable
- samples/snippets/generated/main/java/com/google/cloud/bigtable/data/v2
- basebigtabledatasettings/mutaterow
- bigtable
- checkandmutaterow
- create
- mutaterows
- mutaterow
- pingandwarm
- readmodifywriterow
- readrows
- samplerowkeys
- stub/bigtablestubsettings/mutaterow
- src/com/google
- bigtable/v2
- cloud/bigtable/data/v2
- stub
- compute
- samples/snippets/generated/main/java/com/google/cloud/compute/v1small
- addressessettings
- aggregatedlist
- delete
- addresses
- aggregatedlist
- create
- delete
- insert
- list
- regionoperationssettings/get
- regionoperations
- create
- get
- wait
- stub
- addressesstubsettings
- aggregatedlist
- delete
- regionoperationsstubsettings/get
- src/com/google/cloud/compute/v1small
- stub
- credentials
- samples/snippets/generated/main/java/com/google/cloud/iam/credentials/v1
- iamcredentialssettings/generateaccesstoken
- iamcredentials
- create
- generateaccesstoken
- generateidtoken
- signblob
- signjwt
- stub/iamcredentialsstubsettings/generateaccesstoken
- src/com/google/cloud/iam/credentials/v1
- stub
- iam
- samples/snippets/generated/main/java/com/google/iam/v1
- iampolicysettings/setiampolicy
- iampolicy
- create
- getiampolicy
- setiampolicy
- testiampermissions
- stub/iampolicystubsettings/setiampolicy
- src/com/google/iam/v1
- stub
- kms
- samples/snippets/generated/main/java/com/google/cloud/kms/v1
- keymanagementservicesettings/getkeyring
- keymanagementservice
- asymmetricdecrypt
- asymmetricsign
- createcryptokeyversion
- createcryptokey
- createimportjob
- createkeyring
- create
- decrypt
- destroycryptokeyversion
- encrypt
- getcryptokeyversion
- getcryptokey
- getiampolicy
- getimportjob
- getkeyring
- getlocation
- getpublickey
- importcryptokeyversion
- listcryptokeys
- listcryptokeyversions
- listimportjobs
- listkeyrings
- listlocations
- restorecryptokeyversion
- testiampermissions
- updatecryptokeyprimaryversion
- updatecryptokeyversion
- updatecryptokey
- stub/keymanagementservicestubsettings/getkeyring
- src/com/google/cloud/kms/v1
- stub
- library
- samples/snippets/generated/main/java/com/google/cloud/example/library/v1
- libraryservicesettings/createshelf
- libraryservice
- createbook
- createshelf
- create
- deletebook
- deleteshelf
- getbook
- getshelf
- listbooks
- listshelves
- mergeshelves
- movebook
- updatebook
- stub/libraryservicestubsettings/createshelf
- src/com/google
- cloud/example/library/v1
- stub
- example/library/v1
- logging
- samples/snippets/generated/main/java/com/google/cloud/logging/v2
- configservicev2
- copylogentries
- createbucket
- createexclusion
- createsink
- createview
- create
- deletebucket
- deleteexclusion
- deletesink
- deleteview
- getbucket
- getcmeksettings
- getexclusion
- getsettings
- getsink
- getview
- listbuckets
- listexclusions
- listsinks
- listviews
- undeletebucket
- updatebucket
- updatecmeksettings
- updateexclusion
- updatesettings
- updatesink
- updateview
- configsettings
- copylogentries
- getbucket
- loggingservicev2
- create
- deletelog
- listlogentries
- listlogs
- listmonitoredresourcedescriptors
- taillogentries
- writelogentries
- loggingsettings/deletelog
- metricsservicev2
- createlogmetric
- create
- deletelogmetric
- getlogmetric
- listlogmetrics
- updatelogmetric
- metricssettings/getlogmetric
- stub
- configservicev2stubsettings
- copylogentries
- getbucket
- loggingservicev2stubsettings/deletelog
- metricsservicev2stubsettings/getlogmetric
- src/com/google
- cloud/logging/v2
- stub
- logging/v2
- pubsub
- samples/snippets/generated/main/java/com/google/cloud/pubsub/v1
- publisher
- createtopic
- create
- deletetopic
- detachsubscription
- getiampolicy
- gettopic
- listtopicsnapshots
- listtopicsubscriptions
- listtopics
- publish
- setiampolicy
- testiampermissions
- updatetopic
- schemaservicesettings/createschema
- schemaservice
- commitschema
- createschema
- create
- deleteschemarevision
- deleteschema
- getiampolicy
- getschema
- listschemarevisions
- listschemas
- rollbackschema
- setiampolicy
- testiampermissions
- validatemessage
- validateschema
- stub
- publisherstubsettings/createtopic
- schemaservicestubsettings/createschema
- subscriberstubsettings/createsubscription
- subscriber
- acknowledge
- createsnapshot
- createsubscription
- create
- deletesnapshot
- deletesubscription
- getiampolicy
- getsnapshot
- getsubscription
- listsnapshots
- listsubscriptions
- modifyackdeadline
- modifypushconfig
- pull
- seek
- setiampolicy
- streamingpull
- testiampermissions
- updatesnapshot
- updatesubscription
- subscriptionadminsettings/createsubscription
- topicadminsettings/createtopic
- src/com/google
- cloud/pubsub/v1
- stub
- pubsub/v1
- redis
- samples/snippets/generated/main/java/com/google/cloud/redis/v1beta1
- cloudredissettings
- createinstance
- getinstance
- cloudredis
- createinstance
- create
- deleteinstance
- exportinstance
- failoverinstance
- getinstanceauthstring
- getinstance
- importinstance
- listinstances
- reschedulemaintenance
- updateinstance
- upgradeinstance
- stub/cloudredisstubsettings
- createinstance
- getinstance
- src/com/google/cloud/redis/v1beta1
- stub
- storage
- samples/snippets/generated/main/java/com/google/storage/v2
- storagesettings/deletebucket
- storage
- cancelresumablewrite
- composeobject
- createbucket
- createhmackey
- createnotification
- create
- deletebucket
- deletehmackey
- deletenotification
- deleteobject
- getbucket
- gethmackey
- getiampolicy
- getnotification
- getobject
- getserviceaccount
- listbuckets
- listhmackeys
- listnotifications
- listobjects
- lockbucketretentionpolicy
- querywritestatus
- readobject
- rewriteobject
- setiampolicy
- startresumablewrite
- testiampermissions
- updatebucket
- updatehmackey
- updateobject
- writeobject
- stub/storagestubsettings/deletebucket
- src/com/google/storage/v2
- stub
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
2,170 files changed
+2227
-2187
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
27 | 36 | | |
28 | 37 | | |
29 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
323 | 324 | | |
324 | 325 | | |
325 | 326 | | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
326 | 331 | | |
327 | 332 | | |
328 | 333 | | |
| |||
Lines changed: 18 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
38 | | - | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| |||
78 | 79 | | |
79 | 80 | | |
80 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
81 | 98 | | |
Lines changed: 25 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | 30 | | |
32 | 31 | | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
| 32 | + | |
50 | 33 | | |
51 | 34 | | |
52 | 35 | | |
| |||
71 | 54 | | |
72 | 55 | | |
73 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
74 | 78 | | |
75 | 79 | | |
76 | 80 | | |
| |||
100 | 104 | | |
101 | 105 | | |
102 | 106 | | |
103 | | - | |
| 107 | + | |
104 | 108 | | |
105 | 109 | | |
106 | 110 | | |
107 | 111 | | |
108 | 112 | | |
109 | | - | |
| 113 | + | |
110 | 114 | | |
111 | 115 | | |
112 | 116 | | |
| |||
118 | 122 | | |
119 | 123 | | |
120 | 124 | | |
121 | | - | |
| 125 | + | |
122 | 126 | | |
123 | 127 | | |
124 | 128 | | |
| |||
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
172 | 173 | | |
173 | 174 | | |
174 | 175 | | |
| 176 | + | |
175 | 177 | | |
176 | 178 | | |
177 | 179 | | |
| |||
188 | 190 | | |
189 | 191 | | |
190 | 192 | | |
| 193 | + | |
191 | 194 | | |
192 | 195 | | |
193 | 196 | | |
| |||
206 | 209 | | |
207 | 210 | | |
208 | 211 | | |
| 212 | + | |
209 | 213 | | |
210 | 214 | | |
211 | 215 | | |
| |||
222 | 226 | | |
223 | 227 | | |
224 | 228 | | |
| 229 | + | |
225 | 230 | | |
226 | 231 | | |
227 | 232 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
0 commit comments