Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Open Subsurface Data Universe Software
Platform
System
Notification
Commits
e3b62528
Commit
e3b62528
authored
Oct 13, 2021
by
Rucha Deshpande
Browse files
test temp istio headers
parent
fb2d0de6
Changes
2
Hide whitespace changes
Inline
Side-by-side
notification-core/src/main/java/org/opengroup/osdu/notification/service/SubscriptionHandler.java
View file @
e3b62528
...
...
@@ -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
);
...
...
testing/notification-test-aws/src/test/java/org/opengroup/osdu/notification/api/TestPubsubEndpointHMAC.java
View file @
e3b62528
...
...
@@ -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
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment