From 9f8a868f94f2c4778038016cc54c255ae29aae22 Mon Sep 17 00:00:00 2001 From: Chris Banks Date: Fri, 21 Jun 2024 18:25:18 +0100 Subject: [PATCH] Fix ugly test. It passes now, but it's still ugly. --- lib/virus_scanner.rb | 4 ++-- spec/lib/virus_scanner_spec.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/virus_scanner.rb b/lib/virus_scanner.rb index c3587ce3..c9817480 100644 --- a/lib/virus_scanner.rb +++ b/lib/virus_scanner.rb @@ -2,8 +2,8 @@ # Simple wrapper around ClamAV # -# This expects govuk_clamscan to exist on the PATH, and be a symlink -# to either clamscan or clamdscan +# This expects AssetManager.govuk.clamscan_path to be an executable command +# that is compatible with clamscan or clamdscan. class VirusScanner class Error < StandardError; end diff --git a/spec/lib/virus_scanner_spec.rb b/spec/lib/virus_scanner_spec.rb index 874f2cc5..1c34f8a4 100644 --- a/spec/lib/virus_scanner_spec.rb +++ b/spec/lib/virus_scanner_spec.rb @@ -15,7 +15,7 @@ end it "calls out to clamdscan" do - expect(Open3).to receive(:capture2e).with("govuk_clamscan", "--no-summary", file_path) + expect(Open3).to receive(:capture2e).with("clamdscan", "--no-summary", file_path) scanner.scan(file_path) end