Skip to content

Commit 3578d6e

Browse files
authored
Add support for Postgres 18 and update default version (#162)
1 parent 0c7d03d commit 3578d6e

4 files changed

Lines changed: 7 additions & 6 deletions

File tree

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,9 @@ This library aims to require as little configuration as possible, favouring over
4141
| Username | postgres |
4242
| Password | postgres |
4343
| Database | postgres |
44-
| Version | 15.3.0 |
44+
| Version | 18.0.0 |
4545
| Encoding | UTF8 |
4646
| Locale | C |
47-
| Version | 15.3.0 |
4847
| CachePath | $USER_HOME/.embedded-postgres-go/ |
4948
| RuntimePath | $USER_HOME/.embedded-postgres-go/extracted |
5049
| DataPath | $USER_HOME/.embedded-postgres-go/extracted/data |

config.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ type Config struct {
3636
// StartTimeout: 15 Seconds
3737
func DefaultConfig() Config {
3838
return Config{
39-
version: V17,
39+
version: V18,
4040
port: 5432,
4141
database: "postgres",
4242
username: "postgres",
@@ -153,6 +153,7 @@ type PostgresVersion string
153153

154154
// Predefined supported Postgres versions.
155155
const (
156+
V18 = PostgresVersion("18.0.0")
156157
V17 = PostgresVersion("17.5.0")
157158
V16 = PostgresVersion("16.9.0")
158159
V15 = PostgresVersion("15.13.0")

platform-test/platform_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import (
1414

1515
func Test_AllMajorVersions(t *testing.T) {
1616
allVersions := []embeddedpostgres.PostgresVersion{
17+
embeddedpostgres.V18,
1718
embeddedpostgres.V17,
1819
embeddedpostgres.V16,
1920
embeddedpostgres.V15,

version_strategy_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ func Test_DefaultVersionStrategy_Linux_ARM32V6(t *testing.T) {
105105

106106
assert.Equal(t, "linux", operatingSystem)
107107
assert.Equal(t, "arm32v6", architecture)
108-
assert.Equal(t, V17, postgresVersion)
108+
assert.Equal(t, V18, postgresVersion)
109109
}
110110

111111
func Test_DefaultVersionStrategy_Linux_ARM32V7(t *testing.T) {
@@ -121,7 +121,7 @@ func Test_DefaultVersionStrategy_Linux_ARM32V7(t *testing.T) {
121121

122122
assert.Equal(t, "linux", operatingSystem)
123123
assert.Equal(t, "arm32v7", architecture)
124-
assert.Equal(t, V17, postgresVersion)
124+
assert.Equal(t, V18, postgresVersion)
125125
}
126126

127127
func Test_DefaultVersionStrategy_Linux_Alpine(t *testing.T) {
@@ -139,7 +139,7 @@ func Test_DefaultVersionStrategy_Linux_Alpine(t *testing.T) {
139139

140140
assert.Equal(t, "linux", operatingSystem)
141141
assert.Equal(t, "amd64-alpine", architecture)
142-
assert.Equal(t, V17, postgresVersion)
142+
assert.Equal(t, V18, postgresVersion)
143143
}
144144

145145
func Test_DefaultVersionStrategy_shouldUseAlpineLinuxBuild(t *testing.T) {

0 commit comments

Comments
 (0)