Skip to content

Commit

Permalink
test(restore): Add test for command when remote gzip is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
gabe565 committed Oct 20, 2023
1 parent 3b28811 commit 0819089
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions internal/actions/restore/restore_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 0819089

Please sign in to comment.