aboutsummaryrefslogtreecommitdiff
path: root/src/integration/tests.rs
diff options
context:
space:
mode:
authorakbash <akbash@herdr.dev>2026-09-13 03:04:27 +0300
committerGitHub <noreply@github.com>2026-09-13 02:04:27 +0200
commitaa6b531a423067d8a71c2a57b41185bff17036be (patch)
tree72fff1245d085d1b8aca3fbb124d007a731070ab /src/integration/tests.rs
parent98a8c6ce52a054b582a6210c79d76e10a99ccccc (diff)
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>
Diffstat (limited to 'src/integration/tests.rs')
-rw-r--r--src/integration/tests.rs35
1 files changed, 34 insertions, 1 deletions
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");