[Housekeeping] Close system port when jobs are cancelled (#182)

* Created a test setup that works

* Refactored test setup into real-world fixes
This commit is contained in:
Kieran
2024-04-11 15:04:19 -07:00
committed by GitHub
parent 2c717e8e7e
commit 17f4bd70f7
6 changed files with 52 additions and 3 deletions
+6
View File
@@ -3,6 +3,12 @@ defmodule Pinchflat.Utils.CliUtilsTest do
alias Pinchflat.Utils.CliUtils
describe "wrap_cmd/3" do
test "delegates to System.cmd/3" do
assert {"output\n", 0} = CliUtils.wrap_cmd("echo", ["output"])
end
end
describe "parse_options/1" do
test "it converts symbol k-v arg keys to kebab case" do
assert ["--buffer-size", "1024"] = CliUtils.parse_options(buffer_size: 1024)