test: sync stale fixtures and isolate openclaw env tests

Three unrelated test failures surfaced after rebase:

- McpFormModal expected the apps boolean set without `hermes`; Hermes MCP
  support is now wired, so the fixture must include `hermes: false`.
- therouter Gemini preset was bumped to `gemini-3.1-pro` in a later
  commit; update the assertions to match current config.
- openclaw_config tests mutate process-level `CC_SWITCH_TEST_HOME` and
  `HOME` inside a module-local Mutex, but hermes_config does the same
  under its own separate Mutex. Running both modules in parallel let the
  env races corrupt hermes_config's `with_test_home`. Tag the four
  env-mutating openclaw tests with `#[serial]` so they serialize across
  modules via serial_test's process-wide default key.
This commit is contained in:
Jason
2026-04-20 12:19:08 +08:00
parent c8d91298c7
commit 08727528aa
3 changed files with 8 additions and 2 deletions
@@ -57,10 +57,10 @@ describe("TheRouter provider presets", () => {
expect(preset?.category).toBe("aggregator");
expect(preset?.endpointCandidates).toEqual(["https://api.therouter.ai"]);
expect(preset?.baseURL).toBe("https://api.therouter.ai");
expect(preset?.model).toBe("gemini-2.5-pro");
expect(preset?.model).toBe("gemini-3.1-pro");
const env = (preset?.settingsConfig as { env: Record<string, string> }).env;
expect(env.GOOGLE_GEMINI_BASE_URL).toBe("https://api.therouter.ai");
expect(env.GEMINI_MODEL).toBe("gemini-2.5-pro");
expect(env.GEMINI_MODEL).toBe("gemini-3.1-pro");
});
});