]> git.openstreetmap.org Git - chef.git/commitdiff
Add test for ftp cookbook
authorTom Hughes <tom@compton.nu>
Thu, 20 Feb 2020 18:40:51 +0000 (18:40 +0000)
committerTom Hughes <tom@compton.nu>
Thu, 20 Feb 2020 18:40:51 +0000 (18:40 +0000)
.kitchen.yml
.travis.yml
test/integration/ftp/serverspec/vsftpd_spec.rb [new file with mode: 0644]

index 2e48b43d527ed0ac7b1870b3e3823606e5ffb68e..9f87919ba3e6b7871a4ea8e7819c7407abf118e0 100644 (file)
@@ -87,6 +87,9 @@ suites:
   - name: forum
     run_list:
       - recipe[forum::default]
   - name: forum
     run_list:
       - recipe[forum::default]
+  - name: ftp
+    run_list:
+      - recipe[ftp::default]
   - name: geodns
     run_list:
       - recipe[geodns::default]
   - name: geodns
     run_list:
       - recipe[geodns::default]
index 4df85e1041bc37945e3952652c2dd2306cf4d988..99ddba7fecb3570ae84359b25a929e5be1177f79 100644 (file)
@@ -51,6 +51,9 @@ jobs:
     - name: "Test Kitchen (forum)"
       script:
         - bundle exec kitchen test forum-ubuntu-1804
     - name: "Test Kitchen (forum)"
       script:
         - bundle exec kitchen test forum-ubuntu-1804
+    - name: "Test Kitchen (ftp)"
+      script:
+        - bundle exec kitchen test ftp-ubuntu-1804
     - name: "Test Kitchen (geodns)"
       script:
         - bundle exec kitchen test geodns-ubuntu-1804
     - name: "Test Kitchen (geodns)"
       script:
         - bundle exec kitchen test geodns-ubuntu-1804
diff --git a/test/integration/ftp/serverspec/vsftpd_spec.rb b/test/integration/ftp/serverspec/vsftpd_spec.rb
new file mode 100644 (file)
index 0000000..d6ed28f
--- /dev/null
@@ -0,0 +1,17 @@
+require "serverspec"
+
+# Required by serverspec
+set :backend, :exec
+
+describe package("vsftpd") do
+  it { should be_installed }
+end
+
+describe service("vsftpd") do
+  it { should be_enabled }
+  it { should be_running }
+end
+
+describe port(21) do
+  it { should be_listening.with("tcp6") }
+end