Skip to content

Commit

Permalink
Merge pull request #4033 from ricmestre/integration
Browse files Browse the repository at this point in the history
Integration tests (Intune): Call Test-DSCConfiguration after deploying the config
  • Loading branch information
NikCharlebois authored Dec 14, 2023
2 parents 2b583d0 + 19682e8 commit 588f19e
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 56 deletions.
49 changes: 0 additions & 49 deletions .github/workflows/AzureCloud - Integration.yml

This file was deleted.

33 changes: 32 additions & 1 deletion .github/workflows/Global - Integration - INTUNE.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,35 @@ jobs:
run: |
$CredPassword = ConvertTo-SecureString $env:PUBLIC_PASSWORD -AsPlainText -Force
$Credential = New-Object System.Management.Automation.PSCredential ($env:PUBLIC_USERNAME, $CredPassword)
& .\Tests\Integration\Microsoft365DSC\M365DSCIntegration.INTUNE.Tests.ps1 -Credential $Credential
try
{
& .\Tests\Integration\Microsoft365DSC\M365DSCIntegration.INTUNE.Tests.ps1 -Credential $Credential
}
catch
{
throw $_
}
try
{
$Result = Test-DSCConfiguration -Detailed -Verbose
}
catch
{
throw $_
}
if ($Result.InDesiredState -eq $false)
{
Write-Host -Message "Resources below are not in the Desired State:"
foreach ($Resource in $Result.ResourcesNotInDesiredState)
{
Write-Host $Resource.InstanceName
}
throw "Could not validate that the Tenant is in the Desired State"
}
else
{
Write-Host "All resources in the Tenant are in the Desired State"
}
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@
ManagedEmailProfileRequired = $True
Ensure = 'Present'
Credential = $Credscredential

}
IntuneDeviceCompliancePolicyiOs 'RemoveDeviceCompliancePolicyiOS'
{
Expand Down Expand Up @@ -461,7 +461,7 @@
{
Name = 'hosted_app'
}

MSFT_IntuneGroupPolicyDefinitionValuePresentationValueKeyValuePair
{
Name = 'user_script'
Expand Down Expand Up @@ -495,7 +495,7 @@
Id = '14c48993-35af-4b77-a4f8-12de917b1bb9'
odataType = '#microsoft.graph.groupPolicyPresentationValueDecimal'
}

MSFT_IntuneGroupPolicyDefinitionValuePresentationValue
{
presentationDefinitionId = '98998e7f-cc2a-4d96-8c47-35dd4b2ce56b'
Expand All @@ -504,7 +504,7 @@
Id = '4d654df9-6826-470f-af4e-d37491663c76'
odataType = '#microsoft.graph.groupPolicyPresentationValueDecimal'
}

MSFT_IntuneGroupPolicyDefinitionValuePresentationValue
{
presentationDefinitionId = '6900e752-4bc3-463b-9fc8-36d78c77bc3e'
Expand Down Expand Up @@ -2681,5 +2681,12 @@
}

# Compile and deploy configuration
Master -ConfigurationData $ConfigurationData -Credscredential $Credential
Start-DscConfiguration Master -Wait -Force -Verbose
try
{
Master -ConfigurationData $ConfigurationData -Credscredential $Credential
Start-DscConfiguration Master -Wait -Force -Verbose -ErrorAction Stop
}
catch
{
throw $_
}

0 comments on commit 588f19e

Please sign in to comment.