mirror of
https://github.com/marcoallegretti/WEFT_OS.git
synced 2026-03-27 01:13:09 +00:00
test(appd): add QueryInstalledApps dispatch test; fix weft-runtime test race
main.rs: add dispatch_query_installed_returns_installed_apps to verify the QueryInstalledApps arm returns Response::InstalledApps. wsl-test.sh: run weft-runtime tests with --test-threads=1 to prevent the WEFT_APP_STORE env var race between package_store_roots_includes_ system_path and package_store_roots_uses_weft_app_store_when_set.
This commit is contained in:
parent
0bcb6b1bf6
commit
eef9ecc24a
2 changed files with 8 additions and 1 deletions
|
|
@ -497,6 +497,13 @@ mod tests {
|
|||
assert!(matches!(reg.state(42), AppStateKind::NotFound));
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn dispatch_query_installed_returns_installed_apps() {
|
||||
let reg = make_registry();
|
||||
let resp = dispatch(Request::QueryInstalledApps, ®).await;
|
||||
assert!(matches!(resp, Response::InstalledApps { .. }));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn scan_installed_apps_finds_valid_packages() {
|
||||
use std::fs;
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ cargo test -p weft-appd 2>&1
|
|||
|
||||
echo ""
|
||||
echo "==> cargo test -p weft-runtime"
|
||||
cargo test -p weft-runtime 2>&1
|
||||
cargo test -p weft-runtime -- --test-threads=1 2>&1
|
||||
|
||||
echo ""
|
||||
echo "==> cargo test -p weft-pack"
|
||||
|
|
|
|||
Loading…
Reference in a new issue