ansible-role-gitolite/spec/gitolite.rb
2017-10-07 18:44:32 +02:00

22 lines
592 B
Ruby

require 'serverspec'
set :backend, :exec
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