git-secret/.ci/integration/gnupg-git/serverspec/default_spec.rb

54 lines
1.4 KiB
Ruby
Raw Normal View History

2017-09-24 14:03:05 +00:00
require_relative './spec_helper'
describe 'git-secret::test' do
describe package('git-secret') do
it { should be_installed }
end
if host_inventory['platform'] == 'fedora'
describe command('find /tmp/git-secret/build -name "*.rpm"') do
its(:stdout) { should match /git-secret.*rpm/ }
end
elsif host_inventory['platform'] == 'alpine'
describe command('find /tmp/git-secret/build -name "*.apk"') do
its(:stdout) { should match /git-secret.*apk/ }
end
2017-09-24 14:03:05 +00:00
else
describe command('find /tmp/git-secret/build -name "*.deb"') do
its(:stdout) { should match /git-secret.*deb/ }
end
end
describe file('/.git-secret_test-passed') do
it { should exist }
end
describe file('/.git-secret_lint-passed') do
it { should exist }
end
if host_inventory['platform'] == 'fedora'
describe command('rpm --query --info git-secret') do
its(:exit_status) { should eq 0 }
end
elsif host_inventory['platform'] == 'alpine'
describe command('apk info git-secret') do
its(:exit_status) { should eq 0 }
end
2017-09-24 14:03:05 +00:00
else
describe command('dpkg-query --status git-secret') do
its(:exit_status) { should eq 0 }
end
end
describe command('man -w "git-secret"') do
2017-09-24 14:03:05 +00:00
its(:exit_status) { should eq 0 }
end
describe command('man -w "git-secret-init"') do
2017-09-24 14:03:05 +00:00
its(:exit_status) { should eq 0 }
end
end