From 347046019f55f6b1a3e9d69293c1e847ed23e5e0 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Wed, 8 Mar 2023 18:05:06 +0100 Subject: [PATCH] Add test --- test/cli/server_test.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 test/cli/server_test.rb diff --git a/test/cli/server_test.rb b/test/cli/server_test.rb new file mode 100644 index 00000000..bf0119f4 --- /dev/null +++ b/test/cli/server_test.rb @@ -0,0 +1,16 @@ +require_relative "cli_test_case" + +class CliServerTest < CliTestCase + test "bootstrap" do + run_command("bootstrap").tap do |output| + assert_match /which curl/, output + assert_match /which docker/, output + assert_match /apt-get update -y && apt-get install curl docker.io -y/, output + end + end + + private + def run_command(*command) + stdouted { Mrsk::Cli::Server.start([*command, "-c", "test/fixtures/deploy_with_accessories.yml"]) } + end +end