feat: use best practices, add tests, fixes #8 by stasadev · Pull Request #9 · DiffyWebsite/ddev-diffy

The Issue

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 screenshot works, but perform different checks
  • Adds DDEV version constraint >= v1.24.10
  • Preserves .ddev/diffy-worker/.env when the add-on is reinstalled
  • Switches from $DDEV_HOSTNAME in ddev screenshot to ${DDEV_SITENAME}.${DDEV_TLD} (because DDEV_HOSTNAME can look like test.ddev.site,extra.ddev.site,one-more.ddev.site when you have additional_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

Automated Testing Overview

Release/Deployment Notes