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

Properly return postgres query errors on failure #2179

Merged
merged 1 commit into from Sep 23, 2017

Commits on Sep 22, 2017

  1. Properly return postgres query errors on failure

    When using the `query` method in the `postgres_session` resource, if
    the query fails, the `query` method attempts to call `skip_resource`
    with an error message. Not only does the `skip_resource` not properly
    work, but it also returns a `String` object back to the test which is
    probably going to try and call the `output` method on it to run the test.
    
    This results in an error like this:
    
    ```
      Can't read
         ∅  undefined method `output' for "output":String
    ```
    
    This change returns the full psql output as a Lines object to the
    user, including stderr, so they can at least get the error in their
    test output and avoids undefined method errors.
    
    Signed-off-by: Adam Leff <adam@leff.co>
    adamleff committed Sep 22, 2017
    Copy the full SHA
    0973d37 View commit details
    Browse the repository at this point in the history