From 08190892444e35714876e0b5d2a0abf7b49c44be Mon Sep 17 00:00:00 2001 From: Gabe Cook Date: Fri, 20 Oct 2023 00:12:17 -0500 Subject: [PATCH] test(restore): Add test for command when remote gzip is disabled --- internal/actions/restore/restore_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/internal/actions/restore/restore_test.go b/internal/actions/restore/restore_test.go index 542174a3..19e33064 100644 --- a/internal/actions/restore/restore_test.go +++ b/internal/actions/restore/restore_test.go @@ -50,6 +50,14 @@ func Test_buildCommand(t *testing.T) { }, command.NewBuilder("gunzip", "--force", command.Pipe, pgpassword, "psql", "--host=1.1.1.1", "--username=u", "--dbname=d"), }, + { + "postgres-remote-gzip-disabled", + args{ + config.Restore{Global: config.Global{Dialect: dialect.Postgres{}, Host: "1.1.1.1", Database: "d", Username: "u"}}, + sqlformat.Gzip, + }, + command.NewBuilder(command.Env{Key: "PGPASSWORD", Value: ""}, "psql", "--host=1.1.1.1", "--username=u", "--dbname=d"), + }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) {