Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Fix TestPantheonPush, broken due to php8.2 default #5874

Merged
merged 1 commit into from
Feb 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 7 additions & 6 deletions pkg/ddevapp/providerPantheon_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,8 @@ func TestPantheonPush(t *testing.T) {
err := globalconfig.WriteGlobalConfig(globalconfig.DdevGlobalConfig)
assert.NoError(err)

// Use a D9 codebase for Drush to work right
d9code := FullTestSites[8]
// Use a D10 codebase for Drush to work right
d9code := FullTestSites[12]
d9code.Name = t.Name()
err = globalconfig.RemoveProjectInfo(t.Name())
require.NoError(t, err)
Expand Down Expand Up @@ -175,7 +175,8 @@ func TestPantheonPush(t *testing.T) {
})

app.Name = t.Name()
app.Type = nodeps.AppTypeDrupal9
app.Type = nodeps.AppTypeDrupal10
app.PHPVersion = nodeps.PHP82
app.Hooks = map[string][]ddevapp.YAMLTask{"post-push": {{"exec-host": "touch hello-post-push-" + app.Name}}, "pre-push": {{"exec-host": "touch hello-pre-push-" + app.Name}}}
_ = app.Stop(true, false)

Expand Down Expand Up @@ -216,10 +217,10 @@ func TestPantheonPush(t *testing.T) {
require.NoError(t, err)

// Make sure we have Drush
_, _, err = app.Exec(&ddevapp.ExecOpts{
Cmd: "composer require --no-interaction drush/drush:* >/dev/null 2>/dev/null",
stdout, stderr, err := app.Exec(&ddevapp.ExecOpts{
Cmd: "composer require --no-interaction drush/drush >/dev/null 2>/dev/null",
})
require.NoError(t, err)
require.NoError(t, err, "failed to composer require drush err=%v stdout='%s', stderr='%s'", err, stdout, stderr)
err = app.MutagenSyncFlush()
assert.NoError(err)

Expand Down