Content-Length: 268463 | pFad | https://github.com/postgrespro/testgres/issues/159

E4 RemoteOperations::exec_command does not handle 'expect_error' parameter correctly · Issue #159 · postgrespro/testgres · GitHub
Skip to content

RemoteOperations::exec_command does not handle 'expect_error' parameter correctly #159

Closed
@dmitry-lipetsk

Description

@dmitry-lipetsk

RemoteOperations::exec_command must not raise and Exception when we define expect_error = True

if expect_error:
raise Exception(result, error)

Test case:

    def test_exec_command_failure__expect_error(self):
        """
        Test exec_command for command execution failure.
        """
        cmd = "nonexistent_command"

        exit_status, result, error = self.operations.exec_command(cmd, verbose=True, wait_exit=True, shell=True, expect_error=True)

        assert error == b'bash: line 1: nonexistent_command: command not found\n'
        assert exit_status == 127
        assert result == b''

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions









    ApplySandwichStrip

    pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


    --- a PPN by Garber Painting Akron. With Image Size Reduction included!

    Fetched URL: https://github.com/postgrespro/testgres/issues/159

    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy