Skip to content
GitLab
Menu
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
e0be77fb
Commit
e0be77fb
authored
Jan 27, 2021
by
Komal Makkar
Browse files
Addressing failed test for option request.
parent
8a179dfc
Pipeline
#23763
failed with stages
in 1 minute and 5 seconds
Changes
3
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
provider/notification-azure/src/main/java/org/opengroup/osdu/notification/provider/azure/pubsub/EventGridRequestBodyExtractor.java
View file @
e0be77fb
...
...
@@ -29,6 +29,7 @@ import org.opengroup.osdu.notification.provider.interfaces.IPubsubRequestBodyExt
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.stereotype.Component
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.context.annotation.RequestScope
;
import
javax.servlet.http.HttpServletRequest
;
...
...
@@ -152,7 +153,7 @@ public class EventGridRequestBodyExtractor implements IPubsubRequestBodyExtracto
// TODO : @komakkar sanitize the exceptions to match the SpringExceptionMapper and throw ValidationException
private
NotificationRequest
extractNotificationRequestFromHttpRequest
()
{
NotificationRequest
notificationRequest
=
null
;
if
(
this
.
notificationRequest
==
null
)
{
if
(
this
.
notificationRequest
==
null
&&
this
.
httpServletRequest
.
getMethod
().
equalsIgnoreCase
(
"post"
)
)
{
try
{
String
requestBody
=
getBody
(
this
.
httpServletRequest
);
NotificationRequest
[]
notificationRequestArray
=
GSON
.
fromJson
(
requestBody
,
NotificationRequest
[].
class
);
...
...
provider/notification-azure/src/test/java/org/opengroup/osdu/notification/provider/azure/pubsub/EventGridRequestBodyExtractorTest.java
View file @
e0be77fb
...
...
@@ -213,7 +213,7 @@ public class EventGridRequestBodyExtractorTest {
BufferedReader
reader
=
new
BufferedReader
(
new
StringReader
(
validHandshakeRequestRoot
));
ByteArrayInputStream
byteArrayInputStream
=
new
ByteArrayInputStream
(
validHandshakeRequestRoot
.
getBytes
());
when
(
httpServletRequest
.
getMethod
()).
thenReturn
(
"POST"
);
when
(
httpServletRequest
.
getInputStream
()).
thenReturn
(
new
ServletInputStream
()
{
@Override
public
boolean
isFinished
()
{
...
...
testing/notification-test-azure/src/test/java/org/opengroup/osdu/notification/api/TestPubsubEndpointHMAC.java
View file @
e0be77fb
...
...
@@ -90,7 +90,7 @@ public class TestPubsubEndpointHMAC extends PubsubEndpointHMACTests {
}
@Test
@Override
// ignoring because it is flaky. Fixing in a different MR
@Override
public
void
should_return20X_when_usingCredentialsWithOpsPermission
()
throws
Exception
{
this
.
createResource
();
...
...
@@ -115,7 +115,7 @@ public class TestPubsubEndpointHMAC extends PubsubEndpointHMACTests {
}
@Test
@Override
// ignoring because it is flaky. Debugging it to fix.
@Override
public
void
should_return20XResponseCode_when_makingValidHttpsRequest
()
throws
Exception
{
this
.
createResource
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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