Compare commits

..

No commits in common. "develop" and "master" have entirely different histories.

9 changed files with 1 additions and 123 deletions

View file

@ -1,25 +0,0 @@
---
driver:
name: docker
provisioner:
name: chef_zero
environments_path: test/environments
client_rb:
environment: integration_test_env
platforms:
- name: centos-7.2-chef-12
driver_config:
image: centos:7.2.1511
platform: rhel
require_chef_omnibus: 12.16.42
use_sudo: false
hostname: integration.test.test
suites:
- name: default
data_bags_path: "test/integration/data_bags"
run_list:
- recipe[yum-rsyslog]

View file

@ -1,7 +0,0 @@
source 'https://rubygems.org'
gem 'berkshelf'
gem 'test-kitchen'
gem 'chefspec'
gem 'foodcritic'
gem 'kitchen-docker'

View file

@ -1 +0,0 @@
.kitchen

View file

@ -4,7 +4,7 @@ maintainer_email 'psi-jack@linux-help.org'
license 'Apache 2.0' license 'Apache 2.0'
description 'Installs and configures the Official Rsyslog Yum Repository' description 'Installs and configures the Official Rsyslog Yum Repository'
long_description '' long_description ''
version '0.1.2' version '0.1.1'
issues_url 'http://gogs.home.ld/Linux-Help/cookbook-yum-rsyslog/issues' issues_url 'http://gogs.home.ld/Linux-Help/cookbook-yum-rsyslog/issues'
source_url 'http://gogs.home.ld/Linux-Help/cookbook-yum-rsyslog' source_url 'http://gogs.home.ld/Linux-Help/cookbook-yum-rsyslog'

View file

@ -1,10 +0,0 @@
require 'chefspec'
require 'chefspec/berkshelf'
RSpec.configure do |config|
config.platform = 'centos'
config.version = '7.2.1511'
end
ChefSpec::Coverage.start!

View file

@ -1,44 +0,0 @@
require 'spec_helper'
describe 'yum-rsyslog::default' do
context 'Creates rsyslog YUM repository and enables it.' do
let(:chef_run) do
ChefSpec::SoloRunner.new do |node|
# Create a new environment (you could also use a different :let block or :before block)
env = Chef::Environment.new
env.name 'unit_test'
# Stub the node to return this environment
allow(node).to receive(:chef_environment).and_return(env.name)
# Stub any calls to Environment.load to return this environment
allow(Chef::Environment).to receive(:load).and_return(env)
# Stubbing out fqdn node attribute
node.automatic['fqdn'] = 'unit.testing.stub'
end.converge(described_recipe)
end
#before(:each) do
#stub_command("rpm -qa zabbix-release-2.4-1.el6.noarch ").and_return(false)
#allow(Chef::EncryptedDataBagItem).to receive(:load).with('odhp_credentials', 'credentials').and_return(
#{
# 'zabbix' => {
# 'users' => {
# 'unit_test_env' => {
# 'postgres' => {
# 'username' => 'postgres_username',
# 'password' => 'postgres_password'
# }
# }
# }
# }
#})
#end
it 'installs the rsyslog repository' do
expect(chef_run).to create_yum_repository('rsyslog')
end
end
end

View file

@ -1,16 +0,0 @@
{
"name": "integration_test_env",
"description": "placeholder for integration testing",
"cookbook_versions": {
},
"json_class": "Chef::Environment",
"chef_type": "environment",
"default_attributes": {
},
"override_attributes": {
}
}

View file

@ -1,15 +0,0 @@
require 'spec_helper'
describe 'yum-rsyslog::default' do
describe yumrepo('rsyslog') do
it { should be_enabled }
end
describe file('/etc/yum.repos.d/rsyslog.repo') do
it { should be_file }
it { should be_mode 644 }
it { should be_owned_by 'root' }
it { should be_grouped_into 'root' }
end
end

View file

@ -1,4 +0,0 @@
require 'serverspec'
set :backend, :exec