Skip to content

Commit 43ae1c9

Browse files
Switched output folder to temp folder location
1 parent ec1a853 commit 43ae1c9

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/packaging/homebrew/fastnetmon.rb

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ def install
5353
test do
5454
cp etc/"fastnetmon.conf", testpath
5555

56+
inreplace testpath/"fastnetmon.conf", "/tmp/fastnetmon.dat", testpath/"fastnetmon.dat"
57+
58+
inreplace testpath/"fastnetmon.conf", "/tmp/fastnetmon_ipv6.dat", testpath/"fastnetmon_ipv6.dat"
59+
5660
fastnetmon_pid = fork do
5761
exec opt_sbin/"fastnetmon",
5862
"--configuration_file",
@@ -63,14 +67,14 @@ def install
6367

6468
sleep 15
6569

66-
assert_path_exists "/tmp/fastnetmon.dat"
70+
assert_path_exists testpath/"fastnetmon.dat"
6771

68-
ipv4_stats_output = File.read("/tmp/fastnetmon.dat")
72+
ipv4_stats_output = File.read(testpath/"fastnetmon.dat")
6973
assert_match("Incoming traffic", ipv4_stats_output)
7074

71-
assert_path_exists "/tmp/fastnetmon_ipv6.dat"
75+
assert_path_exists testpath/"fastnetmon_ipv6.dat"
7276

73-
ipv6_stats_output = File.read("/tmp/fastnetmon_ipv6.dat")
77+
ipv6_stats_output = File.read(testpath/"fastnetmon_ipv6.dat")
7478
assert_match("Incoming traffic", ipv6_stats_output)
7579
ensure
7680
Process.kill "SIGTERM", fastnetmon_pid

0 commit comments

Comments
 (0)