Skip to content

Commit

Permalink
Pointing to exact --sut commands when setting up integration tests
Browse files Browse the repository at this point in the history
- While everything works fine with normal tests, bundle tests break on it.
  • Loading branch information
kkalinowski-reef committed Dec 18, 2023
1 parent 73e227b commit ab4d142
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions test/integration/test_autocomplete.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@ def bashrc(homedir):


@pytest.fixture(scope="module")
def autocomplete_installed(env, homedir, bashrc, cli_version):
def autocomplete_installed(request, env, homedir, bashrc, cli_version):
command = request.config.getoption('--sut')
shell = pexpect.spawn(
f'bash -i -c "{cli_version} install-autocomplete"', env=env, logfile=sys.stderr.buffer
f'bash -i -c "{command} install-autocomplete"', env=env, logfile=sys.stderr.buffer
)
try:
shell.expect_exact('Autocomplete successfully installed for bash', timeout=TIMEOUT)
Expand Down
5 changes: 3 additions & 2 deletions test/integration/test_b2_command_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -2665,14 +2665,15 @@ def test_upload_file__stdin_pipe_operator(request, bash_runner, b2_tool, bucket_

@skip_on_windows
def test_upload_unbound_stream__redirect_operator(
request, bash_runner, b2_tool, bucket_name, is_running_on_docker, cli_version
request, bash_runner, b2_tool, bucket_name, is_running_on_docker
):
"""Test upload-unbound-stream from stdin using redirect operator."""
if is_running_on_docker:
pytest.skip('Not supported on Docker')
content = request.node.name
command = request.config.getoption('--sut')
run = bash_runner(
f'{cli_version} upload-unbound-stream {bucket_name} <(echo -n {content}) {request.node.name}.txt'
f'{command} upload-unbound-stream {bucket_name} <(echo -n {content}) {request.node.name}.txt'
)
assert hashlib.sha1(content.encode()).hexdigest() in run.stdout

Expand Down

0 comments on commit ab4d142

Please sign in to comment.