Created
November 4, 2013 16:22
-
-
Save dmsimard/7305126 to your computer and use it in GitHub Desktop.
ceph_init_systemspec
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
# Copyright (C) iWeb Technologies 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. | |
# | |
# Author: David Moreau Simard <dmsimard@iweb.com> | |
require 'spec_helper_system' | |
describe 'ceph::init with ceph::repo' do | |
describe 'dumpling' do | |
it 'should find 0.67' do | |
pp = <<-EOS | |
class { 'ceph::repo': | |
release => 'dumpling' | |
} | |
class { 'ceph::init': } | |
Class['ceph::repo'] -> Class['ceph::init'] | |
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': } | |
class { 'ceph::init': } | |
Class['ceph::repo'] -> Class['ceph::init'] | |
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment