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
766db006
Commit
766db006
authored
Sep 15, 2020
by
Komal Makkar
Browse files
Added tests
parent
70903b61
Pipeline
#8610
failed with stage
in 37 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
provider/notification-azure/src/test/java/org/opengroup/osdu/notification/provider/azure/EventGridRequestBodyExtractorTest.java
View file @
766db006
...
...
@@ -119,7 +119,7 @@ public class EventGridRequestBodyExtractorTest {
" \"dataVersion\": \"1.0\",\n"
+
" \"metadataVersion\": \"1\",\n"
+
" \"eventTime\": \"2020-08-14T18:04:12+00:00\",\n"
+
" \"topic\": \"/subscriptions/
c99e2bf3-1777-412b-baba-d823676589c2
/resourceGroups/komakkar-OSDU-RG/providers/Microsoft.EventGrid/topics/recordChanged\"\n"
+
" \"topic\": \"/subscriptions/
asdf
/resourceGroups/komakkar-OSDU-RG/providers/Microsoft.EventGrid/topics/recordChanged\"\n"
+
" }]"
;
BufferedReader
reader
=
new
BufferedReader
(
new
StringReader
(
requestRootWithoutAttributes
));
when
(
this
.
httpServletRequest
.
getReader
()).
thenReturn
(
reader
);
...
...
@@ -154,7 +154,7 @@ public class EventGridRequestBodyExtractorTest {
" \"dataVersion\": \"1.0\",\n"
+
" \"metadataVersion\": \"1\",\n"
+
" \"eventTime\": \"2020-08-14T18:04:12+00:00\",\n"
+
" \"topic\": \"/subscriptions/
c99e2bf3-1777-412b-baba-d823676589c2
/resourceGroups/komakkar-OSDU-RG/providers/Microsoft.EventGrid/topics/recordChanged\"\n"
+
" \"topic\": \"/subscriptions/
asdf
/resourceGroups/komakkar-OSDU-RG/providers/Microsoft.EventGrid/topics/recordChanged\"\n"
+
" }]"
;
BufferedReader
reader
=
new
BufferedReader
(
new
StringReader
(
requestRootWithoutData
));
when
(
this
.
httpServletRequest
.
getReader
()).
thenReturn
(
reader
);
...
...
@@ -189,7 +189,7 @@ public class EventGridRequestBodyExtractorTest {
" \"dataVersion\": \"1.0\",\n"
+
" \"metadataVersion\": \"1\",\n"
+
" \"eventTime\": \"2020-08-14T18:04:12+00:00\",\n"
+
" \"topic\": \"/subscriptions/
c99e2bf3-1777-412b-baba-d823676589c2
/resourceGroups/komakkar-OSDU-RG/providers/Microsoft.EventGrid/topics/recordChanged\"\n"
+
" \"topic\": \"/subscriptions/
asdf
/resourceGroups/komakkar-OSDU-RG/providers/Microsoft.EventGrid/topics/recordChanged\"\n"
+
" }]"
;
BufferedReader
reader
=
new
BufferedReader
(
new
StringReader
(
requestRootWithoutDataPartitionId
));
when
(
this
.
httpServletRequest
.
getReader
()).
thenReturn
(
reader
);
...
...
@@ -225,7 +225,7 @@ public class EventGridRequestBodyExtractorTest {
" \"dataVersion\": \"1.0\",\n"
+
" \"metadataVersion\": \"1\",\n"
+
" \"eventTime\": \"2020-08-14T18:04:12+00:00\",\n"
+
" \"topic\": \"/subscriptions/
c99e2bf3-1777-412b-baba-d823676589c2
/resourceGroups/komakkar-OSDU-RG/providers/Microsoft.EventGrid/topics/recordChanged\"\n"
+
" \"topic\": \"/subscriptions/
asdf
/resourceGroups/komakkar-OSDU-RG/providers/Microsoft.EventGrid/topics/recordChanged\"\n"
+
" }]"
;
String
expectedData
=
"[{\"kind\":\"testkind\",\"id\":\"testid\",\"operationtype\":\"create\"},{\"kind\":\"testkind2\",\"id\":\"testid2\",\"operationtype\":\"update\"}]"
;
...
...
@@ -259,7 +259,7 @@ public class EventGridRequestBodyExtractorTest {
" \"dataVersion\": \"1.0\",\n"
+
" \"metadataVersion\": \"1\",\n"
+
" \"eventTime\": \"2020-08-14T18:04:12+00:00\",\n"
+
" \"topic\": \"/subscriptions/
c99e2bf3-1777-412b-baba-d823676589c2
/resourceGroups/komakkar-OSDU-RG/providers/Microsoft.EventGrid/topics/recordChanged\"\n"
+
" \"topic\": \"/subscriptions/
asdf
/resourceGroups/komakkar-OSDU-RG/providers/Microsoft.EventGrid/topics/recordChanged\"\n"
+
" }]"
;
BufferedReader
reader
=
new
BufferedReader
(
new
StringReader
(
vaidRequestRoot
));
when
(
this
.
httpServletRequest
.
getReader
()).
thenReturn
(
reader
);
...
...
@@ -321,7 +321,7 @@ public class EventGridRequestBodyExtractorTest {
" \"dataVersion\": \"1.0\",\n"
+
" \"metadataVersion\": \"1\",\n"
+
" \"eventTime\": \"2020-08-14T18:04:12+00:00\",\n"
+
" \"topic\": \"/subscriptions/
c99e2bf3-1777-412b-baba-d823676589c2
/resourceGroups/komakkar-OSDU-RG/providers/Microsoft.EventGrid/topics/recordChanged\"\n"
+
" \"topic\": \"/subscriptions/
asdf
/resourceGroups/komakkar-OSDU-RG/providers/Microsoft.EventGrid/topics/recordChanged\"\n"
+
" }]"
;
String
expectedResponse
=
null
;
BufferedReader
reader
=
new
BufferedReader
(
new
StringReader
(
validHandshakeRequestRoot
));
...
...
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