Merge "ceph::repo integration tests"
This commit is contained in:
commit
9c8f1c466e
|
@ -1,45 +0,0 @@
|
|||
#
|
||||
# Copyright 2013 Cloudwatt <libre-licensing@cloudwatt.com>
|
||||
#
|
||||
# Author: Loic Dachary <loic@dachary.org>
|
||||
#
|
||||
# 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 'spec_helper_system'
|
||||
|
||||
describe 'basic tests:' do
|
||||
|
||||
# Using puppet_apply as a helper
|
||||
it 'ceph::repo should work with no errors' do
|
||||
pp = <<-EOS
|
||||
class { 'ceph::repo':
|
||||
release => 'dumpling'
|
||||
}
|
||||
EOS
|
||||
|
||||
# Run it twice and test for idempotency
|
||||
puppet_apply(pp) do |r|
|
||||
r.exit_code.should_not == 1
|
||||
r.refresh
|
||||
r.exit_code.should be_zero
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
context shell 'apt-cache policy ceph' do
|
||||
its(:stdout) { should =~ /Candidate: 0.67/ }
|
||||
its(:stderr) { should be_empty }
|
||||
its(:exit_code) { should be_zero }
|
||||
end
|
||||
|
||||
end
|
|
@ -0,0 +1,67 @@
|
|||
#
|
||||
# Copyright 2013 Cloudwatt <libre-licensing@cloudwatt.com>
|
||||
#
|
||||
# Author: Loic Dachary <loic@dachary.org>
|
||||
#
|
||||
# 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 'spec_helper_system'
|
||||
|
||||
describe 'ceph::repo' do
|
||||
|
||||
describe 'dumpling' do
|
||||
it 'should find 0.67' do
|
||||
pp = <<-EOS
|
||||
class { 'ceph::repo':
|
||||
release => 'dumpling'
|
||||
}
|
||||
EOS
|
||||
|
||||
# Run it twice and test for idempotency
|
||||
puppet_apply(pp) do |r|
|
||||
r.exit_code.should_not == 1
|
||||
r.refresh
|
||||
r.exit_code.should be_zero
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
context shell 'apt-cache policy ceph' do
|
||||
its(:stdout) { should =~ /Candidate: 0.67/ }
|
||||
its(:stderr) { should be_empty }
|
||||
its(:exit_code) { should be_zero }
|
||||
end
|
||||
end
|
||||
|
||||
describe 'cuttlefish (default)' do
|
||||
it 'should find 0.61' do
|
||||
pp = <<-EOS
|
||||
class { 'ceph::repo': }
|
||||
EOS
|
||||
|
||||
# Run it twice and test for idempotency
|
||||
puppet_apply(pp) do |r|
|
||||
r.exit_code.should_not == 1
|
||||
r.refresh
|
||||
r.exit_code.should be_zero
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
context shell 'apt-cache policy ceph' do
|
||||
its(:stdout) { should =~ /Candidate: 0.61/ }
|
||||
its(:stderr) { should be_empty }
|
||||
its(:exit_code) { should be_zero }
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue