Skip to content

Commit f7baca6

Browse files
authored
---
yaml --- r: 13943 b: refs/heads/autosynth-compute c: e67981a h: refs/heads/master i: 13941: f47240e 13939: 226d8d8 13935: 3f868d0
1 parent 810a0c5 commit f7baca6

2 files changed

Lines changed: 49 additions & 13 deletions

File tree

  • branches/autosynth-compute/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
@@ -112,7 +112,7 @@ refs/tags/v0.64.0: 456e8fbd129deced3ca025f239a2d8a82bde1d0a
112112
refs/tags/v0.65.0: 10939381ffe0b8da32db4fe3087c86e3aa7f3e55
113113
refs/tags/v0.66.0: ed6a3f57cbdaa20339a1995f7d7d53b172a5b8ef
114114
refs/tags/v0.67.0: 30b56f02092efc6f3c3667650ea8b8825003e0b7
115-
refs/heads/autosynth-compute: 3559aa7bbfb030f861d79825aab5093004a5dfe1
115+
refs/heads/autosynth-compute: e67981a2d818cb0df68084014905305cbbbabcca
116116
refs/heads/autosynth-container: d0346e84b1f26e3dc10444450a998f357a43bcef
117117
refs/heads/autosynth-dataproc: bc74a8841bc1693d7945d991d15979df550b1fd1
118118
refs/heads/autosynth-monitoring: 120f508e0065f4ce39cf0e6a69a08138773f2cfb

branches/autosynth-compute/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)