diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-07-14 04:10:38 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-07-14 04:10:43 +0300 |
| commit | 9e4fdd6102e6f68e42fbe419d447b758c161f0db (patch) | |
| tree | 66df19412e2fcd152611ffcd6543ddf5db09df58 /src/integration/tests.rs | |
| parent | ca7ae086e8d6e80f6efc969d541b390328a6d143 (diff) | |
fix: retry dropped omp lifecycle reports
refs #1310
Diffstat (limited to 'src/integration/tests.rs')
| -rw-r--r-- | src/integration/tests.rs | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/integration/tests.rs b/src/integration/tests.rs index 5d8538c7..3d578c53 100644 --- a/src/integration/tests.rs +++ b/src/integration/tests.rs @@ -763,6 +763,36 @@ fn outdated_integrations_detect_previous_pi_version() { } #[test] +fn outdated_integrations_detect_previous_omp_version() { + let _lock = integration_env_lock(); + let base = unique_base(); + let home = base.join("home"); + let ext_dir = home.join(".omp/agent/extensions"); + fs::create_dir_all(&ext_dir).unwrap(); + let extension_path = ext_dir.join(OMP_EXTENSION_INSTALL_NAME); + fs::write( + &extension_path, + "// HERDR_INTEGRATION_ID=omp\n// HERDR_INTEGRATION_VERSION=4\n", + ) + .unwrap(); + std::env::set_var("HOME", &home); + + let outdated = outdated_installed_integrations(); + + assert_eq!(outdated.len(), 1); + assert_eq!( + outdated[0].target, + crate::api::schema::IntegrationTarget::Omp + ); + assert_eq!(outdated[0].path, extension_path); + assert_eq!(outdated[0].installed_version, Some(4)); + assert_eq!(outdated[0].expected_version, OMP_INTEGRATION_VERSION); + + std::env::remove_var("HOME"); + let _ = fs::remove_dir_all(base); +} + +#[test] fn outdated_integrations_accept_current_version_marker() { let _lock = integration_env_lock(); let base = unique_base(); |
