update tests to skip other pre-checks if linux/mac

This commit is contained in:
Roy Ashbrook
2021-11-08 17:44:03 -05:00
parent 5f00f5cbbc
commit f0b4cb28f6

View File

@@ -7,17 +7,18 @@ $skip = $false
if ($IsLinux -or $IsMacOS) {
$skip = $true
Write-Warning "Read-OleDbData: Linux and MacOs are not supported. Skipping tests."
}
try {
if ((New-Object system.data.oledb.oledbenumerator).GetElements().SOURCES_NAME -notcontains "Microsoft.ACE.OLEDB.12.0") {
$skip = $true
Write-Warning "Read-OleDbData: Microsoft.ACE.OLEDB.12.0 provider not found. Skipping tests."
}else{
try {
if ((New-Object system.data.oledb.oledbenumerator).GetElements().SOURCES_NAME -notcontains "Microsoft.ACE.OLEDB.12.0") {
$skip = $true
Write-Warning "Read-OleDbData: Microsoft.ACE.OLEDB.12.0 provider not found. Skipping tests."
}
$skip = $IsMissingACE
}
catch {
$skip = $true
Write-Warning "Read-OleDbData: Calls to System.Data.OleDb failed. Skipping tests."
}
$skip = $IsMissingACE
}
catch {
$skip = $true
Write-Warning "Read-OleDbData: Calls to System.Data.OleDb failed. Skipping tests."
}
Describe "Read-OleDbData" -Tag "Read-OleDbData" {