fix(config): Pass a configuration file using --config-file config.yaml (#2679)

This commit is contained in:
Pepe Fagoaga
2023-08-09 09:52:45 +02:00
committed by GitHub
parent c54ba5fd8c
commit 9e8023d716
44 changed files with 910 additions and 382 deletions

View File

@@ -916,6 +916,20 @@ class Test_Parser:
parsed = self.parser.parse(command)
assert parsed.aws_retries_max_attempts == int(max_retries)
def test_aws_parser_config_file(self):
argument = "--config-file"
config_file = "./test-config.yaml"
command = [prowler_command, argument, config_file]
parsed = self.parser.parse(command)
assert parsed.config_file == config_file
def test_aws_parser_sts_endpoint_region(self):
argument = "--sts-endpoint-region"
sts_endpoint_region = "eu-west-1"
command = [prowler_command, argument, sts_endpoint_region]
parsed = self.parser.parse(command)
assert parsed.sts_endpoint_region == sts_endpoint_region
def test_parser_azure_auth_sp(self):
argument = "--sp-env-auth"
command = [prowler_command, "azure", argument]