Tests fail for file operations on mac due to the usage of mkdir in the tests.
Current Behavior:
Provide information about the failure by issuing the command using the -Verbose command. Ensure that any identifiable information (server names, tokens, passwords) is removed from your logs before sharing this on GitHub.
> Invoke-Pester Tests/Start-RubrikDownload.Tests.ps1
Pester v4.10.1
Executing all tests in 'Tests/Start-RubrikDownload.Tests.ps1'
Executing script Tests/Start-RubrikDownload.Tests.ps1
Describing Public/Start-RubrikDownload
Context Context validate correct processing of function with different parameter sets
/bin/mkdir: illegal option -- P
usage: mkdir [-pv] [-m mode] directory ...
New-Item:
Line |
7 | New-Item $OutFile -ItemType File | Out-Null
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Could not find a part of the path '/private/tmp/1094bcfe-77ee-4540-81f3-5ac2329d9dc0/Temp/MyImportedFileSet.zip'.
Get-Item: /Users/jake/rubrik-sdk-for-powershell/Rubrik/Public/Start-RubrikDownload.ps1:111
Line |
111 | return Get-Item $WebRequestSplat.OutFile
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Cannot find path 'TestDrive:/Temp/MyImportedFileSet.zip' because it does not exist.
[-] Should return a file object 72ms
Expected the value to have type [System.IO.FileInfo] or any of its subtypes, but got $null with type $null.
24: Should -BeOfType [System.IO.FileInfo]
at <ScriptBlock>, /Users/jake/rubrik-sdk-for-powershell/Tests/Start-RubrikDownload.Tests.ps1: line 23
/bin/mkdir: illegal option -- P
usage: mkdir [-pv] [-m mode] directory ...
New-Item:
Line |
7 | New-Item $OutFile -ItemType File | Out-Null
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Could not find a part of the path '/private/tmp/1094bcfe-77ee-4540-81f3-5ac2329d9dc0/Temp/MyImportedFileSet2.zip'.
Get-Item: /Users/jake/rubrik-sdk-for-powershell/Rubrik/Public/Start-RubrikDownload.ps1:111
Line |
111 | return Get-Item $WebRequestSplat.OutFile
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Cannot find path 'TestDrive:/Temp/MyImportedFileSet2.zip' because it does not exist.
[-] Should filename should match when explicitly specified 59ms
Expected 'MyImportedFileSet2.zip', but got $null.
29: Should -Be 'MyImportedFileSet2.zip'
at <ScriptBlock>, /Users/jake/rubrik-sdk-for-powershell/Tests/Start-RubrikDownload.Tests.ps1: line 28
/bin/mkdir: illegal option -- P
usage: mkdir [-pv] [-m mode] directory ...
New-Item:
Line |
7 | New-Item $OutFile -ItemType File | Out-Null
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Could not find a part of the path '/private/tmp/1094bcfe-77ee-4540-81f3-5ac2329d9dc0/Temp/EVep2PMDpJEAWhIQS6Si.zip'.
Get-Item: /Users/jake/rubrik-sdk-for-powershell/Rubrik/Public/Start-RubrikDownload.ps1:111
Line |
111 | return Get-Item $WebRequestSplat.OutFile
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Cannot find path 'TestDrive:/Temp/EVep2PMDpJEAWhIQS6Si.zip' because it does not exist.
[-] Should use filename from Rubrik Cluster when only path is specified 49ms
Expected 'EVep2PMDpJEAWhIQS6Si.zip', but got $null.
34: Should -Be 'EVep2PMDpJEAWhIQS6Si.zip'
at <ScriptBlock>, /Users/jake/rubrik-sdk-for-powershell/Tests/Start-RubrikDownload.Tests.ps1: line 33
/bin/mkdir: illegal option -- P
usage: mkdir [-pv] [-m mode] directory ...
New-Item:
Line |
7 | New-Item $OutFile -ItemType File | Out-Null
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Could not find a part of the path '/private/tmp/1094bcfe-77ee-4540-81f3-5ac2329d9dc0/Temp/ComplicatedPath/MyImportedFileSet2.zip'.
Get-Item: /Users/jake/rubrik-sdk-for-powershell/Rubrik/Public/Start-RubrikDownload.ps1:111
Line |
111 | return Get-Item $WebRequestSplat.OutFile
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Cannot find path 'TestDrive:/Temp/ComplicatedPath/MyImportedFileSet2.zip' because it does not exist.
[-] Path should match 44ms
Expected like wildcard '*Temp*ComplicatedPath*' to match $null, but it did not match.
39: Should -BeLike '*Temp*ComplicatedPath*'
at <ScriptBlock>, /Users/jake/rubrik-sdk-for-powershell/Tests/Start-RubrikDownload.Tests.ps1: line 38
Tests completed in 533ms
Tests Passed: 0, Failed: 4, Skipped: 0, Pending: 0, Inconclusive: 0
Expected Behavior:
All tests should pass.
Steps to Reproduce:
Please provide detailed steps for reproducing the issue.
Tests fail for file operations on mac due to the usage of mkdir in the tests.
Current Behavior:
Provide information about the failure by issuing the command using the
-Verbose
command. Ensure that any identifiable information (server names, tokens, passwords) is removed from your logs before sharing this on GitHub.Expected Behavior: All tests should pass.
Steps to Reproduce:
Please provide detailed steps for reproducing the issue.
Context:
Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.