ansible-role-gitolite/test/integration/gitolite/serverspec/gitolite_spec.rb

27 lines
653 B
Ruby
Raw Normal View History

2017-10-07 15:32:18 +00:00
require 'serverspec'
set :backend, :exec
2017-10-07 16:44:20 +00:00
describe package('git') do
it { should be_installed }
end
2017-10-07 15:32:18 +00:00
describe user('git') do
it { should exist }
it { should have_uid 997 }
it { should have_home_directory '/home/git' }
it { should have_login_shell '/bin/bash' }
end
describe command('su - git -c "gitolite list-users"') do
its(:stdout) { should contain 'gitolite' }
its(:stdout) { should contain '@all' }
its(:exit_status) { should eq 0 }
end
describe command('su - git -c "gitolite list-repos"') do
its(:stdout) { should contain 'testing' }
its(:stdout) { should contain 'gitolite-admin' }
its(:exit_status) { should eq 0 }
end