i can see it
This commit is contained in:
@@ -9,7 +9,8 @@ param(
|
||||
[string]$password,
|
||||
[switch]$Verbose,
|
||||
[string]$RemoteTestPath = "/root/.bin/test",
|
||||
[string]$RemoteHost = "[email protected]"
|
||||
[string]$RemoteHost = "[email protected]",
|
||||
[switch]$Ignored
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
@@ -54,10 +55,11 @@ foreach ($testBinary in $testBinaries) {
|
||||
Invoke-Scp -Local $testBinary.FullName -Dest "${RemoteHost}:$RemoteTestPath" -Pass $password -Quiet
|
||||
|
||||
# Run on target
|
||||
$testArgs = "$(if ($Verbose) {"--nocapture --show-output"})"
|
||||
if ($TestName) {
|
||||
$testArgs = "$TestName $testArgs"
|
||||
}
|
||||
$parts = @()
|
||||
if ($TestName) { $parts += $TestName }
|
||||
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
|
||||
}
|
||||
|
||||
@@ -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(())
|
||||
}
|
||||
Reference in New Issue
Block a user