Merge pull request #1083 from lightswitch05/bugfix/minor-corrections-per-sonarcloud
Minor corrections per sonarcloud
This commit is contained in:
commit
2079c6adce
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue