From 2d4b6227b479b974d55756e58eaf07b4fddaf6b3 Mon Sep 17 00:00:00 2001 From: Shaun Davis Date: Tue, 25 Jun 2024 11:53:38 -0500 Subject: [PATCH] fix test --- internal/flypg/pg_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/flypg/pg_test.go b/internal/flypg/pg_test.go index ed5c720a..0bc8c76f 100644 --- a/internal/flypg/pg_test.go +++ b/internal/flypg/pg_test.go @@ -117,6 +117,7 @@ func TestPGConfigInitialization(t *testing.T) { t.Run("cloud-archiving", func(t *testing.T) { t.Setenv("CLOUD_ARCHIVING_ENABLED", "true") t.Setenv("AWS_ACCESS_KEY_ID", "my-key") + t.Setenv("AWS_ENDPOINT_URL", "https://fly.storage.tigris.dev") t.Setenv("AWS_SECRET_ACCESS_KEY", "my-secret") t.Setenv("AWS_BUCKET_NAME", "my-bucket") @@ -135,7 +136,8 @@ func TestPGConfigInitialization(t *testing.T) { t.Fatalf("expected archive_mode to be on, got %v", cfg["archive_mode"]) } - expected := fmt.Sprintf("'barman-cloud-wal-archive --cloud-provider aws-s3 --endpoint-url https://fly.storage.tigris.dev s3://%s %s %%p'", + expected := fmt.Sprintf("'barman-cloud-wal-archive --cloud-provider aws-s3 --endpoint-url %s s3://%s %s %%p'", + os.Getenv("AWS_ENDPOINT_URL"), os.Getenv("AWS_BUCKET_NAME"), pgConf.AppName)