diff --git a/cli/integration_tests/run_all.py b/cli/integration_tests/run_all.py index f6b000cc5..32433d95d 100644 --- a/cli/integration_tests/run_all.py +++ b/cli/integration_tests/run_all.py @@ -14,6 +14,7 @@ from test_cmd import run_test_command from release import run_release_command from bench import run_benchmark_command +from user_config import run_user_configs_commands def run_all(): @@ -84,6 +85,14 @@ def run_all(): raise print_separator() + ### User Configurations ### + try: + run_user_configs_commands() + except Exception: + print_err("User Configurations") + raise + print_separator() + ### Shell Completion ### try: run_shell_completion_commands() diff --git a/cli/integration_tests/user_config.py b/cli/integration_tests/user_config.py new file mode 100644 index 000000000..2b14465dc --- /dev/null +++ b/cli/integration_tests/user_config.py @@ -0,0 +1,33 @@ +""" +Provides methods to test the User Configurations commands in Chipmunk Build CLI Tool +""" + +from utls import run_command, print_blue_bold, print_green_bold + +CONFIG_BASE_COMMAND = [ + "cargo", + "run", + "-r", + "--", + "chipmunk", + "config", +] + + +def run_user_configs_commands(): + """Runs commands to print the default configurations and the path for the configurations file""" + print_blue_bold("Running print configurations file path Command...") + print_path_cmd = CONFIG_BASE_COMMAND.copy() + print_path_cmd.append("path") + run_command(print_path_cmd) + print_green_bold("*** Print configurations file path Command Succeeded ***") + + print_blue_bold("Running print default configurations Command...") + print_default_cmd = CONFIG_BASE_COMMAND.copy() + print_default_cmd.append("default") + run_command(print_default_cmd) + print_green_bold("*** Print default configurations Command Succeeded ***") + + +if __name__ == "__main__": + run_user_configs_commands() diff --git a/cli/src/cli_args.rs b/cli/src/cli_args.rs index 37294798e..3c2f1510b 100644 --- a/cli/src/cli_args.rs +++ b/cli/src/cli_args.rs @@ -193,7 +193,7 @@ pub enum UserConfigCommand { #[clap(visible_alias = "path")] /// Prints the path to the user configurations file. PrintPath, - #[clap(name = "print-default", visible_alias = "dump")] + #[clap(name = "print-default", visible_alias = "default")] /// Dumps the configurations with the default values to be used as a reference and base to /// user configurations. DumpDefaultConfiguration,