-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(SIMP-6212) Add function to install simp deps repo (#96)
Added a function, install_simp_repos(), that sets up the SIMP internet package repositories. Using this throughout acceptance tests in the SIMP code base will allow any SIMP repo changes to be updated in one place, should it ever change. SIMP-6212 #comment This fix is needed for pkg-r10k tests
- Loading branch information
1 parent
dcaa82c
commit 2ddd45d
Showing
4 changed files
with
139 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
module Simp; end | ||
|
||
module Simp::BeakerHelpers | ||
VERSION = '1.13.1' | ||
VERSION = '1.14.0' | ||
end |
43 changes: 43 additions & 0 deletions
43
spec/acceptance/suites/default/install_simp_deps_repo_spec.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
require 'spec_helper_acceptance' | ||
|
||
hosts.each do |host| | ||
describe '#write_hieradata_to' do | ||
|
||
it 'should install yum utils' do | ||
host.install_package('yum-utils') | ||
end | ||
|
||
context 'defailt settings' do | ||
before(:all) { install_simp_repos(host) } | ||
|
||
it 'creates the repo' do | ||
on host, 'test -f /etc/yum.repos.d/simp.repo' | ||
on host, 'test -f /etc/yum.repos.d/simp_deps.repo' | ||
end | ||
|
||
it 'enables the correct repos' do | ||
simp6info = on(host, '/usr/bin/yum repolist -v simp | grep ^Repo-status').stdout.strip | ||
expect(simp6info).to match(/.*Repo-status.*enabled.*/) | ||
simp6depsinfo = on(host, 'yum repolist -v simp_deps| grep ^Repo-status').stdout.strip | ||
expect(simp6depsinfo).to match(/.*Repo-status.*enabled.*/) | ||
end | ||
end | ||
|
||
context 'when passed a disabled list ' do | ||
before(:all) { install_simp_repos(host, ['simp'] ) } | ||
|
||
it 'creates the repo' do | ||
on host, 'test -f /etc/yum.repos.d/simp.repo' | ||
on host, 'test -f /etc/yum.repos.d/simp_deps.repo' | ||
end | ||
|
||
it 'enables the correct repos' do | ||
simp6info = on(host, 'yum repolist -v simp | grep ^Repo-status').stdout.strip | ||
expect(simp6info).to match(/.*Repo-status.*disabled.*/) | ||
simp6depsinfo = on(host, 'yum repolist -v simp_deps| grep ^Repo-status').stdout.strip | ||
expect(simp6depsinfo).to match(/.*Repo-status.*enabled.*/) | ||
end | ||
end | ||
|
||
end | ||
end |