.env.default sets WPT_TEST_DIR to a value that stops a local run
I maintainer di solito rispondono entro 4 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 76/100
Direzione di ricerca
Confronta .env.default con l’esempio del README ed esamina check_required_env() in prepare.php per confermare il requisito della directory locale. Aggiorna i valori predefiniti e i commenti affinché corrispondano alla configurazione documentata, inclusi WPT_SKIP_DB_CLEANUP e la spiegazione di rm -rf. Il lavoro è completato quando una nuova configurazione locale, in cui sono stati inseriti solo i valori del database, supera php prepare.php e il file corrisponde al README.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Describe the bug
.env.default sets WPT_PREPARE_DIR="/tmp/wp-test-runner" and WPT_TEST_DIR="wp-test-runner". For a local run (WPT_SSH_CONNECT empty), check_required_env() requires the two to be the same, so a host who follows the README stops at prepare.php.
The copy of .env.default printed in the README shows export WPT_TEST_DIR="/tmp/wp-test-runner", so the README and the real file disagree. The real file is also behind the README in two other places:
WPT_SKIP_DB_CLEANUPis missing. It was added tofunctions.phpand the README in 6538f85 (#337).- The
WPT_RM_TEST_DIR_CMDcomment still saysrm -r. The README copy saysrm -rfand explains why-fis needed (dd6d34e, #336).
To Reproduce
Steps to reproduce the behavior:
cp .env.default .env- Set
WPT_DB_NAME,WPT_DB_USER,WPT_DB_PASSWORDandWPT_DB_HOSTin.env, nothing else. source .envphp prepare.php- See error:
WPT_PREPARE_DIR=/tmp/wp-test-runner WPT_TEST_DIR=wp-test-runner
Error: WPT_TEST_DIR must be the same as WPT_PREPARE_DIR when running locally.
For the other two points:
$ grep -n "SKIP_DB_CLEANUP" .env.default
$ grep -n "rm -r" .env.default
46:# Use if `rm -r` can't be called directly for some reason.
Expected behavior
A copy of .env.default with only the database values filled in works for a local run, as the README describes. .env.default matches the copy printed in the README: export WPT_TEST_DIR="/tmp/wp-test-runner", the WPT_SKIP_DB_CLEANUP entry, and the rm -rf comment.
Screenshots
n/a (command line output above)
Additional context
Tested on master at 1f276b2 with PHP 8.4.27, in the image built from docker/Dockerfile. The hosting handbook also says WPT_TEST_DIR defaults to $WPT_PREPARE_DIR.
AI Assisted: I used an AI assistant to help investigate and draft this; I ran and checked every test and result myself.
- Lingua principale
- PHP
- Stelle
- 77
- Fork
- 80
- Merge medio
- 12g 17h
- PR unite (30g)
- 7
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di WordPress/phpunit-test-runner
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 87/100
WordPress/phpunit-test-runner#364 ·
I maintainer di solito rispondono entro 4 giorni
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
WordPress/phpunit-test-runner#363 ·
I maintainer di solito rispondono entro 4 giorni
-
The PHP version check in prepare.php still allows PHP 7.2 and 7.3Forse già presa @ekamran l’ha presa 7 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
WordPress/phpunit-test-runner#359 ·
I maintainer di solito rispondono entro 4 giorni
-
make testrunner.sh in host-tools directoryForse già presa @iarif4u l’ha presa 24 giorni fa. ApertaContributorDay tooling WCUS26
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
WordPress/phpunit-test-runner#260 · 4 commenti ·
I maintainer di solito rispondono entro 4 giorni
-
create host-tools directory in root folderForse già presa @iarif4u l’ha presa 24 giorni fa. ApertaContributorDay tooling WCUS26
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
WordPress/phpunit-test-runner#259 · 1 commento ·
I maintainer di solito rispondono entro 4 giorni
Tutte le issue di WordPress/phpunit-test-runner
Issue simili
-
Bug-Report
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
RSS-Bridge/rss-bridge#5158 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
octobercms/october#6150 ·
-
Syntax error with CONST-sAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
type/bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
flarum/framework#5301 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Add TuneIn-DirMon in the bot listForse già presa @liviuconcioiu l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
matomo-org/device-detector#8424 ·
I maintainer di solito rispondono entro 1 giorno