Minor bugfixes per SonarCloud results

This commit is contained in:
Daniel 2022-05-02 21:44:33 -04:00
parent c4542d651d
commit f1c5662265
No known key found for this signature in database
GPG Key ID: 4940B41048AF73EA
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):