fix test errors

This commit is contained in:
SoftFever
2026-07-16 21:40:21 +08:00
parent f2ccbfc8b5
commit 6f30d03e28
2 changed files with 3 additions and 3 deletions

View File

@@ -135,7 +135,7 @@ TEST_CASE("install-state sidecar is the source of truth for a cloud plugin's ins
CHECK(state.installed_version == "1.2.0");
// Reading the sidecar back onto a freshly-scanned descriptor (whose header version is still
// 1.0.0) must surface the cloud-installed 1.2.0. This is what lets update_cloud_catalog compare
// 1.0.0) must surface the cloud-installed 1.2.0. This is what lets update_cloud_metadata compare
// the cloud's latest version against the installed version instead of the stale header, so an
// already-updated plugin no longer looks perpetually out of date.
PluginDescriptor scanned;

View File

@@ -725,7 +725,7 @@ TEST_CASE("Signing out drops every cloud plugin row, installed or not", "[Plugin
installed.plugin_root = (data_dir_guard.plugins_dir() / "_subscribed" / "user" / installed.plugin_key).string();
installed.cloud = CloudPluginState{installed.plugin_key, /*installed=*/true, false, false, false};
manager.update_cloud_catalog({available, installed});
manager.update_cloud_metadata({available, installed});
const auto has_key = [&manager](const std::string& key) {
PluginDescriptor descriptor;
@@ -739,7 +739,7 @@ TEST_CASE("Signing out drops every cloud plugin row, installed or not", "[Plugin
// Sign out. The per-user _subscribed directory stops being scanned, so both cloud rows are now
// stale and must go — not just the one with nothing installed behind it.
manager.unload_cloud_plugins();
manager.clear_cloud_plugin_catalog();
manager.clear_cloud_plugin_metadata();
manager.set_cloud_user("");
CHECK_FALSE(has_key(available.plugin_key));