Skip to content

Commit

Permalink
feat: Support PostgreSQL 17
Browse files Browse the repository at this point in the history
Signed-off-by: Dan Webb <dan.webb@damacus.io>
  • Loading branch information
damacus committed Nov 1, 2024
1 parent cf7adfb commit 44083d3
Show file tree
Hide file tree
Showing 6 changed files with 93 additions and 133 deletions.
10 changes: 10 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
require:
- cookstyle

AllCops:
TargetRubyVersion: 3.1
Include:
- "**/*.rb"
Exclude:
- "vendor/**/*"
- "spec/**/*"
189 changes: 58 additions & 131 deletions kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,16 @@ verifier:
name: inspec

platforms:
- name: almalinux-8
- name: almalinux-9
- name: amazonlinux-2
- name: centos-7
- name: centos-stream-8
- name: rockylinux-9
- name: oraclelinux-9
- name: centos-stream-9
- name: debian-10
- name: amazonlinux-2
- name: debian-11
- name: debian-12
- name: fedora-latest
- name: oraclelinux-7
- name: oraclelinux-8
- name: rockylinux-8
- name: rockylinux-9
- name: ubuntu-20.04
- name: ubuntu-22.04
- name: ubuntu-24.04

suites:
- name: server_install_os
Expand All @@ -41,282 +35,215 @@ suites:
run_list:
- recipe[test::server_install_os]

- name: access_15
# PostgreSQL 17
- name: access_17
attributes:
test:
pg_ver: "15"
pg_ver: "17"
verifier:
inspec_tests:
- path: test/integration/access/
run_list:
- recipe[test::access]
- name: client_install_15
- name: client_install_17
attributes:
test:
pg_ver: "15"
pg_ver: "17"
verifier:
inspec_tests:
- path: test/integration/client_install/
inputs:
pg_ver: "15"
pg_ver: "17"
run_list:
- recipe[test::client_install]
- name: extension_15
- name: extension_17
attributes:
test:
pg_ver: "15"
pg_ver: "17"
verifier:
inspec_tests:
- path: test/integration/extension/
run_list:
- recipe[test::extension]
- name: ident_15
- name: ident_17
attributes:
test:
pg_ver: "15"
pg_ver: "17"
verifier:
inspec_tests:
- path: test/integration/ident/
run_list:
- recipe[test::ident]
- name: initdb_locale_15
- name: initdb_locale_17
attributes:
test:
pg_ver: "15"
pg_ver: "17"
verifier:
inspec_tests:
- path: test/integration/initdb_locale/
run_list:
- recipe[test::initdb_locale]
- name: repo_15
- name: repo_17
attributes:
test:
pg_ver: "15"
pg_ver: "17"
verifier:
inspec_tests:
- path: test/integration/repo/
inputs:
pg_ver: "15"
pg_ver: "17"
run_list:
- recipe[test::repository]
- name: server_install_15
- name: server_install_17
attributes:
test:
pg_ver: "15"
pg_ver: "17"
verifier:
inspec_tests:
- path: test/integration/server_install/
inputs:
pg_ver: "15"
pg_ver: "17"
run_list:
- recipe[test::server_install]

- name: access_14
# PostgreSQL 16
- name: access_16
attributes:
test:
pg_ver: "14"
pg_ver: "16"
verifier:
inspec_tests:
- path: test/integration/access/
run_list:
- recipe[test::access]
- name: client_install_14
- name: client_install_16
attributes:
test:
pg_ver: "14"
pg_ver: "16"
verifier:
inspec_tests:
- path: test/integration/client_install/
inputs:
pg_ver: "14"
pg_ver: "16"
run_list:
- recipe[test::client_install]
- name: extension_14
- name: extension_16
attributes:
test:
pg_ver: "14"
pg_ver: "16"
verifier:
inspec_tests:
- path: test/integration/extension/
run_list:
- recipe[test::extension]
- name: ident_14
- name: ident_16
attributes:
test:
pg_ver: "14"
pg_ver: "16"
verifier:
inspec_tests:
- path: test/integration/ident/
run_list:
- recipe[test::ident]
- name: initdb_locale_14
- name: initdb_locale_16
attributes:
test:
pg_ver: "14"
pg_ver: "16"
verifier:
inspec_tests:
- path: test/integration/initdb_locale/
run_list:
- recipe[test::initdb_locale]
- name: repo_14
- name: repo_16
attributes:
test:
pg_ver: "14"
pg_ver: "16"
verifier:
inspec_tests:
- path: test/integration/repo/
inputs:
pg_ver: "14"
pg_ver: "16"
run_list:
- recipe[test::repository]
- name: server_install_14
- name: server_install_16
attributes:
test:
pg_ver: "14"
pg_ver: "16"
verifier:
inspec_tests:
- path: test/integration/server_install/
inputs:
pg_ver: "14"
pg_ver: "16"
run_list:
- recipe[test::server_install]

- name: access_13
attributes:
test:
pg_ver: "13"
verifier:
inspec_tests:
- path: test/integration/access/
run_list:
- recipe[test::access]
- name: client_install_13
attributes:
test:
pg_ver: "13"
verifier:
inspec_tests:
- path: test/integration/client_install/
inputs:
pg_ver: "13"
run_list:
- recipe[test::client_install]
- name: extension_13
attributes:
test:
pg_ver: "13"
verifier:
inspec_tests:
- path: test/integration/extension/
run_list:
- recipe[test::extension]
- name: ident_13
attributes:
test:
pg_ver: "13"
verifier:
inspec_tests:
- path: test/integration/ident/
run_list:
- recipe[test::ident]
- name: initdb_locale_13
attributes:
test:
pg_ver: "13"
verifier:
inspec_tests:
- path: test/integration/initdb_locale/
run_list:
- recipe[test::initdb_locale]
- name: repo_13
attributes:
test:
pg_ver: "13"
verifier:
inspec_tests:
- path: test/integration/repo/
inputs:
pg_ver: "13"
run_list:
- recipe[test::repository]
- name: server_install_13
attributes:
test:
pg_ver: "13"
verifier:
inspec_tests:
- path: test/integration/server_install/
inputs:
pg_ver: "13"
run_list:
- recipe[test::server_install]

- name: access_12
# PostgreSQL 15
- name: access_15
attributes:
test:
pg_ver: "12"
pg_ver: "15"
verifier:
inspec_tests:
- path: test/integration/access/
run_list:
- recipe[test::access]
- name: client_install_12
- name: client_install_15
attributes:
test:
pg_ver: "12"
pg_ver: "15"
verifier:
inspec_tests:
- path: test/integration/client_install/
inputs:
pg_ver: "12"
pg_ver: "15"
run_list:
- recipe[test::client_install]
- name: extension_12
- name: extension_15
attributes:
test:
pg_ver: "12"
pg_ver: "15"
verifier:
inspec_tests:
- path: test/integration/extension/
run_list:
- recipe[test::extension]
- name: ident_12
- name: ident_15
attributes:
test:
pg_ver: "12"
pg_ver: "15"
verifier:
inspec_tests:
- path: test/integration/ident/
run_list:
- recipe[test::ident]
- name: initdb_locale_12
- name: initdb_locale_15
attributes:
test:
pg_ver: "12"
pg_ver: "15"
verifier:
inspec_tests:
- path: test/integration/initdb_locale/
run_list:
- recipe[test::initdb_locale]
- name: repo_12
- name: repo_15
attributes:
test:
pg_ver: "12"
pg_ver: "15"
verifier:
inspec_tests:
- path: test/integration/repo/
inputs:
pg_ver: "12"
pg_ver: "15"
run_list:
- recipe[test::repository]
- name: server_install_12
- name: server_install_15
attributes:
test:
pg_ver: "12"
pg_ver: "15"
verifier:
inspec_tests:
- path: test/integration/server_install/
inputs:
pg_ver: "12"
pg_ver: "15"
run_list:
- recipe[test::server_install]
4 changes: 2 additions & 2 deletions libraries/helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,12 @@ def default_server_packages(version: nil, source: :os)
case node['platform_family']
when 'rhel', 'fedora', 'amazon'
{
os: %w(postgresql-contrib postgresql-server),
os: %w(libpq postgresql-contrib postgresql-server),
repo: %W(postgresql#{version.delete('.')}-contrib postgresql#{version.delete('.')}-server),
}.fetch(source, nil)
when 'debian'
{
os: %w(postgresql postgresql-common),
os: %w(libpq5 postgresql postgresql-common),
repo: %W(postgresql-#{version} postgresql-common),
}.fetch(source, nil)
end
Expand Down
Loading

0 comments on commit 44083d3

Please sign in to comment.