Skip to content

Commit

Permalink
fix: make phpmyadmin command work with nonstandard ports, fixes #19 (#20
Browse files Browse the repository at this point in the history
)
  • Loading branch information
rfay authored Jul 17, 2024
1 parent fd1b2b7 commit 5ef107c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
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
}


0 comments on commit 5ef107c

Please sign in to comment.