feat: use best practices, add tests, fixes #8 by stasadev · Pull Request #9 · DiffyWebsite/ddev-diffy
The Issue
- Fixes Tests are failing #8
How This PR Solves The Issue
See https://ddev.com/blog/ddev-add-on-maintenance-guide/#recommendations-for-add-on-maintainers
This PR:
- Runs the add-on update checker
curl -fsSL https://ddev.com/s/addon-update-checker.sh | bash - Adds tests that don't actually check if
ddev screenshotworks, but perform different checks - Adds DDEV version constraint >= v1.24.10
- Preserves
.ddev/diffy-worker/.envwhen the add-on is reinstalled - Switches from
$DDEV_HOSTNAMEinddev screenshotto${DDEV_SITENAME}.${DDEV_TLD}(because DDEV_HOSTNAME can look liketest.ddev.site,extra.ddev.site,one-more.ddev.sitewhen you haveadditional_hostnames)
P.S. the tests can be improved later to see if the ddev screenshot really works.
Manual Testing Instructions
Review https://github.com/stasadev/ddev-diffy/blob/20260226_stasadev_diffy/README.md
ddev add-on get https://github.com/DiffyWebsite/ddev-diffy/tarball/refs/pull/9/head ddev restart