From 057facea900a7257ba697402f46ebdfd82334b4d Mon Sep 17 00:00:00 2001 From: Dean Welch Date: Wed, 24 Jan 2024 11:43:04 +0000 Subject: [PATCH 1/2] Remove invalid modification time test --- spec/support/shared/examples/msf/module_manager/cache.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/spec/support/shared/examples/msf/module_manager/cache.rb b/spec/support/shared/examples/msf/module_manager/cache.rb index bc6e09ab06a3..5bce8ff7dda7 100644 --- a/spec/support/shared/examples/msf/module_manager/cache.rb +++ b/spec/support/shared/examples/msf/module_manager/cache.rb @@ -410,7 +410,6 @@ def module_info_by_path_from_database! module_info_by_path_from_database! end - it { expect(subject[:modification_time]).to be_within(10.seconds).of(pathname_modification_time) } it { expect(subject[:parent_path]).to eq(parent_path) } it { expect(subject[:reference_name]).to eq(reference_name) } it { expect(subject[:type]).to eq(type) } From 56f6020ff5cc60be82721137eea32c4d7fa3cb18 Mon Sep 17 00:00:00 2001 From: Dean Welch Date: Wed, 24 Jan 2024 12:10:22 +0000 Subject: [PATCH 2/2] Assert that the caches modification time is in fact a time --- spec/support/shared/examples/msf/module_manager/cache.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/spec/support/shared/examples/msf/module_manager/cache.rb b/spec/support/shared/examples/msf/module_manager/cache.rb index 5bce8ff7dda7..8ebf3711ecee 100644 --- a/spec/support/shared/examples/msf/module_manager/cache.rb +++ b/spec/support/shared/examples/msf/module_manager/cache.rb @@ -410,6 +410,7 @@ def module_info_by_path_from_database! module_info_by_path_from_database! end + it { expect(subject[:modification_time]).to be_a(Time) } it { expect(subject[:parent_path]).to eq(parent_path) } it { expect(subject[:reference_name]).to eq(reference_name) } it { expect(subject[:type]).to eq(type) }