From: Tom Hughes Date: Fri, 14 Feb 2020 16:33:49 +0000 (+0000) Subject: Add test for openssh cookbook X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/58e6d89291e8c457589dd8bf7ff50557de32df66 Add test for openssh cookbook --- diff --git a/.kitchen.yml b/.kitchen.yml index d3ad97d43..0e994e71c 100644 --- a/.kitchen.yml +++ b/.kitchen.yml @@ -113,6 +113,9 @@ suites: - name: ntp run_list: - recipe[ntp::default] + - name: openssh + run_list: + - recipe[openssh::default] - name: otrs run_list: - recipe[accounts::default] diff --git a/.travis.yml b/.travis.yml index bb4e4b49c..86655a944 100644 --- a/.travis.yml +++ b/.travis.yml @@ -65,6 +65,9 @@ jobs: - name: "Test Kitchen (ntp)" script: - bundle exec kitchen test ntp-ubuntu-1804 + - name: "Test Kitchen (openssh)" + script: + - bundle exec kitchen test openssh-ubuntu-1804 - name: "Test Kitchen (otrs)" script: - bundle exec kitchen test otrs-ubuntu-1804 diff --git a/test/integration/openssh/serverspec/openssh_spec.rb b/test/integration/openssh/serverspec/openssh_spec.rb new file mode 100644 index 000000000..49cfac352 --- /dev/null +++ b/test/integration/openssh/serverspec/openssh_spec.rb @@ -0,0 +1,21 @@ +require "serverspec" + +# Required by serverspec +set :backend, :exec + +describe package("openssh-client") do + it { should be_installed } +end + +describe package("openssh-server") do + it { should be_installed } +end + +describe service("ssh") do + it { should be_enabled } + it { should be_running } +end + +describe port(22) do + it { should be_listening.with("tcp") } +end