From 70e84fb997e313a4210d524023aee04263e0c15b Mon Sep 17 00:00:00 2001 From: Brandon Williams Date: Wed, 4 Sep 2024 10:38:13 -0500 Subject: [PATCH] fix: Lagoon integration automated tests A recent lagoon-cli release enabled strict host key checking for ssh by default https://github.com/uselagoon/lagoon-cli/pull/370 --- pkg/ddevapp/providerLagoon_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/ddevapp/providerLagoon_test.go b/pkg/ddevapp/providerLagoon_test.go index 38fcf0b0a54..28c139c8afe 100644 --- a/pkg/ddevapp/providerLagoon_test.go +++ b/pkg/ddevapp/providerLagoon_test.go @@ -189,7 +189,7 @@ func TestLagoonPush(t *testing.T) { require.NoError(t, err) // Test that the database row was added - c := fmt.Sprintf(`echo 'SELECT title FROM %s WHERE title="%s";' | lagoon ssh -p %s -e %s -C 'mysql --host=$MARIADB_HOST --user=$MARIADB_USERNAME --password=$MARIADB_PASSWORD --database=$MARIADB_DATABASE'`, t.Name(), tval, lagoonProjectName, lagoonPushTestSiteEnvironment) + c := fmt.Sprintf(`echo 'SELECT title FROM %s WHERE title="%s";' | lagoon ssh --strict-host-key-checking no -p %s -e %s -C 'mysql --host=$MARIADB_HOST --user=$MARIADB_USERNAME --password=$MARIADB_PASSWORD --database=$MARIADB_DATABASE'`, t.Name(), tval, lagoonProjectName, lagoonPushTestSiteEnvironment) //t.Logf("attempting command '%s'", c) out, _, err := app.Exec(&ddevapp.ExecOpts{ Cmd: c, @@ -199,7 +199,7 @@ func TestLagoonPush(t *testing.T) { // Test that the file arrived there out, _, err = app.Exec(&ddevapp.ExecOpts{ - Cmd: fmt.Sprintf(`lagoon ssh -p %s -e %s -C 'ls -l /app/web/sites/default/files/%s'`, lagoonProjectName, lagoonPushTestSiteEnvironment, fName), + Cmd: fmt.Sprintf(`lagoon ssh --strict-host-key-checking no -p %s -e %s -C 'ls -l /app/web/sites/default/files/%s'`, lagoonProjectName, lagoonPushTestSiteEnvironment, fName), }) assert.NoError(err) assert.Contains(out, tval)