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

"And I pause scenario execution" doesn't work #96

Open
tmuras opened this issue Jan 22, 2019 · 4 comments
Open

"And I pause scenario execution" doesn't work #96

tmuras opened this issue Jan 22, 2019 · 4 comments

Comments

@tmuras
Copy link

tmuras commented Jan 22, 2019

Using the step "And I pause scenario execution" triggers an exception:

Break point should only be used with interative terminal. (Behat\Mink\Exception\ExpectationException)

even it the tests are run from inside docker container, using interactive session.

The good news is that it's only the check that is not working in docker:

        // Make sure this step is only used with interactive terminal (if detected).
        if ($posixexists && !@posix_isatty(STDOUT)) {
            $session = $this->getSession();
             throw new ExpectationException('Break point should only be used with interative terminal.', $session);
        }

Simply commenting out throwing an exception line will make the step to behave correctly:
image

@andrewnicols
Copy link
Contributor

andrewnicols commented Jan 22, 2019 via email

@scara
Copy link
Contributor

scara commented Jan 22, 2019

Hi @tmuras,
never tried by myself but it looks like we are missing -i or -t or -it here i.e. something like:

stdin_open: true # Maps -i
#tty: true # Maps -t, In case posix_isatty() requires even a TTY since it is called against STDOUT

for the composition i.e.:

$ git diff
diff --git a/base.yml b/base.yml
index 24f3882..6b7cdc0 100755
--- a/base.yml
+++ b/base.yml
@@ -2,6 +2,8 @@ version: "2"
 services:
   webserver:
     image: "moodlehq/moodle-php-apache:${MOODLE_DOCKER_PHP_VERSION}"
+    stdin_open: true
+    #tty: true
     depends_on:
       - db
     volumes:

It would be a nice add-on if it will work, given the right combination (just -i or -it or -t).

HTH,
Matteo

@stronk7
Copy link
Member

stronk7 commented Sep 12, 2019

Have anybody tried this? exec, base.yml or both? I know I can try, heh, just I'm lazy :-)

@paulholden
Copy link
Member

Thanks @stronk7 for referring me to this task. I can confirm that @tmuras workaround to comment out the thrown exception during an interaction session on the Docker container did indeed work (after connecting via docker exec -it docker_webserver_1 bash)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants