diff --git a/Dockerfile b/Dockerfile index 439e104..9ad76be 100644 --- a/Dockerfile +++ b/Dockerfile @@ -116,7 +116,7 @@ RUN set -xe; \ /home/wodby/.ssh; \ \ { \ - echo 'export PS1="\u@${WODBY_APP_NAME:-ruby}.${WODBY_ENVIRONMENT_NAME:-container}:\w $ "'; \ + echo 'export PS1="\u@$(hostname):\w $ "'; \ echo "export PATH=${PATH}"; \ } | tee /home/wodby/.shrc; \ \ diff --git a/tests/tests.sh b/tests/tests.sh index 9f44df2..72f12a9 100755 --- a/tests/tests.sh +++ b/tests/tests.sh @@ -6,9 +6,16 @@ if [[ -n "${DEBUG}" ]]; then set -x fi +source /home/wodby/.shrc +expected_prompt='\u@'"$(hostname)"':\w $ ' +if [[ "${PS1}" != "${expected_prompt}" ]]; then + echo "Unexpected shell prompt: ${PS1}" + exit 1 +fi + ruby -v | grep -q "${RUBY_VERSION}" ssh sshd cat /home/wodby/.ssh/authorized_keys | grep -q admin@example.com curl -s nginx | grep -q "Rails version:" -curl -s localhost:8080 | grep -q "Rails version:" \ No newline at end of file +curl -s localhost:8080 | grep -q "Rails version:"