File tree Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Original file line number Diff line number Diff line change 109
109
$psql_path = pick($psql_path , " ${bindir} /psql" )
110
110
111
111
$perl_package_name = pick($perl_package_name , ' perl-DBD-Pg' )
112
- $python_package_name = pick($python_package_name , ' python-psycopg2' )
112
+ if $facts [' os' ][' family' ] == ' RedHat' and versioncmp($facts [' os' ][' release' ][' major' ], ' 8' ) >= 0 {
113
+ $python_package_name = pick($python_package_name , ' python3-psycopg2' )
114
+ } else {
115
+ $python_package_name = pick($python_package_name , ' python-psycopg2' )
116
+ }
113
117
114
118
if $postgresql::globals::postgis_package_name {
115
119
$postgis_package_name = $postgresql::globals::postgis_package_name
Original file line number Diff line number Diff line change 22
22
}
23
23
end
24
24
25
+ describe 'on a redhat based os with python 3' do
26
+ let :facts do
27
+ {
28
+ os : {
29
+ family : 'RedHat' ,
30
+ name : 'RedHat' ,
31
+ release : { 'full' => '8.2' , 'major' => '8' } ,
32
+ } ,
33
+ }
34
+ end
35
+
36
+ it {
37
+ is_expected . to contain_package ( 'python-psycopg2' ) . with (
38
+ name : 'python3-psycopg2' ,
39
+ ensure : 'present' ,
40
+ )
41
+ }
42
+ end
43
+
25
44
describe 'on a debian based os' do
26
45
let :facts do
27
46
{
You can’t perform that action at this time.
0 commit comments