From aa6b531a423067d8a71c2a57b41185bff17036be Mon Sep 17 00:00:00 2001 From: akbash Date: Sun, 13 Sep 2026 03:04:27 +0300 Subject: fix: update grok session after new (#2683) * fix: update grok session after new refs #2681 * fix: avoid powershell args shadowing refs #2681 --------- Co-authored-by: akbash-bot <300245827+akbash-bot@users.noreply.github.com> --- src/integration/tests.rs | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) (limited to 'src/integration/tests.rs') diff --git a/src/integration/tests.rs b/src/integration/tests.rs index dc597d1d..e8aad72b 100644 --- a/src/integration/tests.rs +++ b/src/integration/tests.rs @@ -2897,6 +2897,7 @@ fn bundled_integration_asset_versions_match_expected_versions() { MASTRACODE_HOOK_ASSET, MASTRACODE_INTEGRATION_VERSION, ), + ("grok", GROK_HOOK_ASSET, GROK_INTEGRATION_VERSION), ] { assert_eq!( parse_integration_version(asset), @@ -4056,7 +4057,39 @@ fn install_antigravity_cli_errors_when_config_dir_missing() { } #[test] -fn grok_v1_integration_status_is_current() { +fn grok_v1_integration_status_is_outdated() { + let _lock = integration_env_lock(); + let base = unique_base(); + let grok_dir = base.join(".grok"); + let hooks_dir = grok_dir.join("hooks"); + fs::create_dir_all(&hooks_dir).unwrap(); + std::env::set_var(GROK_CONFIG_DIR_ENV_VAR, &grok_dir); + let hook_path = hooks_dir.join(GROK_HOOK_INSTALL_NAME); + fs::write( + &hook_path, + "#!/bin/sh\n# HERDR_INTEGRATION_ID=grok\n# HERDR_INTEGRATION_VERSION=1\n", + ) + .unwrap(); + fs::write( + hooks_dir.join(GROK_HOOK_CONFIG_INSTALL_NAME), + serde_json::to_string(&grok_hook_config(&hook_path)).unwrap(), + ) + .unwrap(); + + let grok = installed_integration_statuses() + .into_iter() + .find(|status| status.target == crate::api::schema::IntegrationTarget::Grok) + .expect("grok integration status"); + assert_eq!(grok.installed_version, Some(1)); + assert_eq!(grok.expected_version, GROK_INTEGRATION_VERSION); + assert_eq!(grok.state, IntegrationStatusKind::Outdated); + + clear_integration_path_env(); + let _ = fs::remove_dir_all(base); +} + +#[test] +fn grok_v2_integration_status_is_current() { let _lock = integration_env_lock(); let base = unique_base(); let grok_dir = base.join(".grok"); -- cgit v1.2.3