-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: Fix TestAcquiaPush and TestLagoonPush, add mariadb-old clients, f…
- Loading branch information
Showing
5 changed files
with
34 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -75,6 +75,10 @@ func TestAcquiaPull(t *testing.T) { | |
require.NoError(t, err) | ||
// acli really wants the project to look like the target project | ||
app.Docroot = "docroot" | ||
app.Database = ddevapp.DatabaseDesc{ | ||
Type: nodeps.MySQL, | ||
Version: nodeps.MySQL57, | ||
} | ||
|
||
err = setupSSHKey(t, sshkey, filepath.Join(origDir, "testdata", t.Name())) | ||
require.NoError(t, err) | ||
|
@@ -116,9 +120,9 @@ func TestAcquiaPull(t *testing.T) { | |
require.NoError(t, err) | ||
|
||
assert.FileExists(filepath.Join(app.GetHostUploadDirFullPath(), "chocolate-brownie-umami.jpg")) | ||
out, err := exec.RunCommand("bash", []string{"-c", fmt.Sprintf(`echo 'select COUNT(*) from users_field_data where mail="[email protected]";' | %s mysql -N`, DdevBin)}) | ||
out, err := exec.RunCommand("bash", []string{"-c", fmt.Sprintf(`echo 'select COUNT(*) from users_field_data where mail="[email protected]";' | %s mysql -B --skip-column-names `, DdevBin)}) | ||
assert.NoError(err) | ||
assert.True(strings.HasPrefix(out, "1\n")) | ||
assert.True(strings.HasSuffix(out, "\n1\n"), "out is unexpected '%s'", out) | ||
} | ||
|
||
// TestAcquiaPush ensures we can push to acquia for a configured environment. | ||
|
@@ -164,6 +168,10 @@ func TestAcquiaPush(t *testing.T) { | |
require.NoError(t, err) | ||
// acli really wants the project to look like the target project | ||
app.Docroot = "docroot" | ||
app.Database = ddevapp.DatabaseDesc{ | ||
Type: nodeps.MySQL, | ||
Version: nodeps.MySQL57, | ||
} | ||
|
||
err = setupSSHKey(t, sshkey, filepath.Join(origDir, "testdata", t.Name())) | ||
require.NoError(t, err) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -84,6 +84,11 @@ func TestLagoonPull(t *testing.T) { | |
require.NoError(t, err) | ||
|
||
app.Docroot = "web" | ||
app.Database = ddevapp.DatabaseDesc{ | ||
Type: nodeps.MySQL, | ||
Version: nodeps.MySQL57, | ||
} | ||
|
||
err = app.WriteConfig() | ||
require.NoError(t, err) | ||
|
||
|
@@ -106,7 +111,7 @@ func TestLagoonPull(t *testing.T) { | |
assert.FileExists(filepath.Join(app.GetHostUploadDirFullPath(), "victoria-sponge-umami.jpg")) | ||
out, err := exec.RunHostCommand("bash", "-c", fmt.Sprintf(`echo 'select COUNT(*) from users_field_data where mail="[email protected]";' | %s mysql -N`, DdevBin)) | ||
assert.NoError(err) | ||
assert.True(strings.HasPrefix(out, "1\n")) | ||
assert.True(strings.HasSuffix(out, "\n1\n")) | ||
} | ||
|
||
// TestLagoonPush ensures we can push to lagoon for a configured environment. | ||
|
@@ -141,6 +146,10 @@ func TestLagoonPush(t *testing.T) { | |
_ = app.Stop(true, false) | ||
|
||
app.Docroot = "web" | ||
app.Database = ddevapp.DatabaseDesc{ | ||
Type: nodeps.MySQL, | ||
Version: nodeps.MySQL57, | ||
} | ||
|
||
err = app.WriteConfig() | ||
require.NoError(t, err) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters