i can see it

This commit is contained in:
lda
2026-04-05 01:08:07 +07:00 Unverified
parent 981da39acf
commit 93e8a4db10
2 changed files with 17 additions and 5 deletions
+7 -5
View File
@@ -9,7 +9,8 @@ param(
[string]$password, [string]$password,
[switch]$Verbose, [switch]$Verbose,
[string]$RemoteTestPath = "/root/.bin/test", [string]$RemoteTestPath = "/root/.bin/test",
[string]$RemoteHost = "[email protected]" [string]$RemoteHost = "[email protected]",
[switch]$Ignored
) )
$ErrorActionPreference = "Stop" $ErrorActionPreference = "Stop"
@@ -54,10 +55,11 @@ foreach ($testBinary in $testBinaries) {
Invoke-Scp -Local $testBinary.FullName -Dest "${RemoteHost}:$RemoteTestPath" -Pass $password -Quiet Invoke-Scp -Local $testBinary.FullName -Dest "${RemoteHost}:$RemoteTestPath" -Pass $password -Quiet
# Run on target # Run on target
$testArgs = "$(if ($Verbose) {"--nocapture --show-output"})" $parts = @()
if ($TestName) { if ($TestName) { $parts += $TestName }
$testArgs = "$TestName $testArgs" if ($Ignored) { $parts += "--ignored" }
} if ($Verbose) { $parts += "--nocapture"; $parts += "--show-output" }
$testArgs = $parts -join " "
Invoke-Ssh -Cmd "chmod +x $RemoteTestPath && $RemoteTestPath $testArgs" -Remote $RemoteHost -Pass $password Invoke-Ssh -Cmd "chmod +x $RemoteTestPath && $RemoteTestPath $testArgs" -Remote $RemoteHost -Pass $password
} }
+10
View File
@@ -0,0 +1,10 @@
use wakey::inventory;
use wakey_core::DeviceQuery;
#[tokio::test]
#[ignore = "runs against live router data; use on-device or via scripts/test_remote.ps1"]
async fn inventory_real_router_prints_device_inventory() -> anyhow::Result<()> {
let inventory = inventory(DeviceQuery::default()).await?;
println!("{}", serde_json::to_string_pretty(&inventory)?);
Ok(())
}