Skip to content

Commit

Permalink
install thumbor into a virtual environment per default
Browse files Browse the repository at this point in the history
  • Loading branch information
Lightning- committed Aug 1, 2024
1 parent 7768399 commit 99cab18
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 17 deletions.
2 changes: 1 addition & 1 deletion data/common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ thumbor::statefile: 'thumbor.version'
thumbor::update_enabled: true
thumbor::user: 'thumbor'
thumbor::version: 'present'
thumbor::venv_path: ~
thumbor::venv_path: /opt/thumbor
21 changes: 5 additions & 16 deletions spec/classes/thumbor_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
}
end

it { is_expected.to contain_file('/etc/thumbor.key').with(mode: '0600') }
it { is_expected.to contain_file('/etc/thumbor.key').with_content(%r{AAAAABBBBCCCCC111112222233333}) }
it { is_expected.to contain_file('/opt/thumbor/thumbor.key').with(mode: '0600') }
it { is_expected.to contain_file('/opt/thumbor/thumbor.key').with_content(%r{AAAAABBBBCCCCC111112222233333}) }
end

context 'when setting config' do
Expand All @@ -46,9 +46,9 @@
}
end

it { is_expected.to contain_file('/etc/thumbor.conf').with_content(%r{AUTO_WEBP = True}) }
it { is_expected.to contain_file('/etc/thumbor.conf').with_content(%r{ENGINE_THREADPOOL_SIZE = 4}) }
it { is_expected.to contain_file('/etc/thumbor.conf').with_content(%r{HTTP_LOADER_MAX_CLIENTS = 1024}) }
it { is_expected.to contain_file('/opt/thumbor/thumbor.conf').with_content(%r{AUTO_WEBP = True}) }
it { is_expected.to contain_file('/opt/thumbor/thumbor.conf').with_content(%r{ENGINE_THREADPOOL_SIZE = 4}) }
it { is_expected.to contain_file('/opt/thumbor/thumbor.conf').with_content(%r{HTTP_LOADER_MAX_CLIENTS = 1024}) }
end

context 'when setting ports' do
Expand All @@ -65,17 +65,6 @@
end
end

context 'when declaring manage_python is false' do
let(:params) do
{
manage_python: false
}
end

it { is_expected.to contain_class('thumbor::python') }
it { is_expected.not_to contain_class('python') }
end

context 'when setting venv_path' do
let(:params) do
{
Expand Down

0 comments on commit 99cab18

Please sign in to comment.