summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2018-08-10 16:20:02 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2018-08-10 16:20:02 -0700
commit27e01d76c82e4c64953278399644b6f2cf6417bf (patch)
treefb7324d4f19c17090e687982fff1ae4654a6d1c5
parentcdae8d9618063366fa641d3448a672a20521dea3 (diff)
downloadchef-27e01d76c82e4c64953278399644b6f2cf6417bf.tar.gz
review fixes
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
-rw-r--r--.travis.yml2
-rw-r--r--kitchen-tests/cookbooks/rspec/metadata.rb2
-rw-r--r--kitchen-tests/kitchen.travis.yml2
-rw-r--r--lib/chef/provider/mount/mount.rb5
4 files changed, 8 insertions, 3 deletions
diff --git a/.travis.yml b/.travis.yml
index 50229f7537..d6c6cd0f04 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -321,6 +321,8 @@ matrix:
- cat /tmp/out.txt
- sudo cat /var/log/squid3/cache.log
- sudo cat /var/log/squid3/access.log
+ # Use test-kitchen to launch a centos docker container to run the full rspec tests against. This catches
+ # errors in travis, before PRs are merged, hopefully before they become errors in jenkins.
- rvm: 2.4.4
services: docker
sudo: required
diff --git a/kitchen-tests/cookbooks/rspec/metadata.rb b/kitchen-tests/cookbooks/rspec/metadata.rb
index f0b5bfba75..56fb816ce4 100644
--- a/kitchen-tests/cookbooks/rspec/metadata.rb
+++ b/kitchen-tests/cookbooks/rspec/metadata.rb
@@ -1,6 +1,6 @@
name "rspec"
license "Apache-2.0"
-description "Runs nothing"
+description "Utility cookbook for rspec testing"
version "1.0.0"
chef_version ">= 14"
diff --git a/kitchen-tests/kitchen.travis.yml b/kitchen-tests/kitchen.travis.yml
index 9efbf243ca..cef2b1b98a 100644
--- a/kitchen-tests/kitchen.travis.yml
+++ b/kitchen-tests/kitchen.travis.yml
@@ -69,7 +69,7 @@ platforms:
image: dokken/centos-7
pid_one_command: /usr/lib/systemd/systemd
intermediate_instructions:
- - RUN yum -y install cronie util-linux e2fsprogs
+ - RUN yum -y install e2fsprogs
- RUN egrep -v '::1' /etc/hosts > /etc/hosts.new
- RUN cp /etc/hosts.new /etc/hosts
- RUN sed -i -e "s/Defaults.*requiretty.*/Defaults !requiretty/g" /etc/sudoers
diff --git a/lib/chef/provider/mount/mount.rb b/lib/chef/provider/mount/mount.rb
index 3006b6af07..ad425aead8 100644
--- a/lib/chef/provider/mount/mount.rb
+++ b/lib/chef/provider/mount/mount.rb
@@ -53,7 +53,10 @@ class Chef
def enabled?
# Check to see if there is a entry in /etc/fstab. Last entry for a volume wins.
enabled = false
- return unless ::File.exist?("/etc/fstab")
+ if ::File.exist?("/etc/fstab")
+ logger.debug "/etc/fstab not found, treating mount as not-enabled"
+ return
+ end
::File.foreach("/etc/fstab") do |line|
case line
when /^[#\s]/