Update pester tests
Some checks failed
Publish Powershell Module to Gitea Repository / test (push) Failing after 10s
Publish Powershell Module to Gitea Repository / deploy (push) Has been skipped

This commit is contained in:
2025-05-27 13:23:37 -04:00
parent 67d69c52e9
commit ed8f3ab02e
2 changed files with 13 additions and 13 deletions

View File

@@ -434,8 +434,8 @@ Function Invoke-GiteaFileDownload {
return [PSCustomObject]@{
SourceURL = $downloadURL
Type = $type
Result = 'Success'
Error = "Skipped - item is a directory"
Result = 'Skipped'
Error = $null
Timestamp = Get-Date
FileSize = $null
}
@@ -521,7 +521,7 @@ Function Invoke-GiteaFileDownload {
Path = $fileOutputPath
SourceURL = $downloadURL
Type = "file"
Result = 'Failure'
Result = $null
Error = $null
Timestamp = Get-Date
FileSize = $null
@@ -545,6 +545,7 @@ Function Invoke-GiteaFileDownload {
}
}
else {
$result.Result = 'Skipped'
$errorMsg = "The file '$fileOutputPath' already exists. Use the -Force switch to overwrite the file."
Write-Error $errorMsg
$result.Error = $errorMsg
@@ -578,6 +579,7 @@ Function Invoke-GiteaFileDownload {
return $result
}
catch {
$result.Result = 'Failure'
$errorMsg = "Failed to download file from Gitea: $_"
Write-Error $errorMsg
$result.Error = $errorMsg