From dffe996fd1ce66b96d16cd300d0163c5c9736429 Mon Sep 17 00:00:00 2001 From: bstrausser Date: Fri, 26 Apr 2024 11:58:29 -0400 Subject: [PATCH] Few formatting fix --- modules/postgres/postgres.go | 6 ++---- modules/postgres/postgres_test.go | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/modules/postgres/postgres.go b/modules/postgres/postgres.go index f5a5d68a0e..01bd14e0e2 100644 --- a/modules/postgres/postgres.go +++ b/modules/postgres/postgres.go @@ -22,10 +22,8 @@ const ( defaultSnapshotName = "migrated_template" ) -var ( - //go:embed resources/customEntrypoint.sh - embeddedCustomEntrypoint string -) +//go:embed resources/customEntrypoint.sh +var embeddedCustomEntrypoint string // PostgresContainer represents the postgres container type used in the module type PostgresContainer struct { diff --git a/modules/postgres/postgres_test.go b/modules/postgres/postgres_test.go index 2c70dde678..29e123b5f6 100644 --- a/modules/postgres/postgres_test.go +++ b/modules/postgres/postgres_test.go @@ -33,7 +33,7 @@ func createSSLCerts(t *testing.T) (*tlscert.Certificate, *tlscert.Certificate, e tmpDir := t.TempDir() certsDir := tmpDir + "/certs" - if err := os.MkdirAll(certsDir, 0755); err != nil { + if err := os.MkdirAll(certsDir, 0o755); err != nil { t.Fatal(err) } @@ -48,7 +48,6 @@ func createSSLCerts(t *testing.T) (*tlscert.Certificate, *tlscert.Certificate, e }) if caCert == nil { - return caCert, nil, errors.New("Unable to create CA Authority") } @@ -278,7 +277,6 @@ func TestWithSSL(t *testing.T) { } func TestSSLValidatesKeyMaterialPath(t *testing.T) { - ctx := context.Background() sslSettings := postgres.SSLSettings{} @@ -295,8 +293,8 @@ func TestSSLValidatesKeyMaterialPath(t *testing.T) { if err == nil { t.Fatal(err) } - } + func TestWithInitScript(t *testing.T) { ctx := context.Background()