mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-15 00:15:15 +08:00
Co-authored-by: chkr1011 <6939810+chkr1011@users.noreply.github.com>
26 lines
1.0 KiB
PowerShell
26 lines
1.0 KiB
PowerShell
# Quick smoke test for MQTTnet PowerShell Module
|
|
Import-Module ./bin/Debug/net8.0/MQTTnet.PowerShell.dll -WarningAction SilentlyContinue
|
|
|
|
Write-Host "Testing module load..." -ForegroundColor Yellow
|
|
$commands = Get-Command -Module MQTTnet.PowerShell
|
|
Write-Host "Found $($commands.Count) cmdlets:" -ForegroundColor Green
|
|
$commands | ForEach-Object { Write-Host " - $($_.Name)" -ForegroundColor Cyan }
|
|
|
|
Write-Host "`nTesting session creation..." -ForegroundColor Yellow
|
|
$session = New-MqttSession
|
|
Write-Host "Session created successfully!" -ForegroundColor Green
|
|
|
|
Write-Host "`nTesting Show-MqttExamples..." -ForegroundColor Yellow
|
|
$examples = Show-MqttExamples
|
|
if ($examples) {
|
|
Write-Host "Examples retrieved successfully!" -ForegroundColor Green
|
|
} else {
|
|
Write-Host "Failed to retrieve examples!" -ForegroundColor Red
|
|
}
|
|
|
|
Write-Host "`nTesting session cleanup..." -ForegroundColor Yellow
|
|
Remove-MqttSession -Session $session
|
|
Write-Host "Session removed successfully!" -ForegroundColor Green
|
|
|
|
Write-Host "`n✓ All smoke tests passed!" -ForegroundColor Green
|