Merge pull request #1083 from lightswitch05/bugfix/minor-corrections-per-sonarcloud

Minor corrections per sonarcloud
This commit is contained in:
Adam Warner 2022-05-04 18:15:43 +01:00 committed by GitHub
commit 2079c6adce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -48,7 +48,7 @@ def run_and_stream_command_output(command, environment_vars, verbose) -> bool:
print(line, end='')
build_result.wait()
if build_result.returncode != 0:
print(" ::: Error running".format(command))
print(f' ::: Error running: {command}')
print(build_result.stderr)
return build_result.returncode == 0

View File

@ -23,7 +23,7 @@ def run_and_stream_command_output():
print(line, end='')
build_result.wait()
if build_result.returncode != 0:
print(" ::: Error running".format(command))
print(f' ::: Error running: {command}')
print(build_result.stderr)
return run_and_stream_command_output_inner

View File

@ -168,14 +168,14 @@ expected_debian_lines = [
def test_debian_setup_php_env(Docker, expected_lines, repeat_function):
''' confirm all expected output is there and nothing else '''
stdout = ''
for i in range(repeat_function):
for _ in range(repeat_function):
stdout = Docker.run('. /bash_functions.sh ; eval `grep setup_php_env /start.sh`').stdout
for expected_line in expected_lines:
search_config_cmd = "grep -c '{}' /etc/lighttpd/conf-enabled/15-fastcgi-php.conf".format(expected_line)
search_config_count = Docker.run(search_config_cmd)
found_lines = int(search_config_count.stdout.rstrip('\n'))
if found_lines > 1:
assert False, "Found line {} times (more than once): {}".format(expected_line)
assert False, f'Found line {expected_line} times (more than once): {found_lines}'
def test_webPassword_random_generation(Docker):