Fix test script parameter names to match actual cmdlet implementations

� PARAMETER NAME FIXES:

 CORRECTED CMDLET PARAMETERS:
  • New-MinIOObjectMultipart: -Files → -FilePath
  • Get-MinIOObjectContent: -ObjectKey → -ObjectName, -FilePath → -LocalPath
  • Get-MinIOObjectContentMultipart: -ObjectKey → -ObjectName, -FilePath → -DestinationPath
  • Get-MinIOPresignedUrl: -ObjectKey → -ObjectName

� UPDATED BOTH TEST SCRIPTS:
  • Test-PSMinIOIndividual.ps1 - Manual testing commands
  • Test-PSMinIOComprehensive.ps1 - Automated test suite
  • Fixed all parameter mismatches based on actual cmdlet implementations

� PARAMETER MAPPING:
  • ObjectKey/Key → ObjectName (consistent across all cmdlets)
  • Files → FilePath (for multipart upload)
  • FilePath → LocalPath (for single download)
  • FilePath → DestinationPath (for multipart download)

Now test scripts use correct parameter names matching the actual PSMinIO cmdlet implementations!
This commit is contained in:
PSMinIO Developer
2025-07-14 17:28:36 -04:00
parent b1adfa6328
commit ab7c2bbde2
2 changed files with 9 additions and 9 deletions
+4 -4
View File
@@ -100,7 +100,7 @@ try {
# Test 7: Upload large file (multipart)
Write-Verbose "Testing multipart upload..."
$multipartResult = New-MinIOObjectMultipart -BucketName $TestBucket -Files (Get-Item $LargeFile) -Verbose
$multipartResult = New-MinIOObjectMultipart -BucketName $TestBucket -FilePath (Get-Item $LargeFile) -Verbose
$testResults += [PSCustomObject]@{
Test = "Multipart Upload"
Status = "Success"
@@ -121,7 +121,7 @@ try {
# Test 9: Download small file
Write-Verbose "Testing single file download..."
$downloadPath = Join-Path $TestDirectory "downloaded-small.txt"
$downloadResult = Get-MinIOObjectContent -BucketName $TestBucket -ObjectKey "small-test.txt" -FilePath (New-Object System.IO.FileInfo $downloadPath) -Verbose
$downloadResult = Get-MinIOObjectContent -BucketName $TestBucket -ObjectName "small-test.txt" -LocalPath $downloadPath -Verbose
$testResults += [PSCustomObject]@{
Test = "Single File Download"
Status = "Success"
@@ -132,7 +132,7 @@ try {
# Test 10: Download large file (multipart)
Write-Verbose "Testing multipart download..."
$downloadPath2 = Join-Path $TestDirectory "downloaded-large.txt"
$multipartDownload = Get-MinIOObjectContentMultipart -BucketName $TestBucket -ObjectKey "large-test.txt" -FilePath (New-Object System.IO.FileInfo $downloadPath2) -Verbose
$multipartDownload = Get-MinIOObjectContentMultipart -BucketName $TestBucket -ObjectName "large-test.txt" -DestinationPath (New-Object System.IO.FileInfo $downloadPath2) -Verbose
$testResults += [PSCustomObject]@{
Test = "Multipart Download"
Status = "Success"
@@ -142,7 +142,7 @@ try {
# Test 11: Generate presigned URL
Write-Verbose "Testing presigned URL generation..."
$presignedUrl = Get-MinIOPresignedUrl -BucketName $TestBucket -ObjectKey "small-test.txt" -Expiration (New-TimeSpan -Hours 1) -Verbose
$presignedUrl = Get-MinIOPresignedUrl -BucketName $TestBucket -ObjectName "small-test.txt" -Expiration (New-TimeSpan -Hours 1) -Verbose
$testResults += [PSCustomObject]@{
Test = "Presigned URL"
Status = "Success"