From 77cbc65941b0877ce5f118367e5c308db5bbee69 Mon Sep 17 00:00:00 2001 From: Daniel Del Rio Figueira Date: Thu, 11 Mar 2021 18:48:43 +0100 Subject: [PATCH] Changed: parametrize tests to add rootless supports --- spec/spec_helper.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 39299aa..0f08e78 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -4,7 +4,23 @@ require 'docker' ROOT_DOCKERFILES = File.expand_path('../../', __FILE__) FIXTURES_PATH = File::expand_path("fixtures", File::dirname(__FILE__)) +$cron_binary = '/usr/sbin/cron' +$dockerfile = 'debian/Dockerfile' +$http_port = '80' +$https_port = '443' +$root_user = 'root' + set :backend, :docker Docker.options[:read_timeout] = 3600 Docker.options[:write_timeout] = 3600 +if ENV['ROOTLESS'] == "true" + $cron_binary = '/usr/local/bin/supercronic' + $dockerfile = 'debian/Dockerfile.rootless' + $http_port = '8080' + $https_port = '4433' + # Where www-data has to be the owner instead of root + $root_user = 'www-data' +end + +puts($root_user)