From fffb683123471572bbc4a6eafb7940bca7baeee9 Mon Sep 17 00:00:00 2001 From: vorlock Date: Fri, 8 Apr 2016 12:57:22 +0100 Subject: [PATCH] Renaming repo from sensu to uchiwa This fix allow uchiwa and sensu to coexist on the same server --- manifests/repo/apt.pp | 2 +- manifests/repo/yum.pp | 6 +++--- spec/classes/uchiwa_spec.rb | 22 +++++++++++----------- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/manifests/repo/apt.pp b/manifests/repo/apt.pp index a84cb80..f2debce 100755 --- a/manifests/repo/apt.pp +++ b/manifests/repo/apt.pp @@ -22,7 +22,7 @@ $url = 'http://repositories.sensuapp.org/apt' } - apt::source { 'sensu': + apt::source { 'uchiwa': ensure => $ensure, before => Package['uchiwa'], include => { diff --git a/manifests/repo/yum.pp b/manifests/repo/yum.pp index 54e2e5b..8736d3f 100755 --- a/manifests/repo/yum.pp +++ b/manifests/repo/yum.pp @@ -18,14 +18,14 @@ } } - yumrepo { 'sensu': + yumrepo { 'uchiwa': enabled => 1, baseurl => $url, gpgcheck => 0, - name => 'sensu', + name => 'uchiwa', descr => 'sensuapp.org uchiwa repo', before => Package['uchiwa'], } } -} \ No newline at end of file +} diff --git a/spec/classes/uchiwa_spec.rb b/spec/classes/uchiwa_spec.rb index c180f7b..284785b 100644 --- a/spec/classes/uchiwa_spec.rb +++ b/spec/classes/uchiwa_spec.rb @@ -51,7 +51,7 @@ let(:pre_condition) { [ 'define apt::source ($ensure, $location, $release, $repos, $include, $key) {}' ] } context 'default' do - it { should contain_apt__source('sensu').with( + it { should contain_apt__source('uchiwa').with( :ensure => 'present', :location => 'http://repositories.sensuapp.org/apt', :release => 'sensu', @@ -64,14 +64,14 @@ context 'unstable repo' do let(:params) { { :repo => 'unstable' } } - it { should contain_apt__source('sensu').with_repos('unstable') } + it { should contain_apt__source('uchiwa').with_repos('unstable') } end context 'override repo url' do let(:params) { { :repo_source => 'http://repo.mydomain.com/apt' } } - it { should contain_apt__source('sensu').with( :location => 'http://repo.mydomain.com/apt') } + it { should contain_apt__source('uchiwa').with( :location => 'http://repo.mydomain.com/apt') } - it { should_not contain_apt__key('sensu').with( + it { should_not contain_apt__key('uchiwa').with( :key => '7580C77F', :key_source => 'http://repo.mydomain.com/apt/pubkey.gpg' ) } @@ -80,7 +80,7 @@ context 'override key ID and key source' do let(:params) { { :repo_key_id => 'FFFFFFFF', :repo_key_source => 'http://repo.mydomina.com/apt/pubkey.gpg' } } - it { should_not contain_apt__key('sensu').with( + it { should_not contain_apt__key('uchiwa').with( :key => 'FFFFFFFF', :key_source => 'http://repo.mydomain.com/apt/pubkey.gpg' ) } @@ -89,9 +89,9 @@ context 'install_repo => false' do let(:params) { { :install_repo => false, :repo => 'main' } } - it { should_not contain_apt__source('sensu') } + it { should_not contain_apt__source('uchiwa') } - it { should_not contain_apt__key('sensu').with( + it { should_not contain_apt__key('uchiwa').with( :key => '7580C77F', :key_source => 'http://repositories.sensuapp.org/apt/pubkey.gpg' ) } @@ -111,7 +111,7 @@ let(:facts) { { :osfamily => 'RedHat', :operatingsystemmajrelease => '6',:concat_basedir => '/dne', } } context 'default' do - it { should contain_yumrepo('sensu').with( + it { should contain_yumrepo('uchiwa').with( :enabled => 1, :baseurl => 'http://repos.sensuapp.org/yum/el/6/$basearch/', :gpgcheck => 0, @@ -121,18 +121,18 @@ context 'unstable repo' do let(:params) { { :repo => 'unstable' } } - it { should contain_yumrepo('sensu').with(:baseurl => 'http://repos.sensuapp.org/yum-unstable/el/6/$basearch/' )} + it { should contain_yumrepo('uchiwa').with(:baseurl => 'http://repos.sensuapp.org/yum-unstable/el/6/$basearch/' )} end context 'override repo url' do let(:params) { { :repo_source => 'http://repo.mydomain.com/yum' } } - it { should contain_yumrepo('sensu').with( :baseurl => 'http://repo.mydomain.com/yum') } + it { should contain_yumrepo('uchiwa').with( :baseurl => 'http://repo.mydomain.com/yum') } end context 'install_repo => false' do let(:params) { { :install_repo => false } } - it { should_not contain_yumrepo('sensu') } + it { should_not contain_yumrepo('uchiwa') } it { should contain_package('uchiwa').with( :require => nil