first version

This commit is contained in:
Adrien Waksberg 2018-06-09 23:03:33 +02:00
parent b47b320597
commit bfb7daa541
17 changed files with 674 additions and 0 deletions
test/integration/gitea

View file

@ -0,0 +1,4 @@
- hosts: gitea
connection: local
roles:
- ansible-role-gitea

View 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