]> git.openstreetmap.org Git - chef.git/commitdiff
Add test for rsyncd cookbook.
authorTom Hughes <tom@compton.nu>
Tue, 18 Feb 2020 22:16:03 +0000 (22:16 +0000)
committerTom Hughes <tom@compton.nu>
Tue, 18 Feb 2020 22:16:03 +0000 (22:16 +0000)
.kitchen.yml
.travis.yml
test/integration/rsyncd/serverspec/rsync_spec.rb [new file with mode: 0644]

index b9f2ae89e7280509e38d083ed829946a9a13f0c6..d3f71ccfa1bd8a4feddfdb8eec5b47568f590565 100644 (file)
@@ -179,6 +179,9 @@ suites:
   - name: python
     run_list:
       - recipe[python::default]
+  - name: rsyncd
+    run_list:
+      - recipe[rsyncd::default]
   - name: serverinfo
     run_list:
       - recipe[serverinfo::default]
index 9abf71c105b4b9afd7b6182ff61801aef7877e90..4696f3700271b2d01483ace78bdaba1304f21946 100644 (file)
@@ -123,6 +123,9 @@ jobs:
     - name: "Test Kitchen (python)"
       script:
         - bundle exec kitchen test python-ubuntu-1804
+    - name: "Test Kitchen (rsyncd)"
+      script:
+        - bundle exec kitchen test rsyncd-ubuntu-1804
     - name: "Test Kitchen (serverinfo)"
       script:
         - bundle exec kitchen test serverinfo-ubuntu-1804
diff --git a/test/integration/rsyncd/serverspec/rsync_spec.rb b/test/integration/rsyncd/serverspec/rsync_spec.rb
new file mode 100644 (file)
index 0000000..057ec3b
--- /dev/null
@@ -0,0 +1,17 @@
+require "serverspec"
+
+# Required by serverspec
+set :backend, :exec
+
+describe package("rsync") do
+  it { should be_installed }
+end
+
+describe service("rsync") do
+  it { should be_enabled }
+  it { should be_running }
+end
+
+describe port(873) do
+  it { should be_listening.with("tcp") }
+end