Skip to content

Commit 6e6d8fb

Browse files
authored
---
yaml --- r: 17667 b: refs/heads/autosynth-texttospeech c: e67981a h: refs/heads/master i: 17665: ab8ec63 17663: 96af7a6
1 parent a365d7c commit 6e6d8fb

2 files changed

Lines changed: 49 additions & 13 deletions

File tree

  • branches/autosynth-texttospeech/google-cloud-clients/google-cloud-storage/src/test/java/com/google/cloud/storage

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ refs/heads/autosynth-securitycenter: 8e95447ccb176c3648880ee0cb926cd1f4065156
143143
refs/heads/autosynth-spanner: 9bff86d057df31e04c76d72865e8e073ac5794fb
144144
refs/heads/autosynth-speech: 75d6c62a9d07d3a3642980502a25d07fbde0f232
145145
refs/heads/autosynth-tasks: b0cdb991f3f75345151a3f68db1aab273dfc069b
146-
refs/heads/autosynth-texttospeech: 3559aa7bbfb030f861d79825aab5093004a5dfe1
146+
refs/heads/autosynth-texttospeech: e67981a2d818cb0df68084014905305cbbbabcca
147147
refs/heads/autosynth-trace: 80c58aa2fb54b0a9c6876f2c21aa8d19cf55962e
148148
refs/heads/autosynth-websecurityscanner: d4febbffb6c648b74faec62fe90e20adadc9a7d3
149149
refs/heads/bigquerystorage: 06db74d123d7f8a3ef48755c2fcabed09faf8e64

branches/autosynth-texttospeech/google-cloud-clients/google-cloud-storage/src/test/java/com/google/cloud/storage/StorageImplTest.java

Lines changed: 48 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1662,7 +1662,10 @@ public void testSignUrl()
16621662
UnsupportedEncodingException {
16631663
EasyMock.replay(storageRpcMock);
16641664
ServiceAccountCredentials credentials =
1665-
new ServiceAccountCredentials(null, ACCOUNT, privateKey, null, null);
1665+
ServiceAccountCredentials.newBuilder()
1666+
.setClientEmail(ACCOUNT)
1667+
.setPrivateKey(privateKey)
1668+
.build();
16661669
storage = options.toBuilder().setCredentials(credentials).build().getService();
16671670
URL url = storage.signUrl(BLOB_INFO1, 14, TimeUnit.DAYS);
16681671
String stringUrl = url.toString();
@@ -1703,7 +1706,10 @@ public void testSignUrlWithHostName()
17031706
UnsupportedEncodingException {
17041707
EasyMock.replay(storageRpcMock);
17051708
ServiceAccountCredentials credentials =
1706-
new ServiceAccountCredentials(null, ACCOUNT, privateKey, null, null);
1709+
ServiceAccountCredentials.newBuilder()
1710+
.setClientEmail(ACCOUNT)
1711+
.setPrivateKey(privateKey)
1712+
.build();
17071713
storage = options.toBuilder().setCredentials(credentials).build().getService();
17081714
URL url =
17091715
storage.signUrl(
@@ -1750,7 +1756,10 @@ public void testSignUrlLeadingSlash()
17501756
String blobName = "/b1";
17511757
EasyMock.replay(storageRpcMock);
17521758
ServiceAccountCredentials credentials =
1753-
new ServiceAccountCredentials(null, ACCOUNT, privateKey, null, null);
1759+
ServiceAccountCredentials.newBuilder()
1760+
.setClientEmail(ACCOUNT)
1761+
.setPrivateKey(privateKey)
1762+
.build();
17541763
storage = options.toBuilder().setCredentials(credentials).build().getService();
17551764
URL url =
17561765
storage.signUrl(BlobInfo.newBuilder(BUCKET_NAME1, blobName).build(), 14, TimeUnit.DAYS);
@@ -1792,7 +1801,10 @@ public void testSignUrlLeadingSlashWithHostName()
17921801
String blobName = "/b1";
17931802
EasyMock.replay(storageRpcMock);
17941803
ServiceAccountCredentials credentials =
1795-
new ServiceAccountCredentials(null, ACCOUNT, privateKey, null, null);
1804+
ServiceAccountCredentials.newBuilder()
1805+
.setClientEmail(ACCOUNT)
1806+
.setPrivateKey(privateKey)
1807+
.build();
17961808
storage = options.toBuilder().setCredentials(credentials).build().getService();
17971809
URL url =
17981810
storage.signUrl(
@@ -1837,7 +1849,10 @@ public void testSignUrlWithOptions()
18371849
UnsupportedEncodingException {
18381850
EasyMock.replay(storageRpcMock);
18391851
ServiceAccountCredentials credentials =
1840-
new ServiceAccountCredentials(null, ACCOUNT, privateKey, null, null);
1852+
ServiceAccountCredentials.newBuilder()
1853+
.setClientEmail(ACCOUNT)
1854+
.setPrivateKey(privateKey)
1855+
.build();
18411856
storage = options.toBuilder().setCredentials(credentials).build().getService();
18421857
URL url =
18431858
storage.signUrl(
@@ -1889,7 +1904,10 @@ public void testSignUrlWithOptionsAndHostName()
18891904
UnsupportedEncodingException {
18901905
EasyMock.replay(storageRpcMock);
18911906
ServiceAccountCredentials credentials =
1892-
new ServiceAccountCredentials(null, ACCOUNT, privateKey, null, null);
1907+
ServiceAccountCredentials.newBuilder()
1908+
.setClientEmail(ACCOUNT)
1909+
.setPrivateKey(privateKey)
1910+
.build();
18931911
storage = options.toBuilder().setCredentials(credentials).build().getService();
18941912
URL url =
18951913
storage.signUrl(
@@ -1948,7 +1966,10 @@ public void testSignUrlForBlobWithSpecialChars()
19481966
};
19491967
EasyMock.replay(storageRpcMock);
19501968
ServiceAccountCredentials credentials =
1951-
new ServiceAccountCredentials(null, ACCOUNT, privateKey, null, null);
1969+
ServiceAccountCredentials.newBuilder()
1970+
.setClientEmail(ACCOUNT)
1971+
.setPrivateKey(privateKey)
1972+
.build();
19521973
storage = options.toBuilder().setCredentials(credentials).build().getService();
19531974

19541975
for (char specialChar : specialChars) {
@@ -2000,7 +2021,10 @@ public void testSignUrlForBlobWithSpecialCharsAndHostName()
20002021
};
20012022
EasyMock.replay(storageRpcMock);
20022023
ServiceAccountCredentials credentials =
2003-
new ServiceAccountCredentials(null, ACCOUNT, privateKey, null, null);
2024+
ServiceAccountCredentials.newBuilder()
2025+
.setClientEmail(ACCOUNT)
2026+
.setPrivateKey(privateKey)
2027+
.build();
20042028
storage = options.toBuilder().setCredentials(credentials).build().getService();
20052029

20062030
for (char specialChar : specialChars) {
@@ -2050,7 +2074,10 @@ public void testSignUrlWithExtHeaders()
20502074
UnsupportedEncodingException {
20512075
EasyMock.replay(storageRpcMock);
20522076
ServiceAccountCredentials credentials =
2053-
new ServiceAccountCredentials(null, ACCOUNT, privateKey, null, null);
2077+
ServiceAccountCredentials.newBuilder()
2078+
.setClientEmail(ACCOUNT)
2079+
.setPrivateKey(privateKey)
2080+
.build();
20542081
storage = options.toBuilder().setCredentials(credentials).build().getService();
20552082
Map<String, String> extHeaders = new HashMap<String, String>();
20562083
extHeaders.put("x-goog-acl", "public-read");
@@ -2107,7 +2134,10 @@ public void testSignUrlWithExtHeadersAndHostName()
21072134
UnsupportedEncodingException {
21082135
EasyMock.replay(storageRpcMock);
21092136
ServiceAccountCredentials credentials =
2110-
new ServiceAccountCredentials(null, ACCOUNT, privateKey, null, null);
2137+
ServiceAccountCredentials.newBuilder()
2138+
.setClientEmail(ACCOUNT)
2139+
.setPrivateKey(privateKey)
2140+
.build();
21112141
storage = options.toBuilder().setCredentials(credentials).build().getService();
21122142
Map<String, String> extHeaders = new HashMap<String, String>();
21132143
extHeaders.put("x-goog-acl", "public-read");
@@ -2165,7 +2195,10 @@ public void testSignUrlForBlobWithSlashes()
21652195
UnsupportedEncodingException {
21662196
EasyMock.replay(storageRpcMock);
21672197
ServiceAccountCredentials credentials =
2168-
new ServiceAccountCredentials(null, ACCOUNT, privateKey, null, null);
2198+
ServiceAccountCredentials.newBuilder()
2199+
.setClientEmail(ACCOUNT)
2200+
.setPrivateKey(privateKey)
2201+
.build();
21692202
storage = options.toBuilder().setCredentials(credentials).build().getService();
21702203

21712204
String blobName = "/foo/bar/baz #%20other cool stuff.txt";
@@ -2208,7 +2241,10 @@ public void testSignUrlForBlobWithSlashesAndHostName()
22082241
UnsupportedEncodingException {
22092242
EasyMock.replay(storageRpcMock);
22102243
ServiceAccountCredentials credentials =
2211-
new ServiceAccountCredentials(null, ACCOUNT, privateKey, null, null);
2244+
ServiceAccountCredentials.newBuilder()
2245+
.setClientEmail(ACCOUNT)
2246+
.setPrivateKey(privateKey)
2247+
.build();
22122248
storage = options.toBuilder().setCredentials(credentials).build().getService();
22132249

22142250
String blobName = "/foo/bar/baz #%20other cool stuff.txt";

0 commit comments

Comments
 (0)