You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$fileOverrideResults.FNN[$previewDataFile.FileName] | Should -Be (Join-Path-Path $dataDirectory-ChildPath "dbatoolsci_filemove_data_override$dataExtension")
244
-
$fileOverrideResults.FNN[$previewLogFile.FileName] | Should -Be (Join-Path-Path $logDirectory-ChildPath "dbatoolsci_filemove_log_override$logExtension")
245
-
$fileDefaultResults.FNN[$previewDataFile.FileName] | Should -Be (Join-Path-Path $dataDirectory-ChildPath "dbatoolsci_filemove_ROWS$dataExtension")
246
-
$fileDefaultResults.FNN[$previewLogFile.FileName] | Should -Be (Join-Path-Path $logDirectory-ChildPath "dbatoolsci_filemove_journal$logExtension")
243
+
# Combine instead of Join-Path: these are paths of the instance, and Windows PowerShell
244
+
# validates the drive of Join-Path against the drives of the machine running the test,
245
+
# which does not have to own a drive the remote instance keeps its files on. Combine is
246
+
# also what the command itself builds the new path with.
247
+
$fileOverrideResults.FNN[$previewDataFile.FileName] | Should -Be ([System.IO.Path]::Combine($dataDirectory,"dbatoolsci_filemove_data_override$dataExtension"))
248
+
$fileOverrideResults.FNN[$previewLogFile.FileName] | Should -Be ([System.IO.Path]::Combine($logDirectory,"dbatoolsci_filemove_log_override$logExtension"))
249
+
$fileDefaultResults.FNN[$previewDataFile.FileName] | Should -Be ([System.IO.Path]::Combine($dataDirectory,"dbatoolsci_filemove_ROWS$dataExtension"))
250
+
$fileDefaultResults.FNN[$previewLogFile.FileName] | Should -Be ([System.IO.Path]::Combine($logDirectory,"dbatoolsci_filemove_journal$logExtension"))
0 commit comments