@@ -71,7 +71,7 @@ public void testInvalidServiceAccountCryptoSigner() {
7171 public void testIAMCryptoSigner () throws Exception {
7272 String signature = BaseEncoding .base64 ().encode ("signed-bytes" .getBytes ());
7373 String response = Utils .getDefaultJsonFactory ().toString (
74- ImmutableMap .of ("signature " , signature ));
74+ ImmutableMap .of ("signedBlob " , signature ));
7575 MockHttpTransport transport = new MockHttpTransport .Builder ()
7676 .setLowLevelHttpResponse (new MockLowLevelHttpResponse ().setContent (response ))
7777 .build ();
@@ -84,7 +84,7 @@ public void testIAMCryptoSigner() throws Exception {
8484
8585 byte [] data = signer .sign ("foo" .getBytes ());
8686 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/"
8888 + "test-service-account@iam.gserviceaccount.com:signBlob" ;
8989 assertEquals (url , interceptor .getResponse ().getRequest ().getUrl ().toString ());
9090 }
@@ -150,7 +150,7 @@ public void testInvalidIAMCryptoSigner() {
150150 public void testMetadataService () throws Exception {
151151 String signature = BaseEncoding .base64 ().encode ("signed-bytes" .getBytes ());
152152 String response = Utils .getDefaultJsonFactory ().toString (
153- ImmutableMap .of ("signature " , signature ));
153+ ImmutableMap .of ("signedBlob " , signature ));
154154 MockHttpTransport transport = new MultiRequestMockHttpTransport (
155155 ImmutableList .of (
156156 new MockLowLevelHttpResponse ().setContent ("metadata-server@iam.gserviceaccount.com" ),
@@ -168,7 +168,7 @@ public void testMetadataService() throws Exception {
168168
169169 byte [] data = signer .sign ("foo" .getBytes ());
170170 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/"
172172 + "metadata-server@iam.gserviceaccount.com:signBlob" ;
173173 HttpRequest request = interceptor .getResponse ().getRequest ();
174174 assertEquals (url , request .getUrl ().toString ());
@@ -179,7 +179,7 @@ public void testMetadataService() throws Exception {
179179 public void testExplicitServiceAccountEmail () throws Exception {
180180 String signature = BaseEncoding .base64 ().encode ("signed-bytes" .getBytes ());
181181 String response = Utils .getDefaultJsonFactory ().toString (
182- ImmutableMap .of ("signature " , signature ));
182+ ImmutableMap .of ("signedBlob " , signature ));
183183
184184 // Explicit service account should get precedence
185185 MockHttpTransport transport = new MultiRequestMockHttpTransport (
@@ -198,7 +198,7 @@ public void testExplicitServiceAccountEmail() throws Exception {
198198
199199 byte [] data = signer .sign ("foo" .getBytes ());
200200 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/"
202202 + "explicit-service-account@iam.gserviceaccount.com:signBlob" ;
203203 HttpRequest request = interceptor .getResponse ().getRequest ();
204204 assertEquals (url , request .getUrl ().toString ());
0 commit comments