]> git.openstreetmap.org Git - chef.git/commitdiff
Add test for hardware cookbook
authorTom Hughes <tom@compton.nu>
Thu, 20 Feb 2020 18:50:50 +0000 (18:50 +0000)
committerTom Hughes <tom@compton.nu>
Thu, 20 Feb 2020 18:50:50 +0000 (18:50 +0000)
.kitchen.yml
.travis.yml
cookbooks/hardware/metadata.rb
cookbooks/hardware/recipes/default.rb

index 9f87919ba3e6b7871a4ea8e7819c7407abf118e0..15e1dc2e22f832d96707e3da7060ab3438da7452 100644 (file)
@@ -105,6 +105,9 @@ suites:
   - name: gps-tile
     run_list:
       - recipe[gps-tile::default]
+  - name: hardware
+    run_list:
+      - recipe[hardware::default]
   - name: incron
     run_list:
       - recipe[incron::default]
index 99ddba7fecb3570ae84359b25a929e5be1177f79..7953740a3c400aeb678da48b21420709644cc67d 100644 (file)
@@ -63,6 +63,9 @@ jobs:
     - name: "Test Kitchen (gps-tile)"
       script:
         - bundle exec kitchen test gps-tile-ubuntu-1804
+    - name: "Test Kitchen (hardare)"
+      script:
+        - bundle exec kitchen test hardware-ubuntu-1804
     - name: "Test Kitchen (incron)"
       script:
         - bundle exec kitchen test incron-ubuntu-1804
index b632a23d93aeca70395fba08666ba87b27ab7827..c7891e90939d5a19c71c2476cbc4ae5c732e83bf 100644 (file)
@@ -7,6 +7,7 @@ description       "Configures hardware"
 version           "1.0.0"
 supports          "ubuntu"
 depends           "apt"
+depends           "chef"
 depends           "git"
 depends           "munin"
 depends           "ohai"
index 7c7790d47075cf4e549ac483a65f89a8593270a8..fa5f43c648f33f2ec2dd3e7cd554573a619dcc8e 100644 (file)
 # limitations under the License.
 #
 
+include_recipe "apt"
+include_recipe "git"
 include_recipe "munin"
+include_recipe "sysfs"
 include_recipe "tools"
 
 ohai_plugin "hardware" do
@@ -259,6 +262,7 @@ if tools_packages.include?("areca")
     repository "https://git.openstreetmap.org/private/areca.git"
     user "root"
     group "root"
+    not_if { ENV["TEST_KITCHEN"] }
   end
 else
   directory "/opt/areca" do