Repository navigation
test: run full tests that are sometimes short-circuited - #6693
Merged
Merged
Conversation
|
Download the artifacts for this pull request:
See Testing a PR. |
rfay
force-pushed
the
20241105_run_more_tests
branch
from
November 6, 2024 00:51
d10e171 to
7253c29
Compare
stasadev
added a commit
to stasadev/ddev
that referenced
this pull request
Oct 7, 2026
…hand ## Short Summary (TL;DR) The all-project-types job is the only CI job that runs tests with `GOTEST_SHORT` unset, and it ran a hand-kept list that had fallen behind, so 16 tests that skip or shrink under `GOTEST_SHORT` never ran in full anywhere. The list is now generated from the tests themselves, so it can't fall behind again. ## The Issue Found while working on ddev#7904, which changes `TestDebugRebuildCmd`: CI logs show `--- SKIP: TestDebugRebuildCmd` in every job, because Buildkite and `test-reusable.yml` set `GOTEST_SHORT=16` and apache-fpm sets `5`. The list came from ddev#6693 and broke in three ways: - ddev#7027 renamed `TestComposerCreateCmd` to `TestComposerCreateProjectCmd`, so that entry has matched nothing since. - ddev#8028 added `GOTEST_SHORT` skips to `TestDebugRebuildCmd`, `TestDdevImportDB`, `TestDdevRestoreSnapshot`, `TestProcessHooks`, and `TestWebserverMariaMySQLDBClient`, and later PRs did the same for `TestEphemeralPortsReusedOnRestart` (ddev#7992), `TestRouterPortSubstitutionPersistsAcrossProjects` (ddev#8653), `TestSnapshotUncompressed` (ddev#8704), `TestDebugDeleteVolumeCmd` (ddev#8756), and `TestDdevExportDB` (ddev#8798), none of them updating the list. - `TestComposerVersionConfig`, `TestHttpsRedirection`, `TestMysqlCommand`, `TestDdevStartMultipleHostnames`, and `TestProjectAutocompletionForExecCmd` already did less under `GOTEST_SHORT` when ddev#6693 wrote the list, and weren't on it. ## How This PR Solves The Issue Tests use three `testcommon` helpers instead of reading `GOTEST_SHORT`: `SkipIfGotestShort(t)`, `IsGotestShort(t)`, and `UsesAllTestSites(t)`, a marker for tests that loop over every test site. `.github/workflows/all-project-types-tests.sh` finds the tests that call them and prints the `-run` pattern, and fails if a test other than `TestMain` reads `GOTEST_SHORT` itself. The pattern is anchored, so prefix matches such as every `TestCmdStart*` test or `TestAutocompleteServiceForServiceFlag` no longer ride along; like `TestAppdirAlreadyInUse` and `TestConfigValidate`, which also leave the list, they don't depend on `GOTEST_SHORT` and run in every job. The `GOTEST_SHORT` branches that ddev#8028 made unreachable in `TestComposerCreateProjectCmd` and `TestDdevAllDatabases` are removed. ## Manual Testing Instructions ```bash .github/workflows/all-project-types-tests.sh # Expect ^(TestAutocompletionForDescribeCmd|...|TestWriteDrushConfig)\b with the 42 tests below ``` Adding `if os.Getenv("GOTEST_SHORT") != "" { t.Skip() }` to any test makes the script print that file and line and exit non-zero. ## Automated Testing Overview In the all-project-types job, the "Compute TESTARGS" step of `prepare-testargs` should print a `-run '^(...)\b'` pattern with exactly these 42 tests, and the test log should show each of them running, none skipped because of `GOTEST_SHORT`: ```text TestAutocompletionForDescribeCmd TestAutocompletionForStartCmd TestAutocompletionForStopCmd TestAvailableUpdates TestCmdDescribe TestCmdDescribeAppFunction TestCmdDescribeAppUsingSitename TestCmdList TestCmdStart TestCmdStop TestComposerCreateProjectCmd TestComposerVersionConfig TestConfigDatabaseVersion TestDdevAllDatabases TestDdevExportDB TestDdevFullSiteSetup TestDdevImportDB TestDdevImportFiles TestDdevImportFilesCustomUploadDir TestDdevImportFilesDir TestDdevRestoreSnapshot TestDdevStartMultipleHostnames TestDdevUploadDirNoPackage TestDdevXdebugEnabled TestDdevXhprofPrependEnabled TestDdevXhprofXhguiEnabled TestDebugDeleteVolumeCmd TestDebugRebuildCmd TestEphemeralPortsReusedOnRestart TestGetApps TestGetAppsEmpty TestHardenedStart TestHttpsRedirection TestMysqlCommand TestPHPConfig TestPHPWebserverType TestProcessHooks TestProjectAutocompletionForExecCmd TestRouterPortSubstitutionPersistsAcrossProjects TestSnapshotUncompressed TestWebserverMariaMySQLDBClient TestWriteDrushConfig ``` Some of the 16 tests that never ran in full may fail after being skipped this long; this PR's run is where that should show up. 🤖 Developed with assistance from [Claude Code](https://claude.ai/code) Co-Authored-By: Claude Opus 5.5 <[email protected]>
stasadev
added a commit
to stasadev/ddev
that referenced
this pull request
Oct 8, 2026
…hand ## Short Summary (TL;DR) The all-project-types job is the only CI job that runs tests with `GOTEST_SHORT` unset, and it ran a hand-kept list that had fallen behind, so 16 tests that skip or shrink under `GOTEST_SHORT` never ran in full anywhere. The list is now generated from the tests themselves, so it can't fall behind again. ## The Issue Found while working on ddev#7904, which changes `TestDebugRebuildCmd`: CI logs show `--- SKIP: TestDebugRebuildCmd` in every job, because Buildkite and `test-reusable.yml` set `GOTEST_SHORT=16` and apache-fpm sets `5`. The list came from ddev#6693 and broke in three ways: - ddev#7027 renamed `TestComposerCreateCmd` to `TestComposerCreateProjectCmd`, so that entry has matched nothing since. - ddev#8028 added `GOTEST_SHORT` skips to `TestDebugRebuildCmd`, `TestDdevImportDB`, `TestDdevRestoreSnapshot`, `TestProcessHooks`, and `TestWebserverMariaMySQLDBClient`, and later PRs did the same for `TestEphemeralPortsReusedOnRestart` (ddev#7992), `TestRouterPortSubstitutionPersistsAcrossProjects` (ddev#8653), `TestSnapshotUncompressed` (ddev#8704), `TestDebugDeleteVolumeCmd` (ddev#8756), and `TestDdevExportDB` (ddev#8798), none of them updating the list. - `TestComposerVersionConfig`, `TestHttpsRedirection`, `TestMysqlCommand`, `TestDdevStartMultipleHostnames`, and `TestProjectAutocompletionForExecCmd` already did less under `GOTEST_SHORT` when ddev#6693 wrote the list, and weren't on it. ## How This PR Solves The Issue Tests use three `testcommon` helpers instead of reading `GOTEST_SHORT`: `SkipIfGotestShort(t)`, `IsGotestShort(t)`, and `UsesAllTestSites(t)`, a marker for tests that loop over every test site. `.github/workflows/all-project-types-tests.sh` finds the tests that call them and prints the `-run` pattern, and fails if a test other than `TestMain` reads `GOTEST_SHORT` itself. The pattern is anchored, so prefix matches such as every `TestCmdStart*` test or `TestAutocompleteServiceForServiceFlag` no longer ride along; like `TestAppdirAlreadyInUse` and `TestConfigValidate`, which also leave the list, they don't depend on `GOTEST_SHORT` and run in every job. The `GOTEST_SHORT` branches that ddev#8028 made unreachable in `TestComposerCreateProjectCmd` and `TestDdevAllDatabases` are removed. ## Manual Testing Instructions ```bash .github/workflows/all-project-types-tests.sh # Expect ^(TestAutocompletionForDescribeCmd|...|TestWriteDrushConfig)\b with the 42 tests below ``` Adding `if os.Getenv("GOTEST_SHORT") != "" { t.Skip() }` to any test makes the script print that file and line and exit non-zero. ## Automated Testing Overview In the all-project-types job, the "Compute TESTARGS" step of `prepare-testargs` should print a `-run '^(...)\b'` pattern with exactly these 42 tests, and the test log should show each of them running, none skipped because of `GOTEST_SHORT`: ```text TestAutocompletionForDescribeCmd TestAutocompletionForStartCmd TestAutocompletionForStopCmd TestAvailableUpdates TestCmdDescribe TestCmdDescribeAppFunction TestCmdDescribeAppUsingSitename TestCmdList TestCmdStart TestCmdStop TestComposerCreateProjectCmd TestComposerVersionConfig TestConfigDatabaseVersion TestDdevAllDatabases TestDdevExportDB TestDdevFullSiteSetup TestDdevImportDB TestDdevImportFiles TestDdevImportFilesCustomUploadDir TestDdevImportFilesDir TestDdevRestoreSnapshot TestDdevStartMultipleHostnames TestDdevUploadDirNoPackage TestDdevXdebugEnabled TestDdevXhprofPrependEnabled TestDdevXhprofXhguiEnabled TestDebugDeleteVolumeCmd TestDebugRebuildCmd TestEphemeralPortsReusedOnRestart TestGetApps TestGetAppsEmpty TestHardenedStart TestHttpsRedirection TestMysqlCommand TestPHPConfig TestPHPWebserverType TestProcessHooks TestProjectAutocompletionForExecCmd TestRouterPortSubstitutionPersistsAcrossProjects TestSnapshotUncompressed TestWebserverMariaMySQLDBClient TestWriteDrushConfig ``` Some of the 16 tests that never ran in full may fail after being skipped this long; this PR's run is where that should show up. 🤖 Developed with assistance from [Claude Code](https://claude.ai/code) Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Issue
In studying the test run and coverage for
I was a little suspicious that not all PHP versions had been tested.
Sure enough, we have a number of costly tests that only run the full set of possibilities when GOTEST_SHORT is empty.
So the only test that would have tried all my PHP versions was TestPHPConfig, and it was short-circuited in all our tests.
We only run the most costly tests without short circuits in GitHub tests.yml
pull-push-test-platforms, so the tests that are like this have to be explicitly mentioned there.Then I discovered that the logic in some tests (most importantly TestPHPConfig) was incorrect, so when GOTEST_SHORT="" it wasn't running any of the PHP versions.
How This PR Solves The Issue