Don't test mode and symlinks on windows

This commit is contained in:
Morgan Haskel 2014-10-03 15:01:20 -04:00
parent 3ed9715731
commit bc727a7a62
2 changed files with 13 additions and 14 deletions

View file

@ -42,49 +42,49 @@ describe 'basic concat test' do
describe file("#{vardir}/concat") do
it { should be_directory }
it { should be_owned_by username }
it("should be mode", :unless => (fact('osfamily') == 'AIX')) {
it("should be mode", :unless => (fact('osfamily') == 'AIX') or fact('osfamily') == 'windows') {
should be_mode 755
}
end
describe file("#{vardir}/concat/bin") do
it { should be_directory }
it { should be_owned_by username }
it("should be mode", :unless => (fact('osfamily') == 'AIX')) {
it("should be mode", :unless => (fact('osfamily') == 'AIX') or fact('osfamily') == 'windows') {
should be_mode 755
}
end
describe file("#{vardir}/concat/bin/#{scriptname}") do
it { should be_file }
it { should be_owned_by username }
it("should be mode", :unless => (fact('osfamily') == 'AIX')) {
it("should be mode", :unless => (fact('osfamily') == 'AIX') or fact('osfamily') == 'windows') {
should be_mode 755
}
end
describe file("#{vardir}/concat/#{safe_basedir}_file") do
it { should be_directory }
it { should be_owned_by username }
it("should be mode", :unless => (fact('osfamily') == 'AIX')) {
it("should be mode", :unless => (fact('osfamily') == 'AIX') or fact('osfamily') == 'windows') {
should be_mode 750
}
end
describe file("#{vardir}/concat/#{safe_basedir}_file/fragments") do
it { should be_directory }
it { should be_owned_by username }
it("should be mode", :unless => (fact('osfamily') == 'AIX')) {
it("should be mode", :unless => (fact('osfamily') == 'AIX') or fact('osfamily') == 'windows') {
should be_mode 750
}
end
describe file("#{vardir}/concat/#{safe_basedir}_file/fragments.concat") do
it { should be_file }
it { should be_owned_by username }
it("should be mode", :unless => (fact('osfamily') == 'AIX')) {
it("should be mode", :unless => (fact('osfamily') == 'AIX') or fact('osfamily') == 'windows') {
should be_mode 640
}
end
describe file("#{vardir}/concat/#{safe_basedir}_file/fragments.concat.out") do
it { should be_file }
it { should be_owned_by username }
it("should be mode", :unless => (fact('osfamily') == 'AIX')) {
it("should be mode", :unless => (fact('osfamily') == 'AIX') or fact('osfamily') == 'windows') {
should be_mode 640
}
end
@ -125,7 +125,7 @@ describe 'basic concat test' do
it { should be_file }
it { should be_owned_by username }
it { should be_grouped_into groupname }
it("should be mode", :unless => (fact('osfamily') == 'AIX')) {
it("should be mode", :unless => (fact('osfamily') == 'AIX') or fact('osfamily') == 'windows') {
should be_mode 644
}
it { should contain '1' }
@ -134,14 +134,14 @@ describe 'basic concat test' do
describe file("#{vardir}/concat/#{safe_basedir}_file/fragments/01_1") do
it { should be_file }
it { should be_owned_by username }
it("should be mode", :unless => (fact('osfamily') == 'AIX')) {
it("should be mode", :unless => (fact('osfamily') == 'AIX') or fact('osfamily') == 'windows') {
should be_mode 640
}
end
describe file("#{vardir}/concat/#{safe_basedir}_file/fragments/02_2") do
it { should be_file }
it { should be_owned_by username }
it("should be mode", :unless => (fact('osfamily') == 'AIX')) {
it("should be mode", :unless => (fact('osfamily') == 'AIX') or fact('osfamily') == 'windows') {
should be_mode 640
}
end
@ -174,7 +174,7 @@ describe 'basic concat test' do
describe file("#{basedir}/file") do
it { should be_file }
it("should be mode", :unless => (fact('osfamily') == 'AIX')) {
it("should be mode", :unless => (fact('osfamily') == 'AIX') or fact('osfamily') == 'windows') {
should be_mode 644
}
it { should contain '1' }

View file

@ -73,10 +73,9 @@ describe 'deprecation warnings' do
end
end
context 'concat::fragment ensure parameter' do
context 'concat::fragment ensure parameter', :unless => fact('osfamily') == 'windows' do
context 'target file exists' do
before(:all) do
shell("/bin/echo 'file1 contents' > #{basedir}/file1")
pp = <<-EOS
file { '#{basedir}':
ensure => directory,
@ -126,7 +125,7 @@ describe 'deprecation warnings' do
end
end # target file exists
context 'target does not exist' do
context 'target does not exist', :unless => fact('osfamily') == 'windows' do
pp = <<-EOS
concat { '#{basedir}/file': }
concat::fragment { 'foo':