Skip to content
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 @@ -183,7 +183,7 @@ function Push-CIPPDBCacheData {

if ($Item.TestRun -eq $true) {
$InputObject | Add-Member -NotePropertyName PostExecution -NotePropertyValue @{
FunctionName = 'CIPPTestsRun'
FunctionName = 'CIPPDBTestsRun'
Parameters = @{
TenantFilter = $TenantFilter
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function Invoke-CIPPTestsRun {
function Invoke-CIPPDBTestsRun {
<#
.FUNCTIONALITY
Entrypoint
Expand All @@ -13,6 +13,17 @@ function Invoke-CIPPTestsRun {

Write-Information "Starting tests run for tenant: $TenantFilter"

Write-Host 'Checking rerun protection'
$RerunParams = @{
TenantFilter = $TenantFilter
Type = 'CippTests'
API = 'CippTests'
}
$Rerun = Test-CIPPRerun @RerunParams
if ($Rerun -eq $true) {
Write-Host "rerun is true for $($TenantFilter)"
return $true
}
try {
$AllTests = Get-Command -Name 'Invoke-CippTest*' -Module CIPPCore | Select-Object -ExpandProperty Name | ForEach-Object {
$_ -replace '^Invoke-CippTest', ''
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ function Push-CIPPTest {

Write-Information "Executing $FunctionName for $TenantFilter"
& $FunctionName -Tenant $TenantFilter
Write-Host "Returning true, test has run for $tenantFilter"
return @{ testRun = $true }

} catch {
$ErrorMessage = Get-CippException -Exception $_
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function Push-CIPPTestsRun {
function Push-CIPPDBTestsRun {
<#
.SYNOPSIS
PostExecution function to run tests after data collection completes
Expand All @@ -13,7 +13,7 @@ function Push-CIPPTestsRun {
Write-LogMessage -API 'Tests' -tenant $TenantFilter -message 'Starting test run after data collection' -sev Info

# Call the test run function
$Result = Invoke-CIPPTestsRun -TenantFilter $TenantFilter
$Result = Invoke-CIPPDBTestsRun -TenantFilter $TenantFilter

Write-LogMessage -API 'Tests' -tenant $TenantFilter -message "Test run started. Instance ID: $($Result.InstanceId)" -sev Info
Write-Information "PostExecution: Tests started with Instance ID: $($Result.InstanceId)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ function Start-TestsOrchestrator {

if ($PSCmdlet.ShouldProcess('Start-TestsOrchestrator', 'Starting Tests Orchestrator')) {
Write-LogMessage -API 'Tests' -message 'Starting Tests Schedule' -sev Info
Invoke-CIPPTestsRun -TenantFilter 'allTenants'
Invoke-CIPPDBTestsRun -TenantFilter 'allTenants'
}
}
1 change: 1 addition & 0 deletions Modules/CIPPCore/Public/Set-CIPPDBCacheManagedDevices.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ function Set-CIPPDBCacheManagedDevices {
try {
Write-LogMessage -API 'CIPPDBCache' -tenant $TenantFilter -message 'Caching managed devices' -sev Debug
$ManagedDevices = New-GraphGetRequest -uri 'https://graph.microsoft.com/beta/deviceManagement/managedDevices?$top=999&$select=id,deviceName,operatingSystem,osVersion,complianceState,managedDeviceOwnerType,enrolledDateTime,lastSyncDateTime' -tenantid $TenantFilter
if (!$ManagedDevices) { $ManagedDevices = @() }
Add-CIPPDbItem -TenantFilter $TenantFilter -Type 'ManagedDevices' -Data $ManagedDevices
Add-CIPPDbItem -TenantFilter $TenantFilter -Type 'ManagedDevices' -Data $ManagedDevices -Count
$ManagedDevices = $null
Expand Down
1 change: 1 addition & 0 deletions Modules/CIPPCore/Public/Test-CIPPRerun.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ function Test-CIPPRerun {
$EstimatedDifference = switch ($Type) {
'Standard' { 9800 } # 2 hours 45 minutes ish.
'BPA' { 85000 } # 24 hours ish.
'CippTests' { 85000 } # 24 hours ish.
default { throw "Unknown type: $Type" }
}
}
Expand Down
2 changes: 1 addition & 1 deletion host.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"distributedTracingEnabled": false,
"version": "None"
},
"defaultVersion": "10.0.4",
"defaultVersion": "10.0.5",
"versionMatchStrategy": "Strict",
"versionFailureStrategy": "Fail"
}
Expand Down
2 changes: 1 addition & 1 deletion version_latest.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.0.4
10.0.5