- Notifications
You must be signed in to change notification settings - Fork35
Proposal to fix #154 (v2)#161
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Proposal to fix #154 (v2)#161
Uh oh!
There was an error while loading.Please reload this page.
Conversation
- The one way to generate ExecUtilException - RaiseError.UtilityExitedWithNonZeroCode- RaiseError is added- ExecUtilException::error is added (it contains the error data)- ExecUtilException::__str__ is updated- PostgresNode::psql and PostgresNode::safe_psql are updated- TestLocalOperations::test_exec_command_failure is updated- TestRemoteOperations::test_exec_command_failure is updated- TestRemoteOperations::test_makedirs_and_rmdirs_failure is updated
…al_op]Both LocalOperations::exec_command and RemoteOperations::exec_command were updated.
If expect_error is True and no error is detected, safe_psql raises InvalidOperationException exception.Tests (local, remote) are added.
It fixes a problem with Windows.
Uh oh!
There was an error while loading.Please reload this page.
…e_returnsIt fixes a problem with this test on Windows.
The previous order of imports is restored for minimization number of changes.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Let's store our things on one place.We use RaiseError only in testgres/operations structures currently.
This function is equal to os_ops.get_default_encoding and is used in: - Helpers.PrepareProcessInput - RaiseError._TranslateDataIntoString__FromBinary
- New debug checks- Normalization
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I hope this new code make testgres better :)
b949eb8
intopostgrespro:masterUh oh!
There was an error while loading.Please reload this page.
This patch is normalizing an usage of ExecUtilException in exec_command methods - ExecUtilException::message now contains an only string data.
I also added ExecUtilException::error property to transfer an original error data to client.
PostgresNode::psql uses only OsOperations::exec_command. Usage of subprocess.Popen is deleted.
Failed tests those wait an binary error message in ExecUtilException::message are corrected.
This patch was tested with internal tests for probackup v2 - all is OK. Change of this tests is not required.
Summary of changes