From 43ae1c94a36a352809057c4624ecfd1197e4be72 Mon Sep 17 00:00:00 2001 From: Pavel Odintsov Date: Sun, 19 Jun 2022 14:30:20 +0100 Subject: [PATCH] Switched output folder to temp folder location --- src/packaging/homebrew/fastnetmon.rb | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/packaging/homebrew/fastnetmon.rb b/src/packaging/homebrew/fastnetmon.rb index dd88e6ac7..cfca337ca 100644 --- a/src/packaging/homebrew/fastnetmon.rb +++ b/src/packaging/homebrew/fastnetmon.rb @@ -53,6 +53,10 @@ def install test do cp etc/"fastnetmon.conf", testpath + inreplace testpath/"fastnetmon.conf", "/tmp/fastnetmon.dat", testpath/"fastnetmon.dat" + + inreplace testpath/"fastnetmon.conf", "/tmp/fastnetmon_ipv6.dat", testpath/"fastnetmon_ipv6.dat" + fastnetmon_pid = fork do exec opt_sbin/"fastnetmon", "--configuration_file", @@ -63,14 +67,14 @@ def install sleep 15 - assert_path_exists "/tmp/fastnetmon.dat" + assert_path_exists testpath/"fastnetmon.dat" - ipv4_stats_output = File.read("/tmp/fastnetmon.dat") + ipv4_stats_output = File.read(testpath/"fastnetmon.dat") assert_match("Incoming traffic", ipv4_stats_output) - assert_path_exists "/tmp/fastnetmon_ipv6.dat" + assert_path_exists testpath/"fastnetmon_ipv6.dat" - ipv6_stats_output = File.read("/tmp/fastnetmon_ipv6.dat") + ipv6_stats_output = File.read(testpath/"fastnetmon_ipv6.dat") assert_match("Incoming traffic", ipv6_stats_output) ensure Process.kill "SIGTERM", fastnetmon_pid