-
Notifications
You must be signed in to change notification settings - Fork 35
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
dmitry-lipetsk
merged 13 commits into
postgrespro:master
from
dmitry-lipetsk:master-fix154--v02
Dec 10, 2024
Merged
Proposal to fix #154 (v2) #161
dmitry-lipetsk
merged 13 commits into
postgrespro:master
from
dmitry-lipetsk:master-fix154--v02
Dec 10, 2024
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- 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.
demonolock
reviewed
Dec 9, 2024
…e_returns It fixes a problem with this test on Windows.
The previous order of imports is restored for minimization number of changes.
dmitry-lipetsk
commented
Dec 10, 2024
dmitry-lipetsk
commented
Dec 10, 2024
dmitry-lipetsk
commented
Dec 10, 2024
demonolock
approved these changes
Dec 10, 2024
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
dmitry-lipetsk
commented
Dec 10, 2024
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 :)
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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