Skip to content

Commit

Permalink
[COOK-2141] - add a test
Browse files Browse the repository at this point in the history
  • Loading branch information
jtimberman committed Jan 10, 2013
1 parent 609b412 commit b2e370c
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 1 deletion.
1 change: 1 addition & 0 deletions test/kitchen/Kitchenfile
@@ -1,4 +1,5 @@
cookbook "rsyslog" do
configuration "default"
configuration "server"
configuration "cook-2141"
end
@@ -0,0 +1,28 @@
#
# Cookbook Name:: rsyslog_test
# Minitest:: cook-2141
#
# Copyright 2013, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

require File.expand_path('../support/helpers', __FILE__)

describe "rsyslog_test::cook-2141" do
include Helpers::RsyslogTest

it 'contains the PreserveFQDN configuration directive' do
file('/etc/rsyslog.conf').must_include('$PreserveFQDN off')
end
end
@@ -0,0 +1,27 @@
#
# Cookbook Name:: rsyslog_test
# Recipe:: default
#
# Copyright 2013, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

module Helpers
module RsyslogTest
include MiniTest::Chef::Assertions
include MiniTest::Chef::Context
include MiniTest::Chef::Resources

end
end
20 changes: 20 additions & 0 deletions test/kitchen/cookbooks/rsyslog_test/recipes/cook-2141.rb
@@ -0,0 +1,20 @@
#
# Cookbook Name:: rsyslog_test
# Recipe:: cook-2141
#
# Copyright 2012, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

include_recipe "rsyslog::default"
2 changes: 1 addition & 1 deletion test/kitchen/cookbooks/rsyslog_test/recipes/default.rb
Expand Up @@ -2,7 +2,7 @@
# Cookbook Name:: rsyslog_test
# Recipe:: default
#
# Copyright 2012, Opscode, Inc.
# Copyright 2013, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down

0 comments on commit b2e370c

Please sign in to comment.