Skip to content

Commit

Permalink
fix: Lagoon integration automated tests
Browse files Browse the repository at this point in the history
A recent lagoon-cli release enabled strict host key checking for ssh by default uselagoon/lagoon-cli#370
  • Loading branch information
rocketeerbkw authored Sep 4, 2024
1 parent ccac0fb commit 70e84fb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/ddevapp/providerLagoon_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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)
Expand Down

0 comments on commit 70e84fb

Please sign in to comment.