Skip to content

Commit

Permalink
Fix functional testing and cached output errors (#1334)
Browse files Browse the repository at this point in the history
* Fix incorrect filename reference in LoadProviderExport

* * Fix CsvParams ProductNames to use ScubaConfig
* Fix Invoke-ScubaCached output location for provider settings.

* Fix MS.SHAREPOINT.2.1v1 precondition ordering issue
  • Loading branch information
schrolla authored Sep 27, 2024
1 parent b2e19be commit 78fbf93
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions PowerShell/ScubaGear/Modules/Orchestrator.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ function Invoke-SCuBA {
}
# Craft the csv version of just the results
$CsvParams = @{
'ProductNames' = $ProductNames;
'ProductNames' = $ScubaConfig.ProductNames;
'OutFolderPath' = $OutFolderPath;
'OutJsonFileName' = $ScubaConfig.OutJsonFileName;
'OutCsvFileName' = $ScubaConfig.OutCsvFileName;
Expand Down Expand Up @@ -1745,7 +1745,7 @@ function Invoke-SCuBACached {
# Uses the custom UTF8 NoBOM function to reoutput the Provider JSON file
$ProviderContent = $SettingsExport | ConvertTo-Json -Depth 20
$ActualSavedLocation = Set-Utf8NoBom -Content $ProviderContent `
-Location $ProviderJSONFilePath -FileName "$OutProviderFileName.json"
-Location $OutPath -FileName "$OutProviderFileName.json"
Write-Debug $ActualSavedLocation
}
$SettingsExport = Get-Content $ProviderJSONFilePath | ConvertFrom-Json
Expand Down
2 changes: 1 addition & 1 deletion Testing/Functional/Products/FunctionalTestUtils.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ function LoadProviderExport() {
Copy-Item -Path "$OutputFolder/ProviderSettingsExport.json" -Destination "$OutputFolder/ModifiedProviderSettingsExport.json"
}

$Content = Get-Utf8NoBom -FilePath "$OutputFolder/ProviderSettingsExport.json"
$Content = Get-Utf8NoBom -FilePath "$OutputFolder/ModifiedProviderSettingsExport.json"
$ProviderExport = $Content | ConvertFrom-Json
$ProviderExport
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ TestPlan:
- Command: Set-PnPTenant
Splat:
SharingCapability: ExternalUserAndGuestSharing
- Command: Set-PnPTenant
Splat:
DefaultSharingLinkType: AnonymousAccess
Postconditions: []
ExpectedResult: false
Expand All @@ -131,6 +133,8 @@ TestPlan:
- Command: Set-PnPTenant
Splat:
SharingCapability: Disabled
- Command: Set-PnPTenant
Splat:
DefaultSharingLinkType: Direct
Postconditions: []
ExpectedResult: true
Expand Down

0 comments on commit 78fbf93

Please sign in to comment.