Skip to content
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

[Monitor] Update action group test and data collection rule design #24099

Merged
merged 1 commit into from
Feb 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,20 @@
"Headers": {
"Cache-Control": [ "no-cache" ],
"Pragma": [ "no-cache" ],
"X-ActivityId": [ "bed8f3e7-6d2e-4d84-a9b7-b440bfe27658" ],
"X-ActivityId": [ "9b6af2d6-a94d-42ea-b711-a12978ee3327" ],
"Access-Control-Expose-Headers": [ "x-activityid" ],
"Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ],
"X-Frame-Options": [ "SAMEORIGIN" ],
"X-ServedBy": [ "SN1AZNS000001" ],
"X-ServedBy": [ "SN2AZNS000005" ],
"api-supported-versions": [ "2016-09-01-preview, 2017-03-01-preview, 2017-04-01, 2018-03-01, 2018-09-01, 2019-03-01, 2019-06-01, 2021-09-01, 2022-04-01, 2022-06-01, 2023-01-01, 2023-03-01-preview, 2023-05-01-preview, 2023-05-01, 2023-08-01-preview, 2023-09-01-preview" ],
"Server": [ "Microsoft-HTTPAPI/2.0" ],
"x-ms-ratelimit-remaining-subscription-writes": [ "1199" ],
"x-ms-request-id": [ "67462913-8ec2-43f2-97fc-56e91f8bd45f" ],
"x-ms-correlation-request-id": [ "67462913-8ec2-43f2-97fc-56e91f8bd45f" ],
"x-ms-routing-request-id": [ "SOUTHEASTASIA:20231108T053833Z:67462913-8ec2-43f2-97fc-56e91f8bd45f" ],
"x-ms-request-id": [ "7ae1f2a6-edc5-4090-b483-587dfa9444b0" ],
"x-ms-correlation-request-id": [ "7ae1f2a6-edc5-4090-b483-587dfa9444b0" ],
"x-ms-routing-request-id": [ "SOUTHEASTASIA:20240204T084834Z:7ae1f2a6-edc5-4090-b483-587dfa9444b0" ],
"X-Content-Type-Options": [ "nosniff" ],
"Date": [ "Wed, 08 Nov 2023 05:38:33 GMT" ]
"X-Cache": [ "CONFIG_NOCACHE" ],
"X-MSEdge-Ref": [ "Ref A: 0A6BDA0052414F6FA3138C9654DC4E10 Ref B: MAA201060514051 Ref C: 2024-02-04T08:48:32Z" ],
"Date": [ "Sun, 04 Feb 2024 08:48:34 GMT" ]
},
"ContentHeaders": {
"Content-Length": [ "156" ],
Expand All @@ -47,12 +48,12 @@
"Content": null,
"isContentBase64": false,
"Headers": {
"x-ms-unique-id": [ "5" ],
"x-ms-client-request-id": [ "6dec28d8-b20a-482a-a339-d8378099d5a5" ],
"x-ms-unique-id": [ "8" ],
"x-ms-client-request-id": [ "88d6c762-ffc9-4310-9efa-898aabfaa28b" ],
"CommandName": [ "Get-AzActionGroup" ],
"FullCommandName": [ "Get-AzActionGroup_Get" ],
"ParameterSetName": [ "__AllParameterSets" ],
"User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.3.9", "Az.ActionGroup/0.1.0" ],
"User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.3.11", "Az.ActionGroup/0.1.0" ],
"Authorization": [ "[Filtered]" ]
},
"ContentHeaders": {
Expand All @@ -63,19 +64,20 @@
"Headers": {
"Cache-Control": [ "no-cache" ],
"Pragma": [ "no-cache" ],
"X-ActivityId": [ "6dec28d8-b20a-482a-a339-d8378099d5a5" ],
"X-ActivityId": [ "88d6c762-ffc9-4310-9efa-898aabfaa28b" ],
"Access-Control-Expose-Headers": [ "x-activityid" ],
"Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ],
"X-Frame-Options": [ "SAMEORIGIN" ],
"X-ServedBy": [ "SN1AZNS000001" ],
"X-ServedBy": [ "SN2AZNS000007" ],
"api-supported-versions": [ "2016-09-01-preview, 2017-03-01-preview, 2017-04-01, 2018-03-01, 2018-09-01, 2019-03-01, 2019-06-01, 2021-09-01, 2022-04-01, 2022-06-01, 2023-01-01, 2023-03-01-preview, 2023-05-01-preview, 2023-05-01, 2023-08-01-preview, 2023-09-01-preview" ],
"Server": [ "Microsoft-HTTPAPI/2.0" ],
"x-ms-ratelimit-remaining-subscription-resource-requests": [ "249" ],
"x-ms-request-id": [ "3bd50f72-aa0b-4390-a375-e30f5555ee0a" ],
"x-ms-correlation-request-id": [ "3bd50f72-aa0b-4390-a375-e30f5555ee0a" ],
"x-ms-routing-request-id": [ "SOUTHEASTASIA:20231108T053834Z:3bd50f72-aa0b-4390-a375-e30f5555ee0a" ],
"x-ms-request-id": [ "f827b29f-5f42-444b-acdb-5325adc7bea9" ],
"x-ms-correlation-request-id": [ "f827b29f-5f42-444b-acdb-5325adc7bea9" ],
"x-ms-routing-request-id": [ "SOUTHEASTASIA:20240204T084836Z:f827b29f-5f42-444b-acdb-5325adc7bea9" ],
"X-Content-Type-Options": [ "nosniff" ],
"Date": [ "Wed, 08 Nov 2023 05:38:34 GMT" ]
"X-Cache": [ "CONFIG_NOCACHE" ],
"X-MSEdge-Ref": [ "Ref A: 662AEEFE427947F8868907FCE56BA4AB Ref B: MAA201060514051 Ref C: 2024-02-04T08:48:34Z" ],
"Date": [ "Sun, 04 Feb 2024 08:48:36 GMT" ]
},
"ContentHeaders": {
"Content-Length": [ "777" ],
Expand Down Expand Up @@ -104,19 +106,20 @@
"Headers": {
"Cache-Control": [ "no-cache" ],
"Pragma": [ "no-cache" ],
"X-ActivityId": [ "e173494b-ac91-4386-b8d8-40a6556acc6c" ],
"X-ActivityId": [ "e7014e5a-a668-46c0-ac5b-cf952afdaf1a" ],
"Access-Control-Expose-Headers": [ "x-activityid" ],
"Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ],
"X-Frame-Options": [ "SAMEORIGIN" ],
"X-ServedBy": [ "SN1AZNS000001" ],
"X-ServedBy": [ "SN2AZNS000008" ],
"api-supported-versions": [ "2016-09-01-preview, 2017-03-01-preview, 2017-04-01, 2018-03-01, 2018-09-01, 2019-03-01, 2019-06-01, 2021-09-01, 2022-04-01, 2022-06-01, 2023-01-01, 2023-03-01-preview, 2023-05-01-preview, 2023-05-01, 2023-08-01-preview, 2023-09-01-preview" ],
"Server": [ "Microsoft-HTTPAPI/2.0" ],
"x-ms-ratelimit-remaining-subscription-writes": [ "1198" ],
"x-ms-request-id": [ "08559265-1150-41df-aad8-73c7d374943f" ],
"x-ms-correlation-request-id": [ "08559265-1150-41df-aad8-73c7d374943f" ],
"x-ms-routing-request-id": [ "SOUTHEASTASIA:20231108T053835Z:08559265-1150-41df-aad8-73c7d374943f" ],
"x-ms-ratelimit-remaining-subscription-writes": [ "1199" ],
"x-ms-request-id": [ "7181cfdd-c2a5-4635-b8c4-a581ad858419" ],
"x-ms-correlation-request-id": [ "7181cfdd-c2a5-4635-b8c4-a581ad858419" ],
"x-ms-routing-request-id": [ "SOUTHEASTASIA:20240204T084839Z:7181cfdd-c2a5-4635-b8c4-a581ad858419" ],
"X-Content-Type-Options": [ "nosniff" ],
"Date": [ "Wed, 08 Nov 2023 05:38:34 GMT" ]
"X-Cache": [ "CONFIG_NOCACHE" ],
"X-MSEdge-Ref": [ "Ref A: 082BF55A3386421BB43FF609C6C1DF7C Ref B: MAA201060514051 Ref C: 2024-02-04T08:48:37Z" ],
"Date": [ "Sun, 04 Feb 2024 08:48:39 GMT" ]
},
"ContentHeaders": {
"Content-Length": [ "159" ],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ if(($null -eq $TestName) -or ($TestName -contains 'Enable-AzActionGroupReceiver'
Describe 'Enable-AzActionGroupReceiver' {
It 'EnableExpanded' {
{
# Receiver with name smsreceiver in action group with Id MONITOR:xx is already enabled
Enable-AzActionGroupReceiver -ActionGroupName $env.actiongroupname -ResourceGroupName $env.resourceGroup -ReceiverName $env.smsreceiver
} | Should -Not -Throw
} | Should -Throw "is already enabled"
}

It 'EnableViaJsonString' -skip {
Expand All @@ -30,9 +31,10 @@ Describe 'Enable-AzActionGroupReceiver' {
}

It 'EnableViaIdentityExpanded' {
{
{
# Receiver with name smsreceiver in action group with Id MONITOR:xx is already enabled
$ag = Get-AzActionGroup -Name $env.actiongroupname -ResourceGroupName $env.resourceGroup
Enable-AzActionGroupReceiver -InputObject $ag -ReceiverName $env.emailreceiver1
} | Should -Not -Throw
} | Should -Throw "is already enabled"
}
}
Loading
Loading