Skip to content

test: Add PHP image smoke checks#392

Open
musaabhasan wants to merge 1 commit intototara:masterfrom
musaabhasan:test-add-php-image-smoke-checks
Open

test: Add PHP image smoke checks#392
musaabhasan wants to merge 1 commit intototara:masterfrom
musaabhasan:test-add-php-image-smoke-checks

Conversation

@musaabhasan
Copy link
Copy Markdown

Description

Adds a common PHP image smoke-test script and runs it during each PHP Dockerfile build. The check validates core runtime expectations that the Totara dev images rely on:

  • required PHP extensions are loaded
  • SQL Server extensions are present on supported PHP versions
  • Composer is executable
  • php-fpm configuration parses successfully
  • required locales are generated

Refs #38

Testing Instructions

  1. Check out this pull request
  2. Build a PHP image, e.g. docker build -f php/php83/Dockerfile php
  3. Confirm the build runs /usr/local/bin/totara-php-smoke-test successfully
  4. Remove or disable one checked extension or locale and confirm the build fails during the smoke-test step

Local validation performed:

  • bash -n php/smoke-test.sh
  • git diff --check

Docker builds were not run locally because Docker is not installed on this workstation.

Checklist

  • Does what the author says it will do
  • Testing instructions are provided
  • Commit messages make sense and follow the conventional commit standard
  • No identified security issues
  • No identified maintenance issues
  • Any third-party libraries/dependencies use the MIT or Apache 2.0 license
  • Changes made are backwards compatible and will not break existing setups
  • Changes to scripts in the bin/ directory run correctly on both MacOS and WSL
  • Changes to containers can be built locally sucessfully (e.g. via tbuild container && tup container)
  • Containers/images are compatible with both AMD64 (Windows) and ARM64 (MacOS)
  • Changes made to config.php are compatible with our oldest supported Totara version, our newest Totara version, and Moodle

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant