Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: make phpmyadmin command work with nonstandard ports, fixes #19 #20

Merged
merged 3 commits into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions commands/host/phpmyadmin
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@

DDEV_PHPMYADMIN_PORT=8036
DDEV_PHPMYADMIN_HTTPS_PORT=8037

if [ ${DDEV_PRIMARY_URL%://*} = "http" ] || [ -n "${GITPOD_WORKSPACE_ID:-}" ] || [ "${CODESPACES:-}" = "true" ]; then
ddev launch $DDEV_PRIMARY_URL:$DDEV_PHPMYADMIN_PORT
ddev launch :$DDEV_PHPMYADMIN_PORT
else
ddev launch $DDEV_PRIMARY_URL:$DDEV_PHPMYADMIN_HTTPS_PORT
ddev launch :$DDEV_PHPMYADMIN_HTTPS_PORT
fi
12 changes: 12 additions & 0 deletions tests/test.bats
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ teardown() {
health_checks
}


@test "install from release" {
set -eu -o pipefail
cd ${TESTDIR} || ( printf "unable to cd to ${TESTDIR}\n" && exit 1 )
Expand All @@ -54,3 +55,14 @@ teardown() {
health_checks
}

@test "install from directory with nonstandard port" {
set -eu -o pipefail
cd ${TESTDIR}
ddev config --router-http-port=8080 --router-https-port=8443
echo "# ddev get ${DIR} with project ${PROJNAME} in ${TESTDIR} ($(pwd))" >&3
ddev get ${DIR} >/dev/null 2>&1
ddev mutagen sync >/dev/null 2>&1
health_checks
}