first version
This commit is contained in:
parent
b47b320597
commit
bfb7daa541
17 changed files with 674 additions and 0 deletions
test/integration/gitea
4
test/integration/gitea/default.yml
Normal file
4
test/integration/gitea/default.yml
Normal file
|
@ -0,0 +1,4 @@
|
|||
- hosts: gitea
|
||||
connection: local
|
||||
roles:
|
||||
- ansible-role-gitea
|
45
test/integration/gitea/serverspec/gitea_spec.rb
Normal file
45
test/integration/gitea/serverspec/gitea_spec.rb
Normal file
|
@ -0,0 +1,45 @@
|
|||
require 'serverspec'
|
||||
|
||||
set :backend, :exec
|
||||
|
||||
describe user('gitea') do
|
||||
it { should exist }
|
||||
it { should have_uid 990 }
|
||||
it { should have_home_directory '/home/gitea' }
|
||||
it { should have_login_shell '/bin/bash' }
|
||||
end
|
||||
|
||||
describe file('/usr/local/bin/gitea') do
|
||||
it { should exist }
|
||||
it { should be_file }
|
||||
it { should be_mode 755 }
|
||||
it { should be_owned_by 'root' }
|
||||
it { should be_grouped_into 'root' }
|
||||
end
|
||||
|
||||
%w[
|
||||
/home/gitea
|
||||
/home/gitea/data
|
||||
/home/gitea/data/repositories
|
||||
/home/gitea/log
|
||||
].each do |directory|
|
||||
describe file(directory) do
|
||||
it { should exist }
|
||||
it { should be_directory }
|
||||
it { should be_mode 750 }
|
||||
it { should be_owned_by 'gitea' }
|
||||
it { should be_grouped_into 'gitea' }
|
||||
end
|
||||
end
|
||||
|
||||
describe file('/home/gitea/data/config.ini') do
|
||||
it { should exist }
|
||||
it { should be_file }
|
||||
it { should be_mode 640 }
|
||||
it { should be_owned_by 'gitea' }
|
||||
it { should be_grouped_into 'gitea' }
|
||||
end
|
||||
|
||||
describe port(3000) do
|
||||
it { should be_listening }
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue