generated from ddev/ddev-addon-template
-
-
Notifications
You must be signed in to change notification settings - Fork 0
chore: Remove generated Drupal code from test fixtures, fixes #11 #17
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
Merged
Conversation
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
Remove web/ directories from all test fixtures. These contain generated Drupal core and contributed modules that can be recreated via composer install when needed for testing. This reduces repository size significantly: - 123,949 files removed - ~744 MB of Drupal core source code removed - Fixtures now contain only essential config files: - composer.json/composer.lock (dependencies) - .upsun/config.yaml or .platform* files (platform configs) - config/sync/ (Drupal configuration) - drush/ (deployment scripts) - db.sql.gz (database fixtures) Tests can regenerate web/ directories on-demand with: composer install --no-dev --no-interaction Closes #11 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Document that web/ and vendor/ directories are no longer tracked in git, and explain how to regenerate fixtures when needed with composer install. This clarifies the new workflow after removing 123,949 generated files from the repository. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
After removing web/ and vendor/ from git tracking, tests need to run 'ddev composer install' to generate these directories from composer.lock. This installs: - vendor/bin/drush - Required for drush commands in tests - web/core/ - Drupal core files needed for site to function Without this, tests fail with drush not found errors. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
While web/ directory is gitignored, we need to keep the custom settings files that configure Drupal for Upsun/DDEV: - web/sites/default/settings.php - Custom Drupal settings - web/sites/default/settings.upsun.php - Upsun-specific configuration These files won't be created by 'composer install' and are required for tests to work properly. Total: 12 settings files (2 per fixture × 6 fixtures) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Instead of 6 duplicate Drupal installations, now using: - ONE drupal11-base/ directory with Drupal core - SIX platform-configs/ subdirectories with just platform configs This reduces repository size: - Before: ~120 MB (6 × ~20 MB) - After: ~150 MB (base with vendor/web + 6 tiny configs) Test changes: - Copy drupal11-base to test dir - Overlay platform-specific config from platform-configs/ - Run composer install (now very fast due to cached vendor/) Benefits: - Single source of truth for Drupal installation - Much faster composer install in tests (cached dependencies) - Easier to update Drupal version (only one place) - Still tests all 6 platform config variants 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
After refactoring to use drupal11-base with platform-configs overlays, remove the old separate fixture directories: - drupal11-mariadb-fixed/ - drupal11-mariadb-flex/ - drupal11-mysql-fixed/ - drupal11-mysql-flex/ - drupal11-postgres-fixed/ - drupal11-postgres-flex/ These have been replaced with: - drupal11-base/ (single Drupal installation) - platform-configs/* (6 subdirectories with just config files) This completes the test fixture refactoring.
PostgreSQL tests were failing because they were trying to import a MySQL database dump. Split the single db.sql.gz into: - db-mysql.sql.gz (for MySQL and MariaDB tests) - db-postgres.sql.gz (for PostgreSQL tests) Updated per_test.sh to select the correct dump based on EXPECTED_DB_TYPE variable set by the test framework. This fixes postgres-flex and postgres-fixed test failures on CI.
a558365 to
8ebcdfc
Compare
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
How This PR Solves The Issue
Remove web/ directories from all test fixtures. These contain generated
Drupal core and contributed modules that can be recreated via composer
install when needed for testing.
This reduces repository size significantly:
Tests can regenerate web/ directories on-demand with:
composer install --no-dev --no-interaction
Closes #11
🤖 Generated with Claude Code
Co-Authored-By: Claude [email protected]## The Issue