@@ -522,3 +522,38 @@ function Test-CreateLinuxIncludedPackageNameMasksSoftwareUpdateConfiguration() {
522
522
WaitForProvisioningState $name " Succeeded"
523
523
}
524
524
525
+
526
+ <#
527
+ Test-CreateLinuxOneTimeSoftwareUpdateConfigurationWithAllOption
528
+ #>
529
+ function Test-CreateLinuxSoftwareUpdateConfigurationWithRebootSetting {
530
+ $name = " linx-suc-reboot"
531
+ $rebootSetting = " Never"
532
+ $startTime = ([DateTime ]::Now).AddMinutes(10 )
533
+ $s = New-AzAutomationSchedule - ResourceGroupName $rg `
534
+ - AutomationAccountName $aa `
535
+ - Name $name `
536
+ - Description linux- suc- reboot `
537
+ - OneTime `
538
+ - StartTime $startTime `
539
+ - ForUpdate
540
+
541
+ $suc = New-AzAutomationSoftwareUpdateConfiguration - ResourceGroupName $rg `
542
+ - AutomationAccountName $aa `
543
+ - Schedule $s `
544
+ - Linux `
545
+ - AzureVMResourceId $azureVMIdsL `
546
+ - NonAzureComputer $nonAzurecomputers `
547
+ - Duration (New-TimeSpan - Hours 2 ) `
548
+ - IncludedPackageClassification Security, Critical `
549
+ - ExcludedPackageNameMask Mask01, Mask02 `
550
+ - IncludedPackageNameMask Mask100 `
551
+ - RebootSetting $rebootSetting
552
+
553
+ Assert-NotNull $suc " New-AzAutomationSoftwareUpdateConfiguration returned null"
554
+ Assert-AreEqual $suc.Name $name " Name of created software update configuration didn't match given name"
555
+ Assert-AreEqual $suc.RebootSetting $rebootSetting " Reboot setting failed to match"
556
+
557
+ WaitForProvisioningState $name " Failed"
558
+ }
559
+
0 commit comments