-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Migrate EG tests to test proxy #21772
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 6 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
e7b223c
Migrate to test proxy
rakshith91 2b87dd3
sanitize
rakshith91 e133a17
Add recordings
rakshith91 a8b3f51
enable TP
rakshith91 17dc31b
update recordings
rakshith91 e3fc067
rebase
rakshith91 e1db07a
changes
rakshith91 782fe64
variabels
rakshith91 9a2ac2d
update recordings
rakshith91 99f1230
use powershell preparer
rakshith91 3b88d51
update sanitize
rakshith91 445de57
variables
rakshith91 0250c80
body matching
rakshith91 e4b711b
fix
rakshith91 cbd425a
sample vars
rakshith91 173c72d
skip
rakshith91 3adcc9e
fix samples
rakshith91 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
...est_cncf_events.pyTestEventGridPublisherClientCncftest_send_cloud_event_data_as_list.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| { | ||
| "Entries": [ | ||
| { | ||
| "RequestUri": "https://cloudeventgridtestuvxcvm.westus-1.eventgrid.azure.net/api/events?api-version=2018-01-01", | ||
| "RequestMethod": "POST", | ||
| "RequestHeaders": { | ||
| "Accept": "*/*", | ||
| "Accept-Encoding": "gzip, deflate", | ||
| "Connection": "keep-alive", | ||
| "Content-Length": "220", | ||
| "Content-Type": "application/cloudevents-batch\u002Bjson; charset=utf-8", | ||
| "User-Agent": "azsdk-python-eventgrid/4.7.0 Python/3.7.3 (Windows-10-10.0.18362-SP0)", | ||
| "x-ms-client-request-id": "b43d48c2-47e4-11ec-827e-2816a845e8c6" | ||
| }, | ||
| "RequestBody": "[{\u0022specversion\u0022: \u00221.0\u0022, \u0022id\u0022: \u002222b6e8ad-c33f-4dff-a4b5-dd8417ddc58d\u0022, \u0022source\u0022: \u0022https://example.com/event-producer\u0022, \u0022type\u0022: \u0022com.example.sampletype1\u0022, \u0022time\u0022: \u00222021-11-17T20:26:54.366352\u002B00:00\u0022, \u0022data\u0022: \u0022hello world\u0022}]", | ||
| "StatusCode": 200, | ||
| "ResponseHeaders": { | ||
| "api-supported-versions": "2018-01-01", | ||
| "Content-Length": "0", | ||
| "Date": "Wed, 17 Nov 2021 20:26:52 GMT", | ||
| "Server": "Microsoft-HTTPAPI/2.0", | ||
| "Strict-Transport-Security": "max-age=31536000; includeSubDomains", | ||
| "x-ms-request-id": "e6b7cee5-fc52-4880-9e30-5bf413f50840" | ||
| }, | ||
| "ResponseBody": null | ||
| } | ||
| ], | ||
| "Variables": {} | ||
| } |
29 changes: 29 additions & 0 deletions
29
...vents.pyTestEventGridPublisherClientCncftest_send_cloud_event_data_base64_using_data.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| { | ||
| "Entries": [ | ||
| { | ||
| "RequestUri": "https://cloudeventgridtestuvxcvm.westus-1.eventgrid.azure.net/api/events?api-version=2018-01-01", | ||
| "RequestMethod": "POST", | ||
| "RequestHeaders": { | ||
| "Accept": "*/*", | ||
| "Accept-Encoding": "gzip, deflate", | ||
| "Connection": "keep-alive", | ||
| "Content-Length": "232", | ||
| "Content-Type": "application/cloudevents-batch\u002Bjson; charset=utf-8", | ||
| "User-Agent": "azsdk-python-eventgrid/4.7.0 Python/3.7.3 (Windows-10-10.0.18362-SP0)", | ||
| "x-ms-client-request-id": "b3bc6d88-47e4-11ec-b381-2816a845e8c6" | ||
| }, | ||
| "RequestBody": "[{\u0022specversion\u0022: \u00221.0\u0022, \u0022id\u0022: \u002284c018cc-d75f-4274-adb7-f625765d4d68\u0022, \u0022source\u0022: \u0022https://example.com/event-producer\u0022, \u0022type\u0022: \u0022com.example.sampletype1\u0022, \u0022time\u0022: \u00222021-11-17T20:26:53.521881\u002B00:00\u0022, \u0022data_base64\u0022: \u0022aGVsbG8gd29ybGQ=\u0022}]", | ||
| "StatusCode": 200, | ||
| "ResponseHeaders": { | ||
| "api-supported-versions": "2018-01-01", | ||
| "Content-Length": "0", | ||
| "Date": "Wed, 17 Nov 2021 20:26:51 GMT", | ||
| "Server": "Microsoft-HTTPAPI/2.0", | ||
| "Strict-Transport-Security": "max-age=31536000; includeSubDomains", | ||
| "x-ms-request-id": "8c253faf-413e-42c6-ba3d-5a3c557d66f3" | ||
| }, | ||
| "ResponseBody": null | ||
| } | ||
| ], | ||
| "Variables": {} | ||
| } |
29 changes: 29 additions & 0 deletions
29
...s/test_cncf_events.pyTestEventGridPublisherClientCncftest_send_cloud_event_data_dict.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| { | ||
| "Entries": [ | ||
| { | ||
| "RequestUri": "https://cloudeventgridtestuvxcvm.westus-1.eventgrid.azure.net/api/events?api-version=2018-01-01", | ||
| "RequestMethod": "POST", | ||
| "RequestHeaders": { | ||
| "Accept": "*/*", | ||
| "Accept-Encoding": "gzip, deflate", | ||
| "Connection": "keep-alive", | ||
| "Content-Length": "234", | ||
| "Content-Type": "application/cloudevents-batch\u002Bjson; charset=utf-8", | ||
| "User-Agent": "azsdk-python-eventgrid/4.7.0 Python/3.7.3 (Windows-10-10.0.18362-SP0)", | ||
| "x-ms-client-request-id": "b2b6cbee-47e4-11ec-9d2c-2816a845e8c6" | ||
| }, | ||
| "RequestBody": "[{\u0022specversion\u0022: \u00221.0\u0022, \u0022id\u0022: \u002222c3b6dd-e8c4-40bc-b92a-a6332fb9a025\u0022, \u0022source\u0022: \u0022https://example.com/event-producer\u0022, \u0022type\u0022: \u0022com.example.sampletype1\u0022, \u0022time\u0022: \u00222021-11-17T20:26:51.807254\u002B00:00\u0022, \u0022data\u0022: {\u0022message\u0022: \u0022Hello World!\u0022}}]", | ||
| "StatusCode": 200, | ||
| "ResponseHeaders": { | ||
| "api-supported-versions": "2018-01-01", | ||
| "Content-Length": "0", | ||
| "Date": "Wed, 17 Nov 2021 20:26:50 GMT", | ||
| "Server": "Microsoft-HTTPAPI/2.0", | ||
| "Strict-Transport-Security": "max-age=31536000; includeSubDomains", | ||
| "x-ms-request-id": "0f97edfd-9e23-472f-a06f-3b49d791d1c7" | ||
| }, | ||
| "ResponseBody": null | ||
| } | ||
| ], | ||
| "Variables": {} | ||
| } |
29 changes: 29 additions & 0 deletions
29
...s/test_cncf_events.pyTestEventGridPublisherClientCncftest_send_cloud_event_data_none.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| { | ||
| "Entries": [ | ||
| { | ||
| "RequestUri": "https://cloudeventgridtestuvxcvm.westus-1.eventgrid.azure.net/api/events?api-version=2018-01-01", | ||
| "RequestMethod": "POST", | ||
| "RequestHeaders": { | ||
| "Accept": "*/*", | ||
| "Accept-Encoding": "gzip, deflate", | ||
| "Connection": "keep-alive", | ||
| "Content-Length": "197", | ||
| "Content-Type": "application/cloudevents-batch\u002Bjson; charset=utf-8", | ||
| "User-Agent": "azsdk-python-eventgrid/4.7.0 Python/3.7.3 (Windows-10-10.0.18362-SP0)", | ||
| "x-ms-client-request-id": "b3e293ca-47e4-11ec-9818-2816a845e8c6" | ||
| }, | ||
| "RequestBody": "[{\u0022specversion\u0022: \u00221.0\u0022, \u0022id\u0022: \u0022ae9bdfdf-b11e-4040-8911-6f14af06eafd\u0022, \u0022source\u0022: \u0022https://example.com/event-producer\u0022, \u0022type\u0022: \u0022com.example.sampletype1\u0022, \u0022time\u0022: \u00222021-11-17T20:26:53.770732\u002B00:00\u0022}]", | ||
| "StatusCode": 200, | ||
| "ResponseHeaders": { | ||
| "api-supported-versions": "2018-01-01", | ||
| "Content-Length": "0", | ||
| "Date": "Wed, 17 Nov 2021 20:26:51 GMT", | ||
| "Server": "Microsoft-HTTPAPI/2.0", | ||
| "Strict-Transport-Security": "max-age=31536000; includeSubDomains", | ||
| "x-ms-request-id": "b4eef19d-ad1f-40ec-9bb7-49ac338baa7d" | ||
| }, | ||
| "ResponseBody": null | ||
| } | ||
| ], | ||
| "Variables": {} | ||
| } |
29 changes: 29 additions & 0 deletions
29
...gs/test_cncf_events.pyTestEventGridPublisherClientCncftest_send_cloud_event_data_str.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| { | ||
| "Entries": [ | ||
| { | ||
| "RequestUri": "https://cloudeventgridtestuvxcvm.westus-1.eventgrid.azure.net/api/events?api-version=2018-01-01", | ||
| "RequestMethod": "POST", | ||
| "RequestHeaders": { | ||
| "Accept": "*/*", | ||
| "Accept-Encoding": "gzip, deflate", | ||
| "Connection": "keep-alive", | ||
| "Content-Length": "220", | ||
| "Content-Type": "application/cloudevents-batch\u002Bjson; charset=utf-8", | ||
| "User-Agent": "azsdk-python-eventgrid/4.7.0 Python/3.7.3 (Windows-10-10.0.18362-SP0)", | ||
| "x-ms-client-request-id": "b40b238a-47e4-11ec-ad96-2816a845e8c6" | ||
| }, | ||
| "RequestBody": "[{\u0022specversion\u0022: \u00221.0\u0022, \u0022id\u0022: \u00223a52347f-b9a4-415a-a046-f0b32bb2101a\u0022, \u0022source\u0022: \u0022https://example.com/event-producer\u0022, \u0022type\u0022: \u0022com.example.sampletype1\u0022, \u0022time\u0022: \u00222021-11-17T20:26:54.037720\u002B00:00\u0022, \u0022data\u0022: \u0022hello world\u0022}]", | ||
| "StatusCode": 200, | ||
| "ResponseHeaders": { | ||
| "api-supported-versions": "2018-01-01", | ||
| "Content-Length": "0", | ||
| "Date": "Wed, 17 Nov 2021 20:26:51 GMT", | ||
| "Server": "Microsoft-HTTPAPI/2.0", | ||
| "Strict-Transport-Security": "max-age=31536000; includeSubDomains", | ||
| "x-ms-request-id": "42d3de59-0733-406c-8b9f-35df07dfe8ad" | ||
| }, | ||
| "ResponseBody": null | ||
| } | ||
| ], | ||
| "Variables": {} | ||
| } |
29 changes: 29 additions & 0 deletions
29
..._events.pyTestEventGridPublisherClientCncftest_send_cloud_event_data_with_extensions.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| { | ||
| "Entries": [ | ||
| { | ||
| "RequestUri": "https://cloudeventgridtestuvxcvm.westus-1.eventgrid.azure.net/api/events?api-version=2018-01-01", | ||
| "RequestMethod": "POST", | ||
| "RequestHeaders": { | ||
| "Accept": "*/*", | ||
| "Accept-Encoding": "gzip, deflate", | ||
| "Connection": "keep-alive", | ||
| "Content-Length": "241", | ||
| "Content-Type": "application/cloudevents-batch\u002Bjson; charset=utf-8", | ||
| "User-Agent": "azsdk-python-eventgrid/4.7.0 Python/3.7.3 (Windows-10-10.0.18362-SP0)", | ||
| "x-ms-client-request-id": "b46ed012-47e4-11ec-b0c4-2816a845e8c6" | ||
| }, | ||
| "RequestBody": "[{\u0022specversion\u0022: \u00221.0\u0022, \u0022id\u0022: \u0022745ff7b5-1a86-46fd-9ee0-82d745713bee\u0022, \u0022source\u0022: \u0022https://example.com/event-producer\u0022, \u0022type\u0022: \u0022com.example.sampletype1\u0022, \u0022time\u0022: \u00222021-11-17T20:26:54.690943\u002B00:00\u0022, \u0022data\u0022: \u0022hello world\u0022, \u0022ext1\u0022: \u0022extension\u0022}]", | ||
| "StatusCode": 200, | ||
| "ResponseHeaders": { | ||
| "api-supported-versions": "2018-01-01", | ||
| "Content-Length": "0", | ||
| "Date": "Wed, 17 Nov 2021 20:26:52 GMT", | ||
| "Server": "Microsoft-HTTPAPI/2.0", | ||
| "Strict-Transport-Security": "max-age=31536000; includeSubDomains", | ||
| "x-ms-request-id": "e45102e9-40b0-44bd-b8fc-947ad689e168" | ||
| }, | ||
| "ResponseBody": null | ||
| } | ||
| ], | ||
| "Variables": {} | ||
| } |
38 changes: 0 additions & 38 deletions
38
...azure-eventgrid/tests/recordings/test_cncf_events.test_send_cloud_event_data_as_list.yaml
This file was deleted.
Oops, something went wrong.
38 changes: 0 additions & 38 deletions
38
...tgrid/tests/recordings/test_cncf_events.test_send_cloud_event_data_base64_using_data.yaml
This file was deleted.
Oops, something went wrong.
38 changes: 0 additions & 38 deletions
38
...id/azure-eventgrid/tests/recordings/test_cncf_events.test_send_cloud_event_data_dict.yaml
This file was deleted.
Oops, something went wrong.
38 changes: 0 additions & 38 deletions
38
...id/azure-eventgrid/tests/recordings/test_cncf_events.test_send_cloud_event_data_none.yaml
This file was deleted.
Oops, something went wrong.
38 changes: 0 additions & 38 deletions
38
...rid/azure-eventgrid/tests/recordings/test_cncf_events.test_send_cloud_event_data_str.yaml
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Importing
test_proxyfromdevtools_testutilsand referencing the fixture here should allow tests to use the proxy in CI: