Skip to content

Commit

Permalink
Merge branch 'fix/TeamsComplianceRecordingPolicy' of https://github.c…
Browse files Browse the repository at this point in the history
…om/swisscom/Microsoft365DSC into fix/TeamsComplianceRecordingPolicy
  • Loading branch information
sandrola committed May 15, 2024
2 parents 4a10387 + d719425 commit 4d101f5
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 26 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,8 @@
* Added EnableAIPIntegration.
* TeamsChannelTab
* Fixed schema file
* TeamsComplianceRecordingPolicy
* FIXES [[#3712](https://github.com/microsoft/Microsoft365DSC/issues/3712)]
* TeamsGroupPolicyAssignment
* Skip assignments that have orphaned/deleted groups or without display name
instead of throwing an error
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture {
Description = 'FakeStringValue'
Enabled = $True
DisableComplianceRecordingAudioNotificationForCalls = $True
ComplianceRecordingApplications = @('123456')
Identity = 'FakeStringValue'
Ensure = 'Absent'
Credential = $Credential
Expand All @@ -110,14 +109,29 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture {
Description = 'FakeStringValue'
Enabled = $True
DisableComplianceRecordingAudioNotificationForCalls = $True
ComplianceRecordingApplications = "Microsoft.Teams.Policy.Aministration.Cmdlets.Core.CompianceRecordingApplication"
ComplianceRecordingApplications = @(
@{
Id = '00000000-0000-0000-0000-000000000000'
ComplianceRecordingPairedApplications = @()
ConcurrentInvitationCount = 1
RequiredDuringCall = $True
RequiredBeforeMeetingJoin = $True
RequiredBeforeCallEstablishment = $True
RequiredDuringMeeting = $True
}
)
Identity = 'FakeStringValue'
}
}
Mock -CommandName Get-CsTeamsComplianceRecordingApplication -MockWith {
return @{
Identity = 'FakeStringValue/123456'
Id = '123456'
Id = '00000000-0000-0000-0000-000000000000'
ComplianceRecordingPairedApplications = @()
ConcurrentInvitationCount = 1
RequiredDuringCall = $True
RequiredBeforeMeetingJoin = $True
RequiredBeforeCallEstablishment = $True
RequiredDuringMeeting = $True
}
}

Expand All @@ -127,9 +141,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture {
$Result = (Get-TargetResource @testParams)
$Result.Ensure | Should -Be 'Present'
$Result.ComplianceRecordingApplications.Length | Should -Be 1
$Result.ComplianceRecordingApplications[0] | Should -Be '123456'
Should -Invoke -CommandName Get-CsTeamsComplianceRecordingPolicy -Exactly 1
Should -Invoke -CommandName Get-CsTeamsComplianceRecordingApplication -ParameterFilter {$Filter -eq 'FakeStringValue/*'} -Exactly 1

}

Expand All @@ -150,7 +162,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture {
Description = 'FakeStringValue'
Enabled = $True
DisableComplianceRecordingAudioNotificationForCalls = $True
ComplianceRecordingApplications = @('123456')
Identity = 'FakeStringValue'
Ensure = 'Present'
Credential = $Credential
Expand All @@ -162,15 +173,29 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture {
Description = 'FakeStringValue'
Enabled = $True
DisableComplianceRecordingAudioNotificationForCalls = $True
ComplianceRecordingApplications = "Microsoft.Teams.Policy.Aministration.Cmdlets.Core.CompianceRecordingApplication"
ComplianceRecordingApplications = @(
@{
Id = '00000000-0000-0000-0000-000000000000'
ComplianceRecordingPairedApplications = @()
ConcurrentInvitationCount = 1
RequiredDuringCall = $True
RequiredBeforeMeetingJoin = $True
RequiredBeforeCallEstablishment = $True
RequiredDuringMeeting = $True
}
)
Identity = 'FakeStringValue'

}
}
Mock -CommandName Get-CsTeamsComplianceRecordingApplication -MockWith {
return @{
Identity = 'FakeStringValue/123456'
Id = '123456'
Id = '00000000-0000-0000-0000-000000000000'
ComplianceRecordingPairedApplications = @()
ConcurrentInvitationCount = 1
RequiredDuringCall = $True
RequiredBeforeMeetingJoin = $True
RequiredBeforeCallEstablishment = $True
RequiredDuringMeeting = $True
}
}
}
Expand All @@ -195,18 +220,33 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture {
Mock -CommandName Get-CsTeamsComplianceRecordingPolicy -MockWith {
return @{
WarnUserOnRemoval = $False
Description = 'FakeStringValueDrift' #Drift
Enabled = $False
DisableComplianceRecordingAudioNotificationForCalls = $False
ComplianceRecordingApplications = "Microsoft.Teams.Policy.Aministration.Cmdlets.Core.CompianceRecordingApplication"
Description = 'FakeStringValue'
Enabled = $True
DisableComplianceRecordingAudioNotificationForCalls = $True
ComplianceRecordingApplications = @(
@{
Id = '00000000-0000-0000-0000-000000000000'
ComplianceRecordingPairedApplications = @()
ConcurrentInvitationCount = 1
RequiredDuringCall = $True
RequiredBeforeMeetingJoin = $True
RequiredBeforeCallEstablishment = $True
RequiredDuringMeeting = $True
}
)
Identity = 'FakeStringValue'
}
}

Mock -CommandName Get-CsTeamsComplianceRecordingApplication -MockWith {
return @{
Identity = 'FakeStringValue/123456Drift'
Id = '123456Drift' #Drift
Id = '00000000-0000-0000-0000-000000000000'
ComplianceRecordingPairedApplications = @()
ConcurrentInvitationCount = 1
RequiredDuringCall = $True
RequiredBeforeMeetingJoin = $True
RequiredBeforeCallEstablishment = $True
RequiredDuringMeeting = $True
}
}
}
Expand Down Expand Up @@ -239,18 +279,20 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture {
Description = 'FakeStringValue'
Enabled = $True
DisableComplianceRecordingAudioNotificationForCalls = $True
ComplianceRecordingApplications = "Microsoft.Teams.Policy.Aministration.Cmdlets.Core.CompianceRecordingApplication"
ComplianceRecordingApplications = @(
@{
Id = '00000000-0000-0000-0000-000000000000'
ComplianceRecordingPairedApplications = @()
ConcurrentInvitationCount = 1
RequiredDuringCall = $True
RequiredBeforeMeetingJoin = $True
RequiredBeforeCallEstablishment = $True
RequiredDuringMeeting = $True
}
)
Identity = 'FakeStringValue'

}
}
Mock -CommandName Get-CsTeamsComplianceRecordingApplication -MockWith {
return @{
Identity = 'FakeStringValue/123456'
Id = '123456'
}
}

}

It 'Should Reverse Engineer resource from the Export method' {
Expand Down

0 comments on commit 4d101f5

Please sign in to comment.