Repository: chef/automate
Pull request #6491 (2021-12-30 11:24:04)

Upgrading postgres client library to postgresql13-client
Signed-off-by: Vivek Shankar <vshankar@progress.com>

### :nut_and_bolt: Description: What code changed, and why?

Due to issues with Backup failure on postgresql13 version we needed the client library to be upgraded in automate

<!-- /!\ Please ensure that you are NOT disclosing any customer information without their consent /!\ -->

### :chains: Related Resources

#6490 6490

### :+1: Definition of Done

### :athletic_shoe: How to Build and Test the Change

### :white_check_mark: Checklist

**All PRs** must tick these:

- [ ] I have read the [CONTRIBUTING document](https://github.com/chef/automate/blob/master/CONTRIBUTING.md).
- [ ] All commits signed-off for the [Developer Certification of Origin](https://github.com/chef/chef/blob/master/CONTRIBUTING.md#developer-certification-of-origin-dco).

With occasional exceptions, all PRs **from Progress employees** must tick these:

- [ ] Is the code clear? *(complicated code or lots of comments--subdivide and use well-named methods, meaningful variable names, etc.)*
- [ ] Consistency checked? *(user notifications, user prompts, visual patterns, code patterns, variable names)*
- [ ] Repeated code blocks eliminated? *(adapt and reuse existing components, blocks, functions, etc.)*
- [ ] Spelling, grammar, typos checked? *(at a minimum use `make spell` in any component directory)*
- [ ] Code well-formatted? *(indents, line breaks, etc. improve rather than hinder readability)*

All PRs **from Progress employees** should tick these if appropriate:

- [ ] Tests added/updated? (all new code needs new tests)
- [ ] Docs added/updated? (all customer-facing changes)

*Please add a note next to any checkbox above if you are NOT ticking it.*

### :camera: Screenshots, if applicable


netlify[bot]: 👷 Deploy Preview for *chef-automate* processing.


🔨 Explore the source changes: f57ed96394a2889803f11bd4d5ce78266c7582ef

🔍 Inspect the deploy log: [https://app.netlify.com/sites/chef-automate/deploys/61cd96d6ccae050008bff009](https://app.netlify.com/sites/chef-automate/deploys/61cd96d6ccae050008bff009)

sonarcloud[bot]: SonarCloud Quality Gate failed.&nbsp; &nbsp; ![Quality Gate failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/failed-16px.png 'Quality Gate failed')

[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=chef_automate&pullRequest=6491&resolved=false&types=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=chef_automate&pullRequest=6491&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=chef_automate&pullRequest=6491&resolved=false&types=BUG)  
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=chef_automate&pullRequest=6491&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=chef_automate&pullRequest=6491&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=chef_automate&pullRequest=6491&resolved=false&types=VULNERABILITY)  
[![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=chef_automate&pullRequest=6491&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=chef_automate&pullRequest=6491&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=chef_automate&pullRequest=6491&resolved=false&types=SECURITY_HOTSPOT)  
[![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=chef_automate&pullRequest=6491&resolved=false&types=CODE_SMELL) [![B](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/B-16px.png 'B')](https://sonarcloud.io/project/issues?id=chef_automate&pullRequest=6491&resolved=false&types=CODE_SMELL) [1 Code Smell](https://sonarcloud.io/project/issues?id=chef_automate&pullRequest=6491&resolved=false&types=CODE_SMELL)

[![No Coverage information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo-16px.png 'No Coverage information')](https://sonarcloud.io/component_measures?id=chef_automate&pullRequest=6491&metric=coverage&view=list) No Coverage information  
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=chef_automate&pullRequest=6491&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=chef_automate&pullRequest=6491&metric=new_duplicated_lines_density&view=list)


sonarcloud[bot]: SonarCloud Quality Gate failed.&nbsp; &nbsp; ![Quality Gate failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/failed-16px.png 'Quality Gate failed')

[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=chef_automate&pullRequest=6491&resolved=false&types=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=chef_automate&pullRequest=6491&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=chef_automate&pullRequest=6491&resolved=false&types=BUG)  
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=chef_automate&pullRequest=6491&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=chef_automate&pullRequest=6491&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=chef_automate&pullRequest=6491&resolved=false&types=VULNERABILITY)  
[![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=chef_automate&pullRequest=6491&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=chef_automate&pullRequest=6491&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=chef_automate&pullRequest=6491&resolved=false&types=SECURITY_HOTSPOT)  
[![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=chef_automate&pullRequest=6491&resolved=false&types=CODE_SMELL) [![B](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/B-16px.png 'B')](https://sonarcloud.io/project/issues?id=chef_automate&pullRequest=6491&resolved=false&types=CODE_SMELL) [2 Code Smells](https://sonarcloud.io/project/issues?id=chef_automate&pullRequest=6491&resolved=false&types=CODE_SMELL)

[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/0-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=chef_automate&pullRequest=6491&metric=new_coverage&view=list) [0.0% Coverage](https://sonarcloud.io/component_measures?id=chef_automate&pullRequest=6491&metric=new_coverage&view=list)  
[![40.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/20plus-16px.png '40.0%')](https://sonarcloud.io/component_measures?id=chef_automate&pullRequest=6491&metric=new_duplicated_lines_density&view=list) [40.0% Duplication](https://sonarcloud.io/component_measures?id=chef_automate&pullRequest=6491&metric=new_duplicated_lines_density&view=list)


sonarcloud[bot]: SonarCloud Quality Gate failed.&nbsp; &nbsp; ![Quality Gate failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/failed-16px.png 'Quality Gate failed')

[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=chef_automate&pullRequest=6491&resolved=false&types=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=chef_automate&pullRequest=6491&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=chef_automate&pullRequest=6491&resolved=false&types=BUG)  
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=chef_automate&pullRequest=6491&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=chef_automate&pullRequest=6491&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=chef_automate&pullRequest=6491&resolved=false&types=VULNERABILITY)  
[![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=chef_automate&pullRequest=6491&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=chef_automate&pullRequest=6491&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=chef_automate&pullRequest=6491&resolved=false&types=SECURITY_HOTSPOT)  
[![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=chef_automate&pullRequest=6491&resolved=false&types=CODE_SMELL) [![C](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/C-16px.png 'C')](https://sonarcloud.io/project/issues?id=chef_automate&pullRequest=6491&resolved=false&types=CODE_SMELL) [6 Code Smells](https://sonarcloud.io/project/issues?id=chef_automate&pullRequest=6491&resolved=false&types=CODE_SMELL)

[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/0-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=chef_automate&pullRequest=6491&metric=new_coverage&view=list) [0.0% Coverage](https://sonarcloud.io/component_measures?id=chef_automate&pullRequest=6491&metric=new_coverage&view=list)  
[![35.3%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/20plus-16px.png '35.3%')](https://sonarcloud.io/component_measures?id=chef_automate&pullRequest=6491&metric=new_duplicated_lines_density&view=list) [35.3% Duplication](https://sonarcloud.io/component_measures?id=chef_automate&pullRequest=6491&metric=new_duplicated_lines_density&view=list)


sonarcloud[bot]: Kudos, SonarCloud Quality Gate passed!&nbsp; &nbsp; ![Quality Gate passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png 'Quality Gate passed')

[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=chef_automate&pullRequest=6491&resolved=false&types=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=chef_automate&pullRequest=6491&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=chef_automate&pullRequest=6491&resolved=false&types=BUG)  
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=chef_automate&pullRequest=6491&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=chef_automate&pullRequest=6491&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=chef_automate&pullRequest=6491&resolved=false&types=VULNERABILITY)  
[![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=chef_automate&pullRequest=6491&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=chef_automate&pullRequest=6491&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=chef_automate&pullRequest=6491&resolved=false&types=SECURITY_HOTSPOT)  
[![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=chef_automate&pullRequest=6491&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=chef_automate&pullRequest=6491&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=chef_automate&pullRequest=6491&resolved=false&types=CODE_SMELL)

[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/0-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=chef_automate&pullRequest=6491&metric=new_coverage&view=list) [0.0% Coverage](https://sonarcloud.io/component_measures?id=chef_automate&pullRequest=6491&metric=new_coverage&view=list)  
[![35.3%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/20plus-16px.png '35.3%')](https://sonarcloud.io/component_measures?id=chef_automate&pullRequest=6491&metric=new_duplicated_lines_density&view=list) [35.3% Duplication](https://sonarcloud.io/component_measures?id=chef_automate&pullRequest=6491&metric=new_duplicated_lines_density&view=list)



Patch:
diff --git a/components/automate-deployment/habitat/plan.sh b/components/automate-deployment/habitat/plan.sh
index c151eb394..8b07bb164 100644
--- a/components/automate-deployment/habitat/plan.sh
+++ b/components/automate-deployment/habitat/plan.sh
@@ -30,7 +30,7 @@ pkg_deps=(
   chef/mlsa
   # deployment-service uses the postgres11 client to backup/restore postgres.
   # we need pg11 because the ha backend uses postgres 11
-  core/postgresql11-client
+  core/postgresql13-client
 )
 pkg_bin_dirs=(bin)
 pkg_exports=(
diff --git a/lib/platform/pg/exporter.go b/lib/platform/pg/exporter.go
index 5c3ec6b60..5e84c9e1c 100644
--- a/lib/platform/pg/exporter.go
+++ b/lib/platform/pg/exporter.go
@@ -18,21 +18,23 @@ import (
 	"github.com/chef/automate/lib/platform/command"
 )
 
+const Pg13Client = "core/postgresql13-client"
+
 var (
 	// DefaultPGDumpCmd is the command we will run for
 	// pg_dump.This package-level var is provided so a
 	// stub-command can be injected by the tests.
-	DefaultPGDumpCmd = []string{"hab", "pkg", "exec", "core/postgresql11-client", "pg_dump"}
+	DefaultPGDumpCmd = []string{"hab", "pkg", "exec", Pg13Client, "pg_dump"}
 
 	// PGRestoreCmd is the command we will run for
 	// pg_restore. This package-level var is provided so a
 	// stub-command can be injected by the tests.
-	DefaultPGRestoreCmd = []string{"hab", "pkg", "exec", "core/postgresql11-client", "pg_restore"}
+	DefaultPGRestoreCmd = []string{"hab", "pkg", "exec", Pg13Client, "pg_restore"}
 
 	// PSQLCmd is the command we will run for psql. This
 	// package-level var is provided so a stub-command can be
 	// injected by the tests.
-	DefaultPSQLCmd = []string{"hab", "pkg", "exec", "core/postgresql11-client", "psql"}
+	DefaultPSQLCmd = []string{"hab", "pkg", "exec", Pg13Client, "psql"}
 )
 
 func PGDumpCmd() []string {


Test patch:
diff --git a/lib/platform/pg/exporter_test.go b/lib/platform/pg/exporter_test.go
index 95b7f25f8..981d34004 100644
--- a/lib/platform/pg/exporter_test.go
+++ b/lib/platform/pg/exporter_test.go
@@ -101,7 +101,7 @@ func TestExport(t *testing.T) {
 	}
 
 	connURI := connURI("test_database")
-	stdArgs := []string{"pkg", "exec", "core/postgresql11-client", "pg_dump", "--if-exists", "--verbose", "--clean", "--file", "test_database.sql", "--no-privileges", "--no-owner", connURI}
+	stdArgs := []string{"pkg", "exec", pg.Pg13Client, "pg_dump", "--if-exists", "--verbose", "--clean", "--file", "test_database.sql", "--no-privileges", "--no-owner", connURI}
 
 	tests := []struct {
 		desc           string
@@ -114,16 +114,16 @@ func TestExport(t *testing.T) {
 	}{
 		{"it exports the db with pg_dump", "", []string{}, stdArgs, nil, false, false},
 		{"it runs pg_dump with the right --exclude-table options", "", []string{"table1", "table2"},
-			[]string{"pkg", "exec", "core/postgresql11-client", "pg_dump",
+			[]string{"pkg", "exec", pg.Pg13Client, "pg_dump",
 				"--if-exists", "--verbose", "--clean", "--file", "test_database.sql", "--no-privileges", "--no-owner",
 				"--exclude-table", "table1", "--exclude-table", "table2",
 				connURI},
 			nil, false, false},
 		{"it runs pg_dump without --no-privileges and --no-owner if User is set", "testuser", []string{},
-			[]string{"pkg", "exec", "core/postgresql11-client", "pg_dump", "--if-exists", "--verbose", "--clean", "--file", "test_database.sql", connURI},
+			[]string{"pkg", "exec", pg.Pg13Client, "pg_dump", "--if-exists", "--verbose", "--clean", "--file", "test_database.sql", connURI},
 			nil, false, false},
 		{"it runs pg_dump with -Fc when UseCustomFormat is set to true", "testuser", []string{},
-			[]string{"pkg", "exec", "core/postgresql11-client", "pg_dump", "--if-exists",
+			[]string{"pkg", "exec", pg.Pg13Client, "pg_dump", "--if-exists",
 				"--verbose", "--clean", "--file", "test_database.fc", "-Fc", connURI},
 			nil, false, true},
 		{"it returns an error in psql resturns an error", "", []string{}, stdArgs, errors.New("test-error"), true, false},
@@ -192,7 +192,7 @@ func TestImport(t *testing.T) {
 
 		mockExec.Expect("Run", command.ExpectedCommand{
 			Cmd: "hab",
-			Args: []string{"pkg", "exec", "core/postgresql11-client", "psql", "-f", exportFile,
+			Args: []string{"pkg", "exec", pg.Pg13Client, "psql", "-f", exportFile,
 				"-v", "ON_ERROR_STOP=true", connURI("test_database")},
 			Env: testExpectedEnv,
 		}).Return(nil)
@@ -212,7 +212,7 @@ func TestImport(t *testing.T) {
 
 		mockExec.Expect("Run", command.ExpectedCommand{
 			Cmd: "hab",
-			Args: []string{"pkg", "exec", "core/postgresql11-client", "psql", "-f", exportFile,
+			Args: []string{"pkg", "exec", pg.Pg13Client, "psql", "-f", exportFile,
 				connURI("test_database")},
 			Env: testExpectedEnv,
 		}).Return(nil)
@@ -233,7 +233,7 @@ func TestImport(t *testing.T) {
 
 		mockExec.Expect("Run", command.ExpectedCommand{
 			Cmd: "hab",
-			Args: []string{"pkg", "exec", "core/postgresql11-client", "psql", "-f", exportFile,
+			Args: []string{"pkg", "exec", pg.Pg13Client, "psql", "-f", exportFile,
 				"-v", "ON_ERROR_STOP=true", connURI("test_database")},
 			Env: testExpectedEnv,
 		}).Return(nil)
@@ -255,7 +255,7 @@ func TestImport(t *testing.T) {
 
 		mockExec.Expect("Run", command.ExpectedCommand{
 			Cmd: "hab",
-			Args: []string{"pkg", "exec", "core/postgresql11-client", "psql", "-f", exportFile,
+			Args: []string{"pkg", "exec", pg.Pg13Client, "psql", "-f", exportFile,
 				"-v", "ON_ERROR_STOP=true", connURI("test_database")},
 			Env: testExpectedEnv,
 		}).Return(nil)
@@ -273,7 +273,7 @@ func TestImport(t *testing.T) {
 
 		mockExec.Expect("Run", command.ExpectedCommand{
 			Cmd: "hab",
-			Args: []string{"pkg", "exec", "core/postgresql11-client", "psql", "-f", exportFile, "-v", "ON_ERROR_STOP=true",
+			Args: []string{"pkg", "exec", pg.Pg13Client, "psql", "-f", exportFile, "-v", "ON_ERROR_STOP=true",
 				connURI("test_database")},
 			Env: testExpectedEnv,
 		}).Return(nil)
@@ -290,7 +290,7 @@ func TestImport(t *testing.T) {
 
 		mockExec.Expect("Run", command.ExpectedCommand{
 			Cmd: "hab",
-			Args: []string{"pkg", "exec", "core/postgresql11-client", "psql", "-f", exportFile,
+			Args: []string{"pkg", "exec", pg.Pg13Client, "psql", "-f", exportFile,
 				"-v", "ON_ERROR_STOP=true", connURI("test_database")},
 			Env: testExpectedEnv,
 		}).Return(nil)
@@ -309,7 +309,7 @@ func TestImport(t *testing.T) {
 
 		mockExec.Expect("Run", command.ExpectedCommand{
 			Cmd: "hab",
-			Args: []string{"pkg", "exec", "core/postgresql11-client", "psql", "-f", exportFile,
+			Args: []string{"pkg", "exec", pg.Pg13Client, "psql", "-f", exportFile,
 				"-v", "ON_ERROR_STOP=true", connURI("test_database")},
 			Env: testExpectedEnv,
 		}).Return(nil)
@@ -328,7 +328,7 @@ func TestImport(t *testing.T) {
 
 		mockExec.Expect("Run", command.ExpectedCommand{
 			Cmd: "hab",
-			Args: []string{"pkg", "exec", "core/postgresql11-client", "psql", "-f", exportFile,
+			Args: []string{"pkg", "exec", pg.Pg13Client, "psql", "-f", exportFile,
 				"-v", "ON_ERROR_STOP=true", connURI("test_database")},
 			Env: testExpectedEnv,
 		}).Return(errors.New("test-error"))