From c3de89bb5916b0e7a7b5127d448cad7bbe4ca867 Mon Sep 17 00:00:00 2001 From: Samuel Sieg Date: Fri, 24 Mar 2023 09:19:13 +0100 Subject: [PATCH] Add accessory test --- test/commands/accessory_test.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/commands/accessory_test.rb b/test/commands/accessory_test.rb index d14b5cef..84590d56 100644 --- a/test/commands/accessory_test.rb +++ b/test/commands/accessory_test.rb @@ -61,6 +61,14 @@ class CommandsAccessoryTest < ActiveSupport::TestCase new_command(:busybox).run.join(" ") end + test "run with logging config" do + @config[:logging] = { "driver" => "local", "options" => { "max-size" => "100m", "max-file" => "3" } } + + assert_equal \ + "docker run --name app-busybox --detach --restart unless-stopped --log-driver local --log-opt max-size=\"100m\" --log-opt max-file=\"3\" --label service=\"app-busybox\" busybox:latest", + new_command(:busybox).run.join(" ") + end + test "start" do assert_equal \ "docker container start app-mysql",