Skip to content

TestRemoteOperations::test_is_executable_true is corrected #204

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
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion tests/test_remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
from ..testgres import ExecUtilException
from ..testgres import InvalidOperationException
from ..testgres import RemoteOperations
from ..testgres import LocalOperations
from ..testgres import ConnectionParams
from ..testgres import utils as testgres_utils


class TestRemoteOperations:
Expand Down Expand Up @@ -59,7 +61,11 @@ def test_is_executable_true(self):
"""
Test is_executable for an existing executable.
"""
cmd = os.getenv('PG_CONFIG')
local_ops = LocalOperations()
cmd = testgres_utils.get_bin_path2(local_ops, "pg_config")
cmd = local_ops.exec_command([cmd, "--bindir"], encoding="utf-8")
cmd = cmd.rstrip()
cmd = os.path.join(cmd, "pg_config")
response = self.operations.is_executable(cmd)

assert response is True
Expand Down