From 79faf6908091c133fa355da3cdd8893b73c8f2da Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Mon, 24 Feb 2020 19:11:32 +0000 Subject: [PATCH] Add test for hot cookbook --- .github/workflows/test-kitchen.yml | 1 + .kitchen.yml | 3 +++ .../integration/hot/serverspec/apache_spec.rb | 21 +++++++++++++++++++ 3 files changed, 25 insertions(+) create mode 100644 test/integration/hot/serverspec/apache_spec.rb diff --git a/.github/workflows/test-kitchen.yml b/.github/workflows/test-kitchen.yml index 1c83e25f4..5345c0ed3 100644 --- a/.github/workflows/test-kitchen.yml +++ b/.github/workflows/test-kitchen.yml @@ -37,6 +37,7 @@ jobs: - git-web - gps-tile - hardware + - hot - incron - letsencrypt - mailman diff --git a/.kitchen.yml b/.kitchen.yml index 8414198bb..4195d7e0d 100644 --- a/.kitchen.yml +++ b/.kitchen.yml @@ -132,6 +132,9 @@ suites: - name: hardware run_list: - recipe[hardware::default] + - name: hot + run_list: + - recipe[hot::default] - name: incron run_list: - recipe[incron::default] diff --git a/test/integration/hot/serverspec/apache_spec.rb b/test/integration/hot/serverspec/apache_spec.rb new file mode 100644 index 000000000..446d3b915 --- /dev/null +++ b/test/integration/hot/serverspec/apache_spec.rb @@ -0,0 +1,21 @@ +require "serverspec" + +# Required by serverspec +set :backend, :exec + +describe package("apache2") do + it { should be_installed } +end + +describe service("apache2") do + it { should be_enabled } + it { should be_running } +end + +describe port(80) do + it { should be_listening.with("tcp") } +end + +describe port(443) do + it { should be_listening.with("tcp") } +end -- 2.45.2