From 3c0553510ec0e9051e9fed7fbe10001c285f67ca Mon Sep 17 00:00:00 2001 From: Felix Hoffmann <19827840+zzzFelix@users.noreply.github.com> Date: Wed, 28 Feb 2024 10:03:07 +0100 Subject: [PATCH 1/3] Add V16 constant (#129) --- README.md | 2 +- config.go | 3 ++- platform-test/platform_test.go | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a3c70c6..5fa28f8 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ This library aims to require as little configuration as possible, favouring over | Username | postgres | | Password | postgres | | Database | postgres | -| Version | 12.1.0 | +| Version | 15.3.0 | | CachePath | $USER_HOME/.embedded-postgres-go/ | | RuntimePath | $USER_HOME/.embedded-postgres-go/extracted | | DataPath | $USER_HOME/.embedded-postgres-go/extracted/data | diff --git a/config.go b/config.go index 8f73a33..3d96ebd 100644 --- a/config.go +++ b/config.go @@ -27,7 +27,7 @@ type Config struct { // DefaultConfig provides a default set of configuration to be used "as is" or modified using the provided builders. // The following can be assumed as defaults: -// Version: 14 +// Version: 15 // Port: 5432 // Database: postgres // Username: postgres @@ -146,6 +146,7 @@ type PostgresVersion string // Predefined supported Postgres versions. const ( + V16 = PostgresVersion("16.2.0") V15 = PostgresVersion("15.3.0") V14 = PostgresVersion("14.8.0") V13 = PostgresVersion("13.11.0") diff --git a/platform-test/platform_test.go b/platform-test/platform_test.go index 07b4b89..42addc0 100644 --- a/platform-test/platform_test.go +++ b/platform-test/platform_test.go @@ -14,6 +14,7 @@ import ( func Test_AllMajorVersions(t *testing.T) { allVersions := []embeddedpostgres.PostgresVersion{ + embeddedpostgres.V16, embeddedpostgres.V15, embeddedpostgres.V14, } From 0db55ea34dc3cfaa0488e1cd8d8dc11adef4ac95 Mon Sep 17 00:00:00 2001 From: Michael Brewer Date: Wed, 28 Feb 2024 01:08:10 -0800 Subject: [PATCH 2/3] fix(deps): upgrade postgres for 13 constant from `13.11` to `13.14.0` (#131) * fix(deps): upgrade postgres version for 13 to 13.12.0 Version 13.11 is vulnerable to CVE-2023-39417, which exists in versions >= 13.0, < 13.12. The vulnerability was found in the National Vulnerability Database (NVD) based on the CPE cpe:2.3:a:postgresql:postgresql with NVD severity: High. The file is associated with the technology PostgreSQL. The vulnerability can be remediated by updating PostgreSQL to 13.12 or higher. * fix(deps): bump postres to 13.14.0 The vulnerability was found in the National Vulnerability Database (NVD) based on the CPE cpe:2.3:a:postgresql:postgresql with NVD severity: High. The file is associated with the technology PostgreSQL. The vulnerability can be remediated by updating PostgreSQL to 13.14 or higher. --- config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.go b/config.go index 3d96ebd..ecca47a 100644 --- a/config.go +++ b/config.go @@ -149,7 +149,7 @@ const ( V16 = PostgresVersion("16.2.0") V15 = PostgresVersion("15.3.0") V14 = PostgresVersion("14.8.0") - V13 = PostgresVersion("13.11.0") + V13 = PostgresVersion("13.14.0") V12 = PostgresVersion("12.15.0") V11 = PostgresVersion("11.20.0") V10 = PostgresVersion("10.23.0") From 74c945b3a79c90b73d24989fe670b6a8fefaf11a Mon Sep 17 00:00:00 2001 From: Fergus Strange Date: Wed, 28 Feb 2024 21:23:27 +1100 Subject: [PATCH 3/3] Upgrade versions (#132) * Upgrade versions * Fix default version * Try rolling back v12 --------- Co-authored-by: ferguss --- config.go | 10 +++++----- version_strategy_test.go | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/config.go b/config.go index ecca47a..75d4f64 100644 --- a/config.go +++ b/config.go @@ -35,7 +35,7 @@ type Config struct { // StartTimeout: 15 Seconds func DefaultConfig() Config { return Config{ - version: V15, + version: V16, port: 5432, database: "postgres", username: "postgres", @@ -147,11 +147,11 @@ type PostgresVersion string // Predefined supported Postgres versions. const ( V16 = PostgresVersion("16.2.0") - V15 = PostgresVersion("15.3.0") - V14 = PostgresVersion("14.8.0") + V15 = PostgresVersion("15.6.0") + V14 = PostgresVersion("14.11.0") V13 = PostgresVersion("13.14.0") - V12 = PostgresVersion("12.15.0") - V11 = PostgresVersion("11.20.0") + V12 = PostgresVersion("12.17.0") + V11 = PostgresVersion("11.22.0") V10 = PostgresVersion("10.23.0") V9 = PostgresVersion("9.6.24") ) diff --git a/version_strategy_test.go b/version_strategy_test.go index e2c9527..49213b9 100644 --- a/version_strategy_test.go +++ b/version_strategy_test.go @@ -105,7 +105,7 @@ func Test_DefaultVersionStrategy_Linux_ARM32V6(t *testing.T) { assert.Equal(t, "linux", operatingSystem) assert.Equal(t, "arm32v6", architecture) - assert.Equal(t, V15, postgresVersion) + assert.Equal(t, V16, postgresVersion) } func Test_DefaultVersionStrategy_Linux_ARM32V7(t *testing.T) { @@ -121,7 +121,7 @@ func Test_DefaultVersionStrategy_Linux_ARM32V7(t *testing.T) { assert.Equal(t, "linux", operatingSystem) assert.Equal(t, "arm32v7", architecture) - assert.Equal(t, V15, postgresVersion) + assert.Equal(t, V16, postgresVersion) } func Test_DefaultVersionStrategy_Linux_Alpine(t *testing.T) { @@ -139,7 +139,7 @@ func Test_DefaultVersionStrategy_Linux_Alpine(t *testing.T) { assert.Equal(t, "linux", operatingSystem) assert.Equal(t, "amd64-alpine", architecture) - assert.Equal(t, V15, postgresVersion) + assert.Equal(t, V16, postgresVersion) } func Test_DefaultVersionStrategy_shouldUseAlpineLinuxBuild(t *testing.T) {