Move all files on the host under a common directory

This will make running kamal remove simpler, we can just clean up that
directory.
This commit is contained in:
Donal McBreen
2024-09-12 15:40:32 +01:00
parent cb73c730f9
commit c21757f747
20 changed files with 112 additions and 107 deletions

View File

@@ -18,22 +18,22 @@ class CommandsAuditorTest < ActiveSupport::TestCase
test "record" do
assert_equal [
:mkdir, "-p", ".kamal", "&&",
:mkdir, "-p", ".kamal/apps/app", "&&",
:echo,
"[#{@recorded_at}] [#{@performer}]",
"app removed container",
">>", ".kamal/app-audit.log"
">>", ".kamal/apps/app/audit.log"
], @auditor.record("app removed container")
end
test "record with destination" do
new_command(destination: "staging").tap do |auditor|
assert_equal [
:mkdir, "-p", ".kamal", "&&",
:mkdir, "-p", ".kamal/apps/app-staging", "&&",
:echo,
"[#{@recorded_at}] [#{@performer}] [staging]",
"app removed container",
">>", ".kamal/app-staging-audit.log"
">>", ".kamal/apps/app-staging/audit.log"
], auditor.record("app removed container")
end
end
@@ -41,22 +41,22 @@ class CommandsAuditorTest < ActiveSupport::TestCase
test "record with command details" do
new_command(role: "web").tap do |auditor|
assert_equal [
:mkdir, "-p", ".kamal", "&&",
:mkdir, "-p", ".kamal/apps/app", "&&",
:echo,
"[#{@recorded_at}] [#{@performer}] [web]",
"app removed container",
">>", ".kamal/app-audit.log"
">>", ".kamal/apps/app/audit.log"
], auditor.record("app removed container")
end
end
test "record with arg details" do
assert_equal [
:mkdir, "-p", ".kamal", "&&",
:mkdir, "-p", ".kamal/apps/app", "&&",
:echo,
"[#{@recorded_at}] [#{@performer}] [value]",
"app removed container",
">>", ".kamal/app-audit.log"
">>", ".kamal/apps/app/audit.log"
], @auditor.record("app removed container", detail: "value")
end