From 73823252736a2977c754f49e7c321300de14dfcd Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Sun, 13 Sep 2020 13:48:44 +0200 Subject: [PATCH] Drop CentOS 6 support We don't run acceptance tests for CentOS 6 since a long time. In https://github.com/voxpupuli/puppet-python/pull/564 we tried to enable the acceptance tests again but they don't work. * CentOS 6 ships Python 2.6 which is EOL since ages * CentOS 6 is EOL by end of the year anyway * We already support CentOS 7 --- metadata.json | 1 - spec/classes/python_spec.rb | 147 ------------------------------------ 2 files changed, 148 deletions(-) diff --git a/metadata.json b/metadata.json index a4896b3c..de0d6e2c 100644 --- a/metadata.json +++ b/metadata.json @@ -25,7 +25,6 @@ { "operatingsystem": "CentOS", "operatingsystemrelease": [ - "6", "7" ] }, diff --git a/spec/classes/python_spec.rb b/spec/classes/python_spec.rb index ef6c10db..92712bdd 100644 --- a/spec/classes/python_spec.rb +++ b/spec/classes/python_spec.rb @@ -223,153 +223,6 @@ end when 'RedHat', 'CentOS' case facts[:os]['release']['major'] - when '5' - # written for RHEL 5 - context 'on a Redhat OS' do - it { is_expected.to contain_class('python::install') } - # Base debian packages. - it { is_expected.to contain_package('python') } - it { is_expected.to contain_package('python-dev').with_name('python-devel') } - it { is_expected.to contain_package('python-dev').with_alias('python-devel') } - it { is_expected.to contain_package('pip') } - it { is_expected.to contain_package('pip').with_name('python-pip') } - # Basic python packages (from pip) - it { is_expected.to contain_package('virtualenv') } - - describe 'EPEL may be needed on EL' do - context 'default/empty' do - it { is_expected.to contain_class('epel') } - end - end - - describe 'with python::dev' do - context 'true' do - let(:params) { { dev: 'present' } } - - it { is_expected.to contain_package('python-dev').with_ensure('present') } - end - context 'empty/default' do - it { is_expected.to contain_package('python-dev').with_ensure('absent') } - end - end - - describe 'with manage_gunicorn' do - context 'true' do - let(:params) { { manage_gunicorn: true } } - - it { is_expected.to contain_package('gunicorn') } - end - context 'empty args' do - # let(:params) {{ :manage_gunicorn => '' }} - it { is_expected.to contain_package('gunicorn') } - end - context 'false' do - let(:params) { { manage_gunicorn: false } } - - it { is_expected.not_to contain_package('gunicorn') } - end - end - - describe 'with python::provider' do - context 'pip' do - let(:params) { { provider: 'pip' } } - - it { - is_expected.to contain_package('virtualenv').with( - 'provider' => 'pip' - ) - } - it { - is_expected.to contain_package('pip').with( - 'provider' => 'pip' - ) - } - end - - context 'anaconda' do - let(:params) { { provider: 'anaconda', anaconda_install_path: '/opt/test_path' } } - - it { - is_expected.to contain_file('/var/tmp/anaconda_installer.sh') - is_expected.to contain_exec('install_anaconda_python').with_command('/var/tmp/anaconda_installer -b -p /opt/test_path') - is_expected.to contain_exec('install_anaconda_virtualenv').with_command('/opt/test_path/bin/pip install virtualenv') - } - end - - # python::provider - context 'default' do - let(:params) { { provider: '' } } - - it { is_expected.to contain_package('virtualenv') } - it { is_expected.to contain_package('pip') } - - describe 'with python::virtualenv' do - context 'true' do - let(:params) { { provider: '', virtualenv: 'present' } } - - it { is_expected.to contain_package('virtualenv').with_ensure('present') } - end - end - - describe 'with python::virtualenv' do - context 'default/empty' do - let(:params) { { provider: '' } } - - it { is_expected.to contain_package('virtualenv').with_ensure('absent') } - end - end - end - end - - describe 'with python::dev' do - context 'true' do - let(:params) { { dev: 'present' } } - - it { is_expected.to contain_package('python-dev').with_ensure('present') } - end - context 'default/empty' do - it { is_expected.to contain_package('python-dev').with_ensure('absent') } - end - end - end - when '6' - - context 'on a Redhat 6 OS' do - it { is_expected.to contain_class('python::install') } - it { is_expected.to contain_package('pip').with_name('python-pip') } - - describe 'with python::provider' do - context 'scl' do - describe 'with version' do - context '3.6 SCL meta package' do - let(:params) { { version: 'rh-python36' } } - - it { is_expected.to compile.with_all_deps } - end - context '3.6 SCL python package' do - let(:params) { { version: 'rh-python36-python' } } - - it { is_expected.to compile.with_all_deps } - end - end - describe 'with manage_scl' do - context 'true' do - let(:params) { { provider: 'scl', manage_scl: true } } - - it { is_expected.to contain_package('centos-release-scl') } - it { is_expected.to contain_package('scl-utils') } - end - context 'false' do - let(:params) { { provider: 'scl', manage_scl: false } } - - it { is_expected.not_to contain_package('centos-release-scl') } - it { is_expected.not_to contain_package('scl-utils') } - end - end - end - end - end - when '7' context 'on a Redhat 7 OS' do