mirror of
https://github.com/Grace-Solutions/PSMinIO.git
synced 2026-08-08 12:03:16 +00:00
Major improvements: MinIO 4.0.7 compatibility, file handle fixes, clean logging, session management
Key Achievements: - Downgraded to MinIO 4.0.7 for PowerShell compatibility (eliminated async/await issues) - Fixed file handle leaks in upload operations (using explicit FileStream management) - Implemented clean logging (timestamps without redundant prefixes) - Fixed automatic session variable management (Connect-MinIO stores, cmdlets retrieve) - Removed duplicate certificate parameters (kept only SkipCertificateValidation) - Fixed all 'Folder' alias conflicts across cmdlets - Added correct System.Runtime.CompilerServices.Unsafe.dll version (4.5.3) Working Features: - Connection management (automatic + explicit override) - Bucket operations (list, create, remove) - File upload/download (with proper handle release) - Progress tracking and speed reporting - Clean verbose logging with timestamps Known Issue: - Chunked operations have threading violations (PowerShell cmdlet methods called from background threads) - Regular operations work perfectly, chunked operations need threading architecture fix Test Results: - 3.71GB Windows install.wim file tested - Regular upload/download: Working - File handles: No leaks, immediate deletion possible - Session management: Automatic connection storage/retrieval - Chunked operations: Threading violations need fix
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
# Simple test script for PSMinIO module
|
||||
Import-Module ./Module/PSMinIO/PSMinIO.psd1 -Force
|
||||
|
||||
Write-Host "=== Testing PSMinIO Module ===" -ForegroundColor Cyan
|
||||
|
||||
# Test credentials
|
||||
$endpoint = "https://api.s3.gracesolution.info"
|
||||
$accessKey = "T34Wg85SAwezUa3sk3m4"
|
||||
$secretKey = "PxEmnbQoQJTJsDocSEV6mSSscDpJMiJCayPv93xe"
|
||||
|
||||
# Test 1: Connection
|
||||
Write-Host "1. Testing Connection..." -ForegroundColor Yellow
|
||||
try {
|
||||
$connection = Connect-MinIO -Endpoint $endpoint -AccessKey $accessKey -SecretKey $secretKey
|
||||
Write-Host "✓ Connection successful" -ForegroundColor Green
|
||||
Write-Host " Endpoint: $($connection.EndpointUrl)" -ForegroundColor Gray
|
||||
} catch {
|
||||
Write-Host "✗ Connection failed: $($_.Exception.Message)" -ForegroundColor Red
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Test 2: Bucket Listing
|
||||
Write-Host "2. Testing Bucket Listing..." -ForegroundColor Yellow
|
||||
try {
|
||||
$buckets = Get-MinIOBucket
|
||||
Write-Host "✓ Found $($buckets.Count) buckets" -ForegroundColor Green
|
||||
if ($buckets.Count -gt 0) {
|
||||
$buckets | Select-Object -First 3 | Format-Table Name, CreationDate
|
||||
}
|
||||
} catch {
|
||||
Write-Host "✗ Bucket listing failed: $($_.Exception.Message)" -ForegroundColor Red
|
||||
}
|
||||
|
||||
Write-Host "Tests completed!" -ForegroundColor Cyan
|
||||
Reference in New Issue
Block a user