Repository navigation
test: accept the hex CSRF token of Adminer 6.3.1 - #60
Merged
Merged
Conversation
## Short Summary (TL;DR) The sqlite test now accepts any Adminer CSRF token format, because Adminer 6.3.1 switched from digits to hex and broke the nightly tests. ## The Issue The nightly tests failed on all four jobs on 2026-11-24 in [run 45356694839](https://github.com/ddev/ddev-adminer/actions/runs/45356694839). The same commit passed every night before. The `adminer:6-standalone` image moved to Adminer 6.3.1 between those runs. Adminer 6.3.1 writes its CSRF token as `hex:hex`, and earlier releases wrote `digits:digits`. The test searched for `[0-9]+:[0-9]+` inside a command substitution. That grep matched nothing, so `set -e` stopped `health_checks` at `tests/test.bats:101` and printed no reason. The add-on itself works with Adminer 6.3.1. A sqlite insert with the hex token succeeds. ## How This PR Solves The Issue The test fetches the SQL page with `run curl` and asserts that it contains a `name='token'` field. It then takes the field's value whatever its format. If Adminer drops the token again, the failure shows the page instead of exiting silently. ## Manual Testing Instructions ```bash mkdir adminer-sqlite && cd adminer-sqlite ddev config --project-type=php --omit-containers=db ddev dotenv set .ddev/.env.adminer --adminer-default-driver=sqlite --adminer-default-db=/mnt/ddev_app/test.sqlite ddev add-on get ddev/ddev-adminer --pr 60 ddev restart ddev exec sqlite3 test.sqlite "CREATE TABLE items(id INTEGER PRIMARY KEY, name TEXT);" ddev adminer # Expect the items table, and an INSERT from the SQL command page to succeed ``` ## Automated Testing Overview Claude Code ran `bats ./tests/test.bats --filter-tags sqlite` on Linux amd64 with DDEV v1.25.6 and Adminer 6.3.1, and the test passed. On that machine, the `ddev adminer` URL assertion fails for an unrelated local reason, so that one assertion was removed for the run. CI also runs that assertion, and the arm64 and DDEV HEAD jobs, so CI has to confirm them. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01UrTUMupgLNPn18VBZJrtex Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UrTUMupgLNPn18VBZJrtex
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.
Short Summary (TL;DR)
The sqlite test now accepts any Adminer CSRF token format, because Adminer 6.3.1 switched from digits to hex and broke the nightly tests.
The Issue
The nightly tests failed on all four jobs on 2026-11-24 in run 45356694839. The same commit passed every night before.
The
adminer:6-standaloneimage moved to Adminer 6.3.1 between those runs. Adminer 6.3.1 writes its CSRF token ashex:hex, and earlier releases wrotedigits:digits. The test searched for[0-9]+:[0-9]+inside a command substitution. That grep matched nothing, soset -estoppedhealth_checksattests/test.bats:101and printed no reason.The add-on itself works with Adminer 6.3.1. A sqlite insert with the hex token succeeds.
How This PR Solves The Issue
The test fetches the SQL page with
run curland asserts that it contains aname='token'field. It then takes the field's value whatever its format. If Adminer drops the token again, the failure shows the page instead of exiting silently.Manual Testing Instructions
Automated Testing Overview
Claude Code ran
bats ./tests/test.bats --filter-tags sqliteon Linux amd64 with DDEV v1.25.6 and Adminer 6.3.1, and the test passed. On that machine, theddev adminerURL assertion fails for an unrelated local reason, so that one assertion was removed for the run. CI also runs that assertion, and the arm64 and DDEV HEAD jobs, so CI has to confirm them.🤖 Generated with Claude Code
https://claude.ai/code/session_01UrTUMupgLNPn18VBZJrtex