@@ -71,7 +71,7 @@ public void testInvalidServiceAccountCryptoSigner() {
71
71
public void testIAMCryptoSigner () throws Exception {
72
72
String signature = BaseEncoding .base64 ().encode ("signed-bytes" .getBytes ());
73
73
String response = Utils .getDefaultJsonFactory ().toString (
74
- ImmutableMap .of ("signature " , signature ));
74
+ ImmutableMap .of ("signedBlob " , signature ));
75
75
MockHttpTransport transport = new MockHttpTransport .Builder ()
76
76
.setLowLevelHttpResponse (new MockLowLevelHttpResponse ().setContent (response ))
77
77
.build ();
@@ -84,7 +84,7 @@ public void testIAMCryptoSigner() throws Exception {
84
84
85
85
byte [] data = signer .sign ("foo" .getBytes ());
86
86
assertArrayEquals ("signed-bytes" .getBytes (), data );
87
- final String url = "https://iam .googleapis.com/v1/projects/-/serviceAccounts/"
87
+ final String url = "https://iamcredentials .googleapis.com/v1/projects/-/serviceAccounts/"
88
88
89
89
assertEquals (url , interceptor .getResponse ().getRequest ().getUrl ().toString ());
90
90
}
@@ -150,7 +150,7 @@ public void testInvalidIAMCryptoSigner() {
150
150
public void testMetadataService () throws Exception {
151
151
String signature = BaseEncoding .base64 ().encode ("signed-bytes" .getBytes ());
152
152
String response = Utils .getDefaultJsonFactory ().toString (
153
- ImmutableMap .of ("signature " , signature ));
153
+ ImmutableMap .of ("signedBlob " , signature ));
154
154
MockHttpTransport transport = new MultiRequestMockHttpTransport (
155
155
ImmutableList .of (
156
156
new MockLowLevelHttpResponse ().
setContent (
"[email protected] " ),
@@ -168,7 +168,7 @@ public void testMetadataService() throws Exception {
168
168
169
169
byte [] data = signer .sign ("foo" .getBytes ());
170
170
assertArrayEquals ("signed-bytes" .getBytes (), data );
171
- final String url = "https://iam .googleapis.com/v1/projects/-/serviceAccounts/"
171
+ final String url = "https://iamcredentials .googleapis.com/v1/projects/-/serviceAccounts/"
172
172
173
173
HttpRequest request = interceptor .getResponse ().getRequest ();
174
174
assertEquals (url , request .getUrl ().toString ());
@@ -179,7 +179,7 @@ public void testMetadataService() throws Exception {
179
179
public void testExplicitServiceAccountEmail () throws Exception {
180
180
String signature = BaseEncoding .base64 ().encode ("signed-bytes" .getBytes ());
181
181
String response = Utils .getDefaultJsonFactory ().toString (
182
- ImmutableMap .of ("signature " , signature ));
182
+ ImmutableMap .of ("signedBlob " , signature ));
183
183
184
184
// Explicit service account should get precedence
185
185
MockHttpTransport transport = new MultiRequestMockHttpTransport (
@@ -198,7 +198,7 @@ public void testExplicitServiceAccountEmail() throws Exception {
198
198
199
199
byte [] data = signer .sign ("foo" .getBytes ());
200
200
assertArrayEquals ("signed-bytes" .getBytes (), data );
201
- final String url = "https://iam .googleapis.com/v1/projects/-/serviceAccounts/"
201
+ final String url = "https://iamcredentials .googleapis.com/v1/projects/-/serviceAccounts/"
202
202
203
203
HttpRequest request = interceptor .getResponse ().getRequest ();
204
204
assertEquals (url , request .getUrl ().toString ());
0 commit comments