Skip to content
Snippets Groups Projects
Commit e3b62528 authored by Rucha Deshpande's avatar Rucha Deshpande
Browse files

test temp istio headers

parent fb2d0de6
No related branches found
No related tags found
1 merge request!137Aws xuserid fix
......@@ -32,7 +32,9 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.io.IOException;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
@Component
public class SubscriptionHandler {
......@@ -64,6 +66,15 @@ public class SubscriptionHandler {
}
private String querySubscriptionAndUpdateCache(String notificationId) throws AppException, SubscriptionException {
System.out.println("**********TESTING ISTIO PRINTING ALL HEADERS*************");
Map<String, String> tempheaders = headers.getHeaders();
Iterator<String> itr = tempheaders.keySet().iterator();
while (itr.hasNext()) {
System.out.println(itr.next());
}
System.out.println("**********TESTING ISTIO PRINTING ALL HEADERS done*************");
ISubscriptionService service = subscriptionFactory.create(headers);
List<Subscription> subscriptionList = service.query(notificationId);
......
......@@ -56,4 +56,11 @@ public class TestPubsubEndpointHMAC extends PubsubEndpointHMACTests {
ClientResponse response = descriptor.runOnCustomerTenant(getArg(), getOsduTenantAdminCredentials());
assertEquals(error( response.getEntity(String.class)), 403, response.getStatus());
}
@Test
@Override
public void should_return400_when_makingHttpRequestWithoutToken() throws Exception {
ClientResponse response = descriptor.run(getArg(), "");
assertEquals(error(response.getEntity(String.class)), 401, response.getStatus());
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment