From 01bcd67769c16aa5228d1b2a6d89b0a1f72807e2 Mon Sep 17 00:00:00 2001 From: Sam Tholiya Date: Mon, 20 Jan 2025 23:11:09 +0100 Subject: [PATCH] fix help for 'atmos about non-existent' --- cmd/about.go | 11 +- ...tCLICommands_atmos_--help#01.stderr.golden | 0 ...tCLICommands_atmos_--help#01.stdout.golden | 62 ++++++++ ...ICommands_atmos_about_--help.stderr.golden | 0 ...ICommands_atmos_about_--help.stdout.golden | 36 +++++ ...nds_atmos_about_non-existent.stderr.golden | 2 + ...nds_atmos_about_non-existent.stdout.golden | 3 + ...stCLICommands_atmos_atlantis.stderr.golden | 2 + ...stCLICommands_atmos_atlantis.stdout.golden | 4 + ...mmands_atmos_atlantis_--help.stderr.golden | 0 ...mmands_atmos_atlantis_--help.stdout.golden | 44 ++++++ ...ands_atmos_atlantis_generate.stderr.golden | 2 + ...ands_atmos_atlantis_generate.stdout.golden | 4 + ...mos_atlantis_generate_--help.stderr.golden | 0 ...mos_atlantis_generate_--help.stdout.golden | 55 +++++++ ...atmos_atlantis_generate_help.stderr.golden | 0 ...atmos_atlantis_generate_help.stdout.golden | 55 +++++++ ...tlantis_generate_repo-config.stderr.golden | 0 ...tlantis_generate_repo-config.stdout.golden | 18 +++ ..._generate_repo-config_--help.stderr.golden | 0 ..._generate_repo-config_--help.stdout.golden | 139 ++++++++++++++++++ ...is_generate_repo-config_help.stderr.golden | 0 ...is_generate_repo-config_help.stdout.golden | 139 ++++++++++++++++++ ...ate_repo-config_non-existant.stderr.golden | 2 + ...ate_repo-config_non-existant.stdout.golden | 3 + ...Commands_atmos_atlantis_help.stderr.golden | 0 ...Commands_atmos_atlantis_help.stdout.golden | 44 ++++++ ...stCLICommands_atmos_helmfile.stderr.golden | 2 + ...stCLICommands_atmos_helmfile.stdout.golden | 8 + ...mmands_atmos_helmfile_--help.stderr.golden | 0 ...mmands_atmos_helmfile_--help.stdout.golden | 55 +++++++ ...ommands_atmos_helmfile_apply.stderr.golden | 1 + ...ommands_atmos_helmfile_apply.stdout.golden | 0 ..._atmos_helmfile_apply_--help.stderr.golden | 0 ..._atmos_helmfile_apply_--help.stdout.golden | 39 +++++ ...ds_atmos_helmfile_apply_help.stderr.golden | 0 ...ds_atmos_helmfile_apply_help.stdout.golden | 39 +++++ ..._helmfile_apply_non-existant.stderr.golden | 0 ..._helmfile_apply_non-existant.stdout.golden | 18 +++ ...Commands_atmos_helmfile_help.stderr.golden | 0 ...Commands_atmos_helmfile_help.stdout.golden | 55 +++++++ ..._atmos_helmfile_non-existant.stderr.golden | 2 + ..._atmos_helmfile_non-existant.stdout.golden | 8 + ...ICommands_atmos_non-existent.stderr.golden | 5 +- ...ICommands_atmos_non-existent.stdout.golden | 21 +++ ...tCLICommands_atmos_terraform.stderr.golden | 2 + ...tCLICommands_atmos_terraform.stdout.golden | 34 +++++ ...atmos_terraform_apply_--help.stderr.golden | 0 ...atmos_terraform_apply_--help.stdout.golden | 59 ++++++++ ...s_atmos_terraform_apply_help.stderr.golden | 0 ...s_atmos_terraform_apply_help.stdout.golden | 59 ++++++++ ...ommands_atmos_terraform_help.stderr.golden | 0 ...ommands_atmos_terraform_help.stdout.golden | 94 ++++++++++++ ...atmos_terraform_non-existent.stderr.golden | 2 + ...atmos_terraform_non-existent.stdout.golden | 35 +++++ ...on-existent_in_non_workspace.stderr.golden | 0 ...on-existent_in_non_workspace.stdout.golden | 18 +++ ...an_non-existent_in_workspace.stderr.golden | 1 + ...an_non-existent_in_workspace.stdout.golden | 0 tests/test-cases/core.yaml | 14 -- tests/test-cases/help-and-usage.yaml | 79 +++++++++- 61 files changed, 1250 insertions(+), 25 deletions(-) create mode 100644 tests/snapshots/TestCLICommands_atmos_--help#01.stderr.golden create mode 100644 tests/snapshots/TestCLICommands_atmos_--help#01.stdout.golden create mode 100644 tests/snapshots/TestCLICommands_atmos_about_--help.stderr.golden create mode 100644 tests/snapshots/TestCLICommands_atmos_about_--help.stdout.golden create mode 100644 tests/snapshots/TestCLICommands_atmos_about_non-existent.stderr.golden create mode 100644 tests/snapshots/TestCLICommands_atmos_about_non-existent.stdout.golden create mode 100644 tests/snapshots/TestCLICommands_atmos_atlantis.stderr.golden create mode 100644 tests/snapshots/TestCLICommands_atmos_atlantis.stdout.golden create mode 100644 tests/snapshots/TestCLICommands_atmos_atlantis_--help.stderr.golden create mode 100644 tests/snapshots/TestCLICommands_atmos_atlantis_--help.stdout.golden create mode 100644 tests/snapshots/TestCLICommands_atmos_atlantis_generate.stderr.golden create mode 100644 tests/snapshots/TestCLICommands_atmos_atlantis_generate.stdout.golden create mode 100644 tests/snapshots/TestCLICommands_atmos_atlantis_generate_--help.stderr.golden create mode 100644 tests/snapshots/TestCLICommands_atmos_atlantis_generate_--help.stdout.golden create mode 100644 tests/snapshots/TestCLICommands_atmos_atlantis_generate_help.stderr.golden create mode 100644 tests/snapshots/TestCLICommands_atmos_atlantis_generate_help.stdout.golden create mode 100644 tests/snapshots/TestCLICommands_atmos_atlantis_generate_repo-config.stderr.golden create mode 100644 tests/snapshots/TestCLICommands_atmos_atlantis_generate_repo-config.stdout.golden create mode 100644 tests/snapshots/TestCLICommands_atmos_atlantis_generate_repo-config_--help.stderr.golden create mode 100644 tests/snapshots/TestCLICommands_atmos_atlantis_generate_repo-config_--help.stdout.golden create mode 100644 tests/snapshots/TestCLICommands_atmos_atlantis_generate_repo-config_help.stderr.golden create mode 100644 tests/snapshots/TestCLICommands_atmos_atlantis_generate_repo-config_help.stdout.golden create mode 100644 tests/snapshots/TestCLICommands_atmos_atlantis_generate_repo-config_non-existant.stderr.golden create mode 100644 tests/snapshots/TestCLICommands_atmos_atlantis_generate_repo-config_non-existant.stdout.golden create mode 100644 tests/snapshots/TestCLICommands_atmos_atlantis_help.stderr.golden create mode 100644 tests/snapshots/TestCLICommands_atmos_atlantis_help.stdout.golden create mode 100644 tests/snapshots/TestCLICommands_atmos_helmfile.stderr.golden create mode 100644 tests/snapshots/TestCLICommands_atmos_helmfile.stdout.golden create mode 100644 tests/snapshots/TestCLICommands_atmos_helmfile_--help.stderr.golden create mode 100644 tests/snapshots/TestCLICommands_atmos_helmfile_--help.stdout.golden create mode 100644 tests/snapshots/TestCLICommands_atmos_helmfile_apply.stderr.golden create mode 100644 tests/snapshots/TestCLICommands_atmos_helmfile_apply.stdout.golden create mode 100644 tests/snapshots/TestCLICommands_atmos_helmfile_apply_--help.stderr.golden create mode 100644 tests/snapshots/TestCLICommands_atmos_helmfile_apply_--help.stdout.golden create mode 100644 tests/snapshots/TestCLICommands_atmos_helmfile_apply_help.stderr.golden create mode 100644 tests/snapshots/TestCLICommands_atmos_helmfile_apply_help.stdout.golden create mode 100644 tests/snapshots/TestCLICommands_atmos_helmfile_apply_non-existant.stderr.golden create mode 100644 tests/snapshots/TestCLICommands_atmos_helmfile_apply_non-existant.stdout.golden create mode 100644 tests/snapshots/TestCLICommands_atmos_helmfile_help.stderr.golden create mode 100644 tests/snapshots/TestCLICommands_atmos_helmfile_help.stdout.golden create mode 100644 tests/snapshots/TestCLICommands_atmos_helmfile_non-existant.stderr.golden create mode 100644 tests/snapshots/TestCLICommands_atmos_helmfile_non-existant.stdout.golden create mode 100644 tests/snapshots/TestCLICommands_atmos_terraform.stderr.golden create mode 100644 tests/snapshots/TestCLICommands_atmos_terraform.stdout.golden create mode 100644 tests/snapshots/TestCLICommands_atmos_terraform_apply_--help.stderr.golden create mode 100644 tests/snapshots/TestCLICommands_atmos_terraform_apply_--help.stdout.golden create mode 100644 tests/snapshots/TestCLICommands_atmos_terraform_apply_help.stderr.golden create mode 100644 tests/snapshots/TestCLICommands_atmos_terraform_apply_help.stdout.golden create mode 100644 tests/snapshots/TestCLICommands_atmos_terraform_help.stderr.golden create mode 100644 tests/snapshots/TestCLICommands_atmos_terraform_help.stdout.golden create mode 100644 tests/snapshots/TestCLICommands_atmos_terraform_non-existent.stderr.golden create mode 100644 tests/snapshots/TestCLICommands_atmos_terraform_non-existent.stdout.golden create mode 100644 tests/snapshots/TestCLICommands_atmos_terraform_plan_non-existent_in_non_workspace.stderr.golden create mode 100644 tests/snapshots/TestCLICommands_atmos_terraform_plan_non-existent_in_non_workspace.stdout.golden create mode 100644 tests/snapshots/TestCLICommands_atmos_terraform_plan_non-existent_in_workspace.stderr.golden create mode 100644 tests/snapshots/TestCLICommands_atmos_terraform_plan_non-existent_in_workspace.stdout.golden diff --git a/cmd/about.go b/cmd/about.go index 5f15a2bbd..b2cb3a278 100644 --- a/cmd/about.go +++ b/cmd/about.go @@ -14,13 +14,10 @@ var aboutMarkdown string // aboutCmd represents the about command var aboutCmd = &cobra.Command{ - Use: "about", - Short: "Learn about Atmos", - Long: `Display information about Atmos, its features, and benefits.`, - Args: cobra.NoArgs, - DisableSuggestions: true, - SilenceUsage: true, - SilenceErrors: true, + Use: "about", + Short: "Learn about Atmos", + Long: `Display information about Atmos, its features, and benefits.`, + Args: cobra.NoArgs, RunE: func(cmd *cobra.Command, args []string) error { renderer, err := glamour.NewTermRenderer( glamour.WithAutoStyle(), diff --git a/tests/snapshots/TestCLICommands_atmos_--help#01.stderr.golden b/tests/snapshots/TestCLICommands_atmos_--help#01.stderr.golden new file mode 100644 index 000000000..e69de29bb diff --git a/tests/snapshots/TestCLICommands_atmos_--help#01.stdout.golden b/tests/snapshots/TestCLICommands_atmos_--help#01.stdout.golden new file mode 100644 index 000000000..af98afaad --- /dev/null +++ b/tests/snapshots/TestCLICommands_atmos_--help#01.stdout.golden @@ -0,0 +1,62 @@ + + +Usage: + + atmos [flags] + atmos [sub-command] [flags] + + +Available Commands: + + about Learn about Atmos + atlantis Generate and manage Atlantis configurations + aws Run AWS-specific commands for interacting with cloud resources + completion Generate autocompletion scripts for Bash, Zsh, Fish, and PowerShell + describe Show details about Atmos configurations and components + docs Open Atmos documentation or display component-specific docs + helmfile Manage Helmfile-based Kubernetes deployments + help Display help information for Atmos commands + list List available stacks and components + pro Access premium features integrated with app.cloudposse.com + support Show Atmos support options + terraform Execute Terraform commands (e.g., plan, apply, destroy) using Atmos stack configurations + validate Validate configurations against OPA policies and JSON schemas + vendor Manage external dependencies for components or stacks + version Display the version of Atmos you are running and check for updates + workflow Run predefined tasks using workflows + +SubCommand Aliases: + + hf Alias of "atmos helmfile" command + tf Alias of "atmos terraform" command + + +Flags: + + -h, --help help for atmos (default "false") + + --logs-file string The file to write Atmos logs to. Logs can be + written to any file or any standard file + descriptor, including '/dev/stdout', + '/dev/stderr' and '/dev/null' (default + "/dev/stdout") + + --logs-level string Logs level. Supported log levels are Trace, + Debug, Info, Warning, Off. If the log level + is set to Off, Atmos will not log any + messages (default "Info") + + --redirect-stderr string File descriptor to redirect 'stderr' to. + Errors can be redirected to any file or any + standard file descriptor (including + '/dev/null'): atmos + --redirect-stderr /dev/stdout + +The '--' (double-dash) can be used to signify the end of Atmos-specific options +and the beginning of additional native arguments and flags for the specific command being run. + +Example: + atmos [subcommand] -s -- + + +Use "atmos [subcommand] --help" for more information about a command. diff --git a/tests/snapshots/TestCLICommands_atmos_about_--help.stderr.golden b/tests/snapshots/TestCLICommands_atmos_about_--help.stderr.golden new file mode 100644 index 000000000..e69de29bb diff --git a/tests/snapshots/TestCLICommands_atmos_about_--help.stdout.golden b/tests/snapshots/TestCLICommands_atmos_about_--help.stdout.golden new file mode 100644 index 000000000..789ed6cf9 --- /dev/null +++ b/tests/snapshots/TestCLICommands_atmos_about_--help.stdout.golden @@ -0,0 +1,36 @@ + + +Usage: + + atmos about [flags] + + +Flags: + + -h, --help help for about (default "false") + + +Global Flags: + + --logs-file string The file to write Atmos logs to. Logs can be + written to any file or any standard file + descriptor, including '/dev/stdout', + '/dev/stderr' and '/dev/null' (default + "/dev/stdout") + + --logs-level string Logs level. Supported log levels are Trace, + Debug, Info, Warning, Off. If the log level + is set to Off, Atmos will not log any + messages (default "Info") + + --redirect-stderr string File descriptor to redirect 'stderr' to. + Errors can be redirected to any file or any + standard file descriptor (including + '/dev/null'): atmos + --redirect-stderr /dev/stdout + +The '--' (double-dash) can be used to signify the end of Atmos-specific options +and the beginning of additional native arguments and flags for the specific command being run. + +Example: + atmos about -s -- diff --git a/tests/snapshots/TestCLICommands_atmos_about_non-existent.stderr.golden b/tests/snapshots/TestCLICommands_atmos_about_non-existent.stderr.golden new file mode 100644 index 000000000..961c3bb7b --- /dev/null +++ b/tests/snapshots/TestCLICommands_atmos_about_non-existent.stderr.golden @@ -0,0 +1,2 @@ +Error: Unknown command "non-existent" for "atmos about" + diff --git a/tests/snapshots/TestCLICommands_atmos_about_non-existent.stdout.golden b/tests/snapshots/TestCLICommands_atmos_about_non-existent.stdout.golden new file mode 100644 index 000000000..a8a285014 --- /dev/null +++ b/tests/snapshots/TestCLICommands_atmos_about_non-existent.stdout.golden @@ -0,0 +1,3 @@ +No valid subcommands found + +Run 'atmos about --help' for usage diff --git a/tests/snapshots/TestCLICommands_atmos_atlantis.stderr.golden b/tests/snapshots/TestCLICommands_atmos_atlantis.stderr.golden new file mode 100644 index 000000000..b0f3d7c05 --- /dev/null +++ b/tests/snapshots/TestCLICommands_atmos_atlantis.stderr.golden @@ -0,0 +1,2 @@ +Error: Unknown command: "atmos atlantis" + diff --git a/tests/snapshots/TestCLICommands_atmos_atlantis.stdout.golden b/tests/snapshots/TestCLICommands_atmos_atlantis.stdout.golden new file mode 100644 index 000000000..8ea0d8b15 --- /dev/null +++ b/tests/snapshots/TestCLICommands_atmos_atlantis.stdout.golden @@ -0,0 +1,4 @@ +Valid subcommands are: + generate + +Run 'atmos atlantis --help' for usage diff --git a/tests/snapshots/TestCLICommands_atmos_atlantis_--help.stderr.golden b/tests/snapshots/TestCLICommands_atmos_atlantis_--help.stderr.golden new file mode 100644 index 000000000..e69de29bb diff --git a/tests/snapshots/TestCLICommands_atmos_atlantis_--help.stdout.golden b/tests/snapshots/TestCLICommands_atmos_atlantis_--help.stdout.golden new file mode 100644 index 000000000..d557b25c4 --- /dev/null +++ b/tests/snapshots/TestCLICommands_atmos_atlantis_--help.stdout.golden @@ -0,0 +1,44 @@ + + +Usage: + + atmos atlantis [sub-command] [flags] + + +Available Commands: + + generate Generate Atlantis configuration files + + +Flags: + + -h, --help help for atlantis (default "false") + + +Global Flags: + + --logs-file string The file to write Atmos logs to. Logs can be + written to any file or any standard file + descriptor, including '/dev/stdout', + '/dev/stderr' and '/dev/null' (default + "/dev/stdout") + + --logs-level string Logs level. Supported log levels are Trace, + Debug, Info, Warning, Off. If the log level + is set to Off, Atmos will not log any + messages (default "Info") + + --redirect-stderr string File descriptor to redirect 'stderr' to. + Errors can be redirected to any file or any + standard file descriptor (including + '/dev/null'): atmos + --redirect-stderr /dev/stdout + +The '--' (double-dash) can be used to signify the end of Atmos-specific options +and the beginning of additional native arguments and flags for the specific command being run. + +Example: + atmos atlantis [subcommand] -s -- + + +Use "atmos atlantis [subcommand] --help" for more information about a command. diff --git a/tests/snapshots/TestCLICommands_atmos_atlantis_generate.stderr.golden b/tests/snapshots/TestCLICommands_atmos_atlantis_generate.stderr.golden new file mode 100644 index 000000000..fc2b39593 --- /dev/null +++ b/tests/snapshots/TestCLICommands_atmos_atlantis_generate.stderr.golden @@ -0,0 +1,2 @@ +Error: Unknown command: "atmos atlantis generate" + diff --git a/tests/snapshots/TestCLICommands_atmos_atlantis_generate.stdout.golden b/tests/snapshots/TestCLICommands_atmos_atlantis_generate.stdout.golden new file mode 100644 index 000000000..51dd84584 --- /dev/null +++ b/tests/snapshots/TestCLICommands_atmos_atlantis_generate.stdout.golden @@ -0,0 +1,4 @@ +Valid subcommands are: + repo-config + +Run 'atmos atlantis generate --help' for usage diff --git a/tests/snapshots/TestCLICommands_atmos_atlantis_generate_--help.stderr.golden b/tests/snapshots/TestCLICommands_atmos_atlantis_generate_--help.stderr.golden new file mode 100644 index 000000000..e69de29bb diff --git a/tests/snapshots/TestCLICommands_atmos_atlantis_generate_--help.stdout.golden b/tests/snapshots/TestCLICommands_atmos_atlantis_generate_--help.stdout.golden new file mode 100644 index 000000000..68a1188ec --- /dev/null +++ b/tests/snapshots/TestCLICommands_atmos_atlantis_generate_--help.stdout.golden @@ -0,0 +1,55 @@ + + +Usage: + + atmos atlantis generate [sub-command] [flags] + + +Available Commands: + + repo-config Generate repository configuration for Atlantis + + +Flags: + + --clone-target-ref Clone the target reference with which to compare + the current branch: atmos atlantis generate + repo-config --affected-only=true + --clone-target-ref=true + The flag is only used when '--affected-only=true' + If set to 'false' (default), the target reference + will be checked out instead + This requires that the target reference is already + cloned by Git, and the information about it exists + in the '.git' directory (default "false") + + -h, --help help for generate (default "false") + + +Global Flags: + + --logs-file string The file to write Atmos logs to. Logs can be + written to any file or any standard file + descriptor, including '/dev/stdout', + '/dev/stderr' and '/dev/null' (default + "/dev/stdout") + + --logs-level string Logs level. Supported log levels are Trace, + Debug, Info, Warning, Off. If the log level + is set to Off, Atmos will not log any + messages (default "Info") + + --redirect-stderr string File descriptor to redirect 'stderr' to. + Errors can be redirected to any file or any + standard file descriptor (including + '/dev/null'): atmos + --redirect-stderr /dev/stdout + +The '--' (double-dash) can be used to signify the end of Atmos-specific options +and the beginning of additional native arguments and flags for the specific command being run. + +Example: + atmos atlantis generate [subcommand] -s -- + + +Use "atmos atlantis generate [subcommand] --help" for more information about a command. diff --git a/tests/snapshots/TestCLICommands_atmos_atlantis_generate_help.stderr.golden b/tests/snapshots/TestCLICommands_atmos_atlantis_generate_help.stderr.golden new file mode 100644 index 000000000..e69de29bb diff --git a/tests/snapshots/TestCLICommands_atmos_atlantis_generate_help.stdout.golden b/tests/snapshots/TestCLICommands_atmos_atlantis_generate_help.stdout.golden new file mode 100644 index 000000000..68a1188ec --- /dev/null +++ b/tests/snapshots/TestCLICommands_atmos_atlantis_generate_help.stdout.golden @@ -0,0 +1,55 @@ + + +Usage: + + atmos atlantis generate [sub-command] [flags] + + +Available Commands: + + repo-config Generate repository configuration for Atlantis + + +Flags: + + --clone-target-ref Clone the target reference with which to compare + the current branch: atmos atlantis generate + repo-config --affected-only=true + --clone-target-ref=true + The flag is only used when '--affected-only=true' + If set to 'false' (default), the target reference + will be checked out instead + This requires that the target reference is already + cloned by Git, and the information about it exists + in the '.git' directory (default "false") + + -h, --help help for generate (default "false") + + +Global Flags: + + --logs-file string The file to write Atmos logs to. Logs can be + written to any file or any standard file + descriptor, including '/dev/stdout', + '/dev/stderr' and '/dev/null' (default + "/dev/stdout") + + --logs-level string Logs level. Supported log levels are Trace, + Debug, Info, Warning, Off. If the log level + is set to Off, Atmos will not log any + messages (default "Info") + + --redirect-stderr string File descriptor to redirect 'stderr' to. + Errors can be redirected to any file or any + standard file descriptor (including + '/dev/null'): atmos + --redirect-stderr /dev/stdout + +The '--' (double-dash) can be used to signify the end of Atmos-specific options +and the beginning of additional native arguments and flags for the specific command being run. + +Example: + atmos atlantis generate [subcommand] -s -- + + +Use "atmos atlantis generate [subcommand] --help" for more information about a command. diff --git a/tests/snapshots/TestCLICommands_atmos_atlantis_generate_repo-config.stderr.golden b/tests/snapshots/TestCLICommands_atmos_atlantis_generate_repo-config.stderr.golden new file mode 100644 index 000000000..e69de29bb diff --git a/tests/snapshots/TestCLICommands_atmos_atlantis_generate_repo-config.stdout.golden b/tests/snapshots/TestCLICommands_atmos_atlantis_generate_repo-config.stdout.golden new file mode 100644 index 000000000..219bb02fb --- /dev/null +++ b/tests/snapshots/TestCLICommands_atmos_atlantis_generate_repo-config.stdout.golden @@ -0,0 +1,18 @@ + +atmos.yaml CLI config file specifies the directory for Atmos stacks as stacks, +but the directory does not exist. + +To configure and start using Atmos, refer to the following documents: + +Atmos CLI Configuration: +https://atmos.tools/cli/configuration + +Atmos Components: +https://atmos.tools/core-concepts/components + +Atmos Stacks: +https://atmos.tools/core-concepts/stacks + +Quick Start: +https://atmos.tools/quick-start + diff --git a/tests/snapshots/TestCLICommands_atmos_atlantis_generate_repo-config_--help.stderr.golden b/tests/snapshots/TestCLICommands_atmos_atlantis_generate_repo-config_--help.stderr.golden new file mode 100644 index 000000000..e69de29bb diff --git a/tests/snapshots/TestCLICommands_atmos_atlantis_generate_repo-config_--help.stdout.golden b/tests/snapshots/TestCLICommands_atmos_atlantis_generate_repo-config_--help.stdout.golden new file mode 100644 index 000000000..6df1042ce --- /dev/null +++ b/tests/snapshots/TestCLICommands_atmos_atlantis_generate_repo-config_--help.stdout.golden @@ -0,0 +1,139 @@ + + +Usage: + + atmos atlantis generate repo-config [flags] + + +Flags: + + --affected-only Generate Atlantis projects only for the + Atmos components changed between two Git + commits. + atmos atlantis generate repo-config + --affected-only=true (default "false") + + --components string Generate Atlantis projects for the + specified components only (comma-separated + values). + atmos atlantis generate repo-config + --config-template + --project-template + --components , + + --config-template string atmos atlantis generate repo-config + --config-template config-1 + --project-template project-1 + + -h, --help help for repo-config (default "false") + + --output-path string atmos atlantis generate repo-config + --output-path ./atlantis.yaml + --config-template config-1 + --project-template project-1 + + --project-template string atmos atlantis generate repo-config + --config-template config-1 + --project-template project-1 + + --ref string Git reference with which to compare the + current branch: atmos atlantis generate + repo-config --affected-only=true --ref + refs/heads/main. Refer to + https://git-scm.com/book/en/v2/Git-Internals-Git-References + for more details + + --repo-path string Filesystem path to the already cloned + target repository with which to compare the + current branch: atmos atlantis generate + repo-config --affected-only=true + --repo-path + + --sha string Git commit SHA with which to compare the + current branch: atmos atlantis generate + repo-config --affected-only=true --sha + 3a5eafeab90426bd82bf5899896b28cc0bab3073 + + --ssh-key string Path to PEM-encoded private key to clone + private repos using SSH: atmos atlantis + generate repo-config --affected-only=true + --ssh-key + + --ssh-key-password string Encryption password for the PEM-encoded + private key if the key contains a + password-encrypted PEM block: atmos + atlantis generate repo-config + --affected-only=true --ssh-key + --ssh-key-password + + + --stacks string Generate Atlantis projects for the + specified stacks only (comma-separated + values). + atmos atlantis generate repo-config + --config-template + --project-template + --stacks , + The filter can contain the names of the + top-level stack manifests and the logical + stack names (derived from the context vars) + atmos atlantis generate repo-config + --config-template + --project-template + --stacks + orgs/cp/tenant1/staging/us-east-2,orgs/cp/tenant2/dev/us-east-2 + atmos atlantis generate repo-config + --config-template + --project-template + --stacks + tenant1-ue2-staging,tenant1-ue2-prod + atmos atlantis generate repo-config + --config-template + --project-template + --stacks + orgs/cp/tenant1/staging/us-east-2,tenant1-ue2-prod + + --verbose Print more detailed output when cloning and + checking out the Git repository: atmos + atlantis generate repo-config + --affected-only=true --verbose=true + (default "false") + + +Global Flags: + + --clone-target-ref Clone the target reference with which to + compare the current branch: atmos atlantis + generate repo-config --affected-only=true + --clone-target-ref=true + The flag is only used when + '--affected-only=true' + If set to 'false' (default), the target + reference will be checked out instead + This requires that the target reference is + already cloned by Git, and the information + about it exists in the '.git' directory + (default "false") + + --logs-file string The file to write Atmos logs to. Logs can be + written to any file or any standard file + descriptor, including '/dev/stdout', + '/dev/stderr' and '/dev/null' (default + "/dev/stdout") + + --logs-level string Logs level. Supported log levels are Trace, + Debug, Info, Warning, Off. If the log level + is set to Off, Atmos will not log any + messages (default "Info") + + --redirect-stderr string File descriptor to redirect 'stderr' to. + Errors can be redirected to any file or any + standard file descriptor (including + '/dev/null'): atmos + --redirect-stderr /dev/stdout + +The '--' (double-dash) can be used to signify the end of Atmos-specific options +and the beginning of additional native arguments and flags for the specific command being run. + +Example: + atmos atlantis generate repo-config -s -- diff --git a/tests/snapshots/TestCLICommands_atmos_atlantis_generate_repo-config_help.stderr.golden b/tests/snapshots/TestCLICommands_atmos_atlantis_generate_repo-config_help.stderr.golden new file mode 100644 index 000000000..e69de29bb diff --git a/tests/snapshots/TestCLICommands_atmos_atlantis_generate_repo-config_help.stdout.golden b/tests/snapshots/TestCLICommands_atmos_atlantis_generate_repo-config_help.stdout.golden new file mode 100644 index 000000000..6df1042ce --- /dev/null +++ b/tests/snapshots/TestCLICommands_atmos_atlantis_generate_repo-config_help.stdout.golden @@ -0,0 +1,139 @@ + + +Usage: + + atmos atlantis generate repo-config [flags] + + +Flags: + + --affected-only Generate Atlantis projects only for the + Atmos components changed between two Git + commits. + atmos atlantis generate repo-config + --affected-only=true (default "false") + + --components string Generate Atlantis projects for the + specified components only (comma-separated + values). + atmos atlantis generate repo-config + --config-template + --project-template + --components , + + --config-template string atmos atlantis generate repo-config + --config-template config-1 + --project-template project-1 + + -h, --help help for repo-config (default "false") + + --output-path string atmos atlantis generate repo-config + --output-path ./atlantis.yaml + --config-template config-1 + --project-template project-1 + + --project-template string atmos atlantis generate repo-config + --config-template config-1 + --project-template project-1 + + --ref string Git reference with which to compare the + current branch: atmos atlantis generate + repo-config --affected-only=true --ref + refs/heads/main. Refer to + https://git-scm.com/book/en/v2/Git-Internals-Git-References + for more details + + --repo-path string Filesystem path to the already cloned + target repository with which to compare the + current branch: atmos atlantis generate + repo-config --affected-only=true + --repo-path + + --sha string Git commit SHA with which to compare the + current branch: atmos atlantis generate + repo-config --affected-only=true --sha + 3a5eafeab90426bd82bf5899896b28cc0bab3073 + + --ssh-key string Path to PEM-encoded private key to clone + private repos using SSH: atmos atlantis + generate repo-config --affected-only=true + --ssh-key + + --ssh-key-password string Encryption password for the PEM-encoded + private key if the key contains a + password-encrypted PEM block: atmos + atlantis generate repo-config + --affected-only=true --ssh-key + --ssh-key-password + + + --stacks string Generate Atlantis projects for the + specified stacks only (comma-separated + values). + atmos atlantis generate repo-config + --config-template + --project-template + --stacks , + The filter can contain the names of the + top-level stack manifests and the logical + stack names (derived from the context vars) + atmos atlantis generate repo-config + --config-template + --project-template + --stacks + orgs/cp/tenant1/staging/us-east-2,orgs/cp/tenant2/dev/us-east-2 + atmos atlantis generate repo-config + --config-template + --project-template + --stacks + tenant1-ue2-staging,tenant1-ue2-prod + atmos atlantis generate repo-config + --config-template + --project-template + --stacks + orgs/cp/tenant1/staging/us-east-2,tenant1-ue2-prod + + --verbose Print more detailed output when cloning and + checking out the Git repository: atmos + atlantis generate repo-config + --affected-only=true --verbose=true + (default "false") + + +Global Flags: + + --clone-target-ref Clone the target reference with which to + compare the current branch: atmos atlantis + generate repo-config --affected-only=true + --clone-target-ref=true + The flag is only used when + '--affected-only=true' + If set to 'false' (default), the target + reference will be checked out instead + This requires that the target reference is + already cloned by Git, and the information + about it exists in the '.git' directory + (default "false") + + --logs-file string The file to write Atmos logs to. Logs can be + written to any file or any standard file + descriptor, including '/dev/stdout', + '/dev/stderr' and '/dev/null' (default + "/dev/stdout") + + --logs-level string Logs level. Supported log levels are Trace, + Debug, Info, Warning, Off. If the log level + is set to Off, Atmos will not log any + messages (default "Info") + + --redirect-stderr string File descriptor to redirect 'stderr' to. + Errors can be redirected to any file or any + standard file descriptor (including + '/dev/null'): atmos + --redirect-stderr /dev/stdout + +The '--' (double-dash) can be used to signify the end of Atmos-specific options +and the beginning of additional native arguments and flags for the specific command being run. + +Example: + atmos atlantis generate repo-config -s -- diff --git a/tests/snapshots/TestCLICommands_atmos_atlantis_generate_repo-config_non-existant.stderr.golden b/tests/snapshots/TestCLICommands_atmos_atlantis_generate_repo-config_non-existant.stderr.golden new file mode 100644 index 000000000..9a5366b58 --- /dev/null +++ b/tests/snapshots/TestCLICommands_atmos_atlantis_generate_repo-config_non-existant.stderr.golden @@ -0,0 +1,2 @@ +Error: Unknown command "non-existant" for "atmos atlantis generate repo-config" + diff --git a/tests/snapshots/TestCLICommands_atmos_atlantis_generate_repo-config_non-existant.stdout.golden b/tests/snapshots/TestCLICommands_atmos_atlantis_generate_repo-config_non-existant.stdout.golden new file mode 100644 index 000000000..418a741ad --- /dev/null +++ b/tests/snapshots/TestCLICommands_atmos_atlantis_generate_repo-config_non-existant.stdout.golden @@ -0,0 +1,3 @@ +No valid subcommands found + +Run 'atmos atlantis generate repo-config --help' for usage diff --git a/tests/snapshots/TestCLICommands_atmos_atlantis_help.stderr.golden b/tests/snapshots/TestCLICommands_atmos_atlantis_help.stderr.golden new file mode 100644 index 000000000..e69de29bb diff --git a/tests/snapshots/TestCLICommands_atmos_atlantis_help.stdout.golden b/tests/snapshots/TestCLICommands_atmos_atlantis_help.stdout.golden new file mode 100644 index 000000000..d557b25c4 --- /dev/null +++ b/tests/snapshots/TestCLICommands_atmos_atlantis_help.stdout.golden @@ -0,0 +1,44 @@ + + +Usage: + + atmos atlantis [sub-command] [flags] + + +Available Commands: + + generate Generate Atlantis configuration files + + +Flags: + + -h, --help help for atlantis (default "false") + + +Global Flags: + + --logs-file string The file to write Atmos logs to. Logs can be + written to any file or any standard file + descriptor, including '/dev/stdout', + '/dev/stderr' and '/dev/null' (default + "/dev/stdout") + + --logs-level string Logs level. Supported log levels are Trace, + Debug, Info, Warning, Off. If the log level + is set to Off, Atmos will not log any + messages (default "Info") + + --redirect-stderr string File descriptor to redirect 'stderr' to. + Errors can be redirected to any file or any + standard file descriptor (including + '/dev/null'): atmos + --redirect-stderr /dev/stdout + +The '--' (double-dash) can be used to signify the end of Atmos-specific options +and the beginning of additional native arguments and flags for the specific command being run. + +Example: + atmos atlantis [subcommand] -s -- + + +Use "atmos atlantis [subcommand] --help" for more information about a command. diff --git a/tests/snapshots/TestCLICommands_atmos_helmfile.stderr.golden b/tests/snapshots/TestCLICommands_atmos_helmfile.stderr.golden new file mode 100644 index 000000000..9334d903c --- /dev/null +++ b/tests/snapshots/TestCLICommands_atmos_helmfile.stderr.golden @@ -0,0 +1,2 @@ +Error: Unknown command: "atmos helmfile" + diff --git a/tests/snapshots/TestCLICommands_atmos_helmfile.stdout.golden b/tests/snapshots/TestCLICommands_atmos_helmfile.stdout.golden new file mode 100644 index 000000000..38666a97e --- /dev/null +++ b/tests/snapshots/TestCLICommands_atmos_helmfile.stdout.golden @@ -0,0 +1,8 @@ +Valid subcommands are: + apply + destroy + diff + generate + sync + +Run 'atmos helmfile --help' for usage diff --git a/tests/snapshots/TestCLICommands_atmos_helmfile_--help.stderr.golden b/tests/snapshots/TestCLICommands_atmos_helmfile_--help.stderr.golden new file mode 100644 index 000000000..e69de29bb diff --git a/tests/snapshots/TestCLICommands_atmos_helmfile_--help.stdout.golden b/tests/snapshots/TestCLICommands_atmos_helmfile_--help.stdout.golden new file mode 100644 index 000000000..37158506a --- /dev/null +++ b/tests/snapshots/TestCLICommands_atmos_helmfile_--help.stdout.golden @@ -0,0 +1,55 @@ + + +Usage: + + atmos helmfile [sub-command] [flags] + +Aliases: + + helmfile, hf + + +Available Commands: + + apply Apply changes to align the actual state of Helm releases with the desired state. + destroy Destroy the Helm releases for the specified stack. + diff Show differences between the desired and actual state of Helm releases. + generate Generate configurations for Helmfile components + sync Synchronize the state of Helm releases with the desired state without making changes. + + +Flags: + + -h, --help help for helmfile (default "false") + + -s, --stack string atmos helmfile -s + + + +Global Flags: + + --logs-file string The file to write Atmos logs to. Logs can be + written to any file or any standard file + descriptor, including '/dev/stdout', + '/dev/stderr' and '/dev/null' (default + "/dev/stdout") + + --logs-level string Logs level. Supported log levels are Trace, + Debug, Info, Warning, Off. If the log level + is set to Off, Atmos will not log any + messages (default "Info") + + --redirect-stderr string File descriptor to redirect 'stderr' to. + Errors can be redirected to any file or any + standard file descriptor (including + '/dev/null'): atmos + --redirect-stderr /dev/stdout + +The '--' (double-dash) can be used to signify the end of Atmos-specific options +and the beginning of additional native arguments and flags for the specific command being run. + +Example: + atmos helmfile [subcommand] -s -- + + +Use "atmos helmfile [subcommand] --help" for more information about a command. diff --git a/tests/snapshots/TestCLICommands_atmos_helmfile_apply.stderr.golden b/tests/snapshots/TestCLICommands_atmos_helmfile_apply.stderr.golden new file mode 100644 index 000000000..4a566d55e --- /dev/null +++ b/tests/snapshots/TestCLICommands_atmos_helmfile_apply.stderr.golden @@ -0,0 +1 @@ +'stack' is required. Usage: atmos helmfile -s diff --git a/tests/snapshots/TestCLICommands_atmos_helmfile_apply.stdout.golden b/tests/snapshots/TestCLICommands_atmos_helmfile_apply.stdout.golden new file mode 100644 index 000000000..e69de29bb diff --git a/tests/snapshots/TestCLICommands_atmos_helmfile_apply_--help.stderr.golden b/tests/snapshots/TestCLICommands_atmos_helmfile_apply_--help.stderr.golden new file mode 100644 index 000000000..e69de29bb diff --git a/tests/snapshots/TestCLICommands_atmos_helmfile_apply_--help.stdout.golden b/tests/snapshots/TestCLICommands_atmos_helmfile_apply_--help.stdout.golden new file mode 100644 index 000000000..bb3fe72a5 --- /dev/null +++ b/tests/snapshots/TestCLICommands_atmos_helmfile_apply_--help.stdout.golden @@ -0,0 +1,39 @@ + + +Usage: + + atmos helmfile apply [flags] + + +Flags: + + -h, --help help for apply (default "false") + + +Global Flags: + + --logs-file string The file to write Atmos logs to. Logs can be + written to any file or any standard file + descriptor, including '/dev/stdout', + '/dev/stderr' and '/dev/null' (default + "/dev/stdout") + + --logs-level string Logs level. Supported log levels are Trace, + Debug, Info, Warning, Off. If the log level + is set to Off, Atmos will not log any + messages (default "Info") + + --redirect-stderr string File descriptor to redirect 'stderr' to. + Errors can be redirected to any file or any + standard file descriptor (including + '/dev/null'): atmos + --redirect-stderr /dev/stdout + + -s, --stack string atmos helmfile + -s + +The '--' (double-dash) can be used to signify the end of Atmos-specific options +and the beginning of additional native arguments and flags for the specific command being run. + +Example: + atmos helmfile apply -s -- diff --git a/tests/snapshots/TestCLICommands_atmos_helmfile_apply_help.stderr.golden b/tests/snapshots/TestCLICommands_atmos_helmfile_apply_help.stderr.golden new file mode 100644 index 000000000..e69de29bb diff --git a/tests/snapshots/TestCLICommands_atmos_helmfile_apply_help.stdout.golden b/tests/snapshots/TestCLICommands_atmos_helmfile_apply_help.stdout.golden new file mode 100644 index 000000000..bb3fe72a5 --- /dev/null +++ b/tests/snapshots/TestCLICommands_atmos_helmfile_apply_help.stdout.golden @@ -0,0 +1,39 @@ + + +Usage: + + atmos helmfile apply [flags] + + +Flags: + + -h, --help help for apply (default "false") + + +Global Flags: + + --logs-file string The file to write Atmos logs to. Logs can be + written to any file or any standard file + descriptor, including '/dev/stdout', + '/dev/stderr' and '/dev/null' (default + "/dev/stdout") + + --logs-level string Logs level. Supported log levels are Trace, + Debug, Info, Warning, Off. If the log level + is set to Off, Atmos will not log any + messages (default "Info") + + --redirect-stderr string File descriptor to redirect 'stderr' to. + Errors can be redirected to any file or any + standard file descriptor (including + '/dev/null'): atmos + --redirect-stderr /dev/stdout + + -s, --stack string atmos helmfile + -s + +The '--' (double-dash) can be used to signify the end of Atmos-specific options +and the beginning of additional native arguments and flags for the specific command being run. + +Example: + atmos helmfile apply -s -- diff --git a/tests/snapshots/TestCLICommands_atmos_helmfile_apply_non-existant.stderr.golden b/tests/snapshots/TestCLICommands_atmos_helmfile_apply_non-existant.stderr.golden new file mode 100644 index 000000000..e69de29bb diff --git a/tests/snapshots/TestCLICommands_atmos_helmfile_apply_non-existant.stdout.golden b/tests/snapshots/TestCLICommands_atmos_helmfile_apply_non-existant.stdout.golden new file mode 100644 index 000000000..219bb02fb --- /dev/null +++ b/tests/snapshots/TestCLICommands_atmos_helmfile_apply_non-existant.stdout.golden @@ -0,0 +1,18 @@ + +atmos.yaml CLI config file specifies the directory for Atmos stacks as stacks, +but the directory does not exist. + +To configure and start using Atmos, refer to the following documents: + +Atmos CLI Configuration: +https://atmos.tools/cli/configuration + +Atmos Components: +https://atmos.tools/core-concepts/components + +Atmos Stacks: +https://atmos.tools/core-concepts/stacks + +Quick Start: +https://atmos.tools/quick-start + diff --git a/tests/snapshots/TestCLICommands_atmos_helmfile_help.stderr.golden b/tests/snapshots/TestCLICommands_atmos_helmfile_help.stderr.golden new file mode 100644 index 000000000..e69de29bb diff --git a/tests/snapshots/TestCLICommands_atmos_helmfile_help.stdout.golden b/tests/snapshots/TestCLICommands_atmos_helmfile_help.stdout.golden new file mode 100644 index 000000000..37158506a --- /dev/null +++ b/tests/snapshots/TestCLICommands_atmos_helmfile_help.stdout.golden @@ -0,0 +1,55 @@ + + +Usage: + + atmos helmfile [sub-command] [flags] + +Aliases: + + helmfile, hf + + +Available Commands: + + apply Apply changes to align the actual state of Helm releases with the desired state. + destroy Destroy the Helm releases for the specified stack. + diff Show differences between the desired and actual state of Helm releases. + generate Generate configurations for Helmfile components + sync Synchronize the state of Helm releases with the desired state without making changes. + + +Flags: + + -h, --help help for helmfile (default "false") + + -s, --stack string atmos helmfile -s + + + +Global Flags: + + --logs-file string The file to write Atmos logs to. Logs can be + written to any file or any standard file + descriptor, including '/dev/stdout', + '/dev/stderr' and '/dev/null' (default + "/dev/stdout") + + --logs-level string Logs level. Supported log levels are Trace, + Debug, Info, Warning, Off. If the log level + is set to Off, Atmos will not log any + messages (default "Info") + + --redirect-stderr string File descriptor to redirect 'stderr' to. + Errors can be redirected to any file or any + standard file descriptor (including + '/dev/null'): atmos + --redirect-stderr /dev/stdout + +The '--' (double-dash) can be used to signify the end of Atmos-specific options +and the beginning of additional native arguments and flags for the specific command being run. + +Example: + atmos helmfile [subcommand] -s -- + + +Use "atmos helmfile [subcommand] --help" for more information about a command. diff --git a/tests/snapshots/TestCLICommands_atmos_helmfile_non-existant.stderr.golden b/tests/snapshots/TestCLICommands_atmos_helmfile_non-existant.stderr.golden new file mode 100644 index 000000000..a1ba4f1a1 --- /dev/null +++ b/tests/snapshots/TestCLICommands_atmos_helmfile_non-existant.stderr.golden @@ -0,0 +1,2 @@ +Error: Unknown command "non-existant" for "atmos helmfile" + diff --git a/tests/snapshots/TestCLICommands_atmos_helmfile_non-existant.stdout.golden b/tests/snapshots/TestCLICommands_atmos_helmfile_non-existant.stdout.golden new file mode 100644 index 000000000..38666a97e --- /dev/null +++ b/tests/snapshots/TestCLICommands_atmos_helmfile_non-existant.stdout.golden @@ -0,0 +1,8 @@ +Valid subcommands are: + apply + destroy + diff + generate + sync + +Run 'atmos helmfile --help' for usage diff --git a/tests/snapshots/TestCLICommands_atmos_non-existent.stderr.golden b/tests/snapshots/TestCLICommands_atmos_non-existent.stderr.golden index cdf2b3ad8..76adc7c0e 100644 --- a/tests/snapshots/TestCLICommands_atmos_non-existent.stderr.golden +++ b/tests/snapshots/TestCLICommands_atmos_non-existent.stderr.golden @@ -1,3 +1,2 @@ -Error: unknown command "non-existent" for "atmos" -Run 'atmos --help' for usage. -unknown command "non-existent" for "atmos" +Error: Unknown command "non-existent" for "atmos" + diff --git a/tests/snapshots/TestCLICommands_atmos_non-existent.stdout.golden b/tests/snapshots/TestCLICommands_atmos_non-existent.stdout.golden index e69de29bb..5d3c0b07f 100644 --- a/tests/snapshots/TestCLICommands_atmos_non-existent.stdout.golden +++ b/tests/snapshots/TestCLICommands_atmos_non-existent.stdout.golden @@ -0,0 +1,21 @@ +Valid subcommands are: + about + atlantis + aws + completion + describe + docs + helmfile + help + list + pro + show + support + terraform + tf + validate + vendor + version + workflow + +Run 'atmos --help' for usage diff --git a/tests/snapshots/TestCLICommands_atmos_terraform.stderr.golden b/tests/snapshots/TestCLICommands_atmos_terraform.stderr.golden new file mode 100644 index 000000000..1b53ce83a --- /dev/null +++ b/tests/snapshots/TestCLICommands_atmos_terraform.stderr.golden @@ -0,0 +1,2 @@ +Error: Unknown command: "atmos terraform" + diff --git a/tests/snapshots/TestCLICommands_atmos_terraform.stdout.golden b/tests/snapshots/TestCLICommands_atmos_terraform.stdout.golden new file mode 100644 index 000000000..e2de0a1d0 --- /dev/null +++ b/tests/snapshots/TestCLICommands_atmos_terraform.stdout.golden @@ -0,0 +1,34 @@ +Valid subcommands are: + apply + clean + console + deploy + destroy + fmt + force-unlock + generate + get + graph + import + init + login + logout + metadata + modules + output + plan + providers + refresh + shell + show + state + taint + test + untaint + validate + varfile + version + workspace + write + +Run 'atmos terraform --help' for usage diff --git a/tests/snapshots/TestCLICommands_atmos_terraform_apply_--help.stderr.golden b/tests/snapshots/TestCLICommands_atmos_terraform_apply_--help.stderr.golden new file mode 100644 index 000000000..e69de29bb diff --git a/tests/snapshots/TestCLICommands_atmos_terraform_apply_--help.stdout.golden b/tests/snapshots/TestCLICommands_atmos_terraform_apply_--help.stdout.golden new file mode 100644 index 000000000..50dac239e --- /dev/null +++ b/tests/snapshots/TestCLICommands_atmos_terraform_apply_--help.stdout.golden @@ -0,0 +1,59 @@ + + +Usage: + + atmos terraform apply [flags] + + +Examples: + +atmos terraform apply -s + + +Flags: + + --from-plan If set atmos will use the previously generated plan + file (default "false") + + -h, --help help for apply (default "false") + + --planfile string Set the plan file to use + + +Global Flags: + + --append-user-agent string Sets the TF_APPEND_USER_AGENT environment + variable to customize the User-Agent + string in Terraform provider requests. + Example: 'Atmos/%s (Cloud Posse; + +https://atmos.tools)'. This flag works + with almost all commands. + + --logs-file string The file to write Atmos logs to. Logs can + be written to any file or any standard + file descriptor, including '/dev/stdout', + '/dev/stderr' and '/dev/null' (default + "/dev/stdout") + + --logs-level string Logs level. Supported log levels are + Trace, Debug, Info, Warning, Off. If the + log level is set to Off, Atmos will not + log any messages (default "Info") + + --redirect-stderr string File descriptor to redirect 'stderr' to. + Errors can be redirected to any file or + any standard file descriptor (including + '/dev/null'): atmos + --redirect-stderr /dev/stdout + + --skip-init Skip running 'terraform init' before + executing the command (default "false") + + -s, --stack string atmos terraform + -s + +The '--' (double-dash) can be used to signify the end of Atmos-specific options +and the beginning of additional native arguments and flags for the specific command being run. + +Example: + atmos terraform apply -s -- diff --git a/tests/snapshots/TestCLICommands_atmos_terraform_apply_help.stderr.golden b/tests/snapshots/TestCLICommands_atmos_terraform_apply_help.stderr.golden new file mode 100644 index 000000000..e69de29bb diff --git a/tests/snapshots/TestCLICommands_atmos_terraform_apply_help.stdout.golden b/tests/snapshots/TestCLICommands_atmos_terraform_apply_help.stdout.golden new file mode 100644 index 000000000..50dac239e --- /dev/null +++ b/tests/snapshots/TestCLICommands_atmos_terraform_apply_help.stdout.golden @@ -0,0 +1,59 @@ + + +Usage: + + atmos terraform apply [flags] + + +Examples: + +atmos terraform apply -s + + +Flags: + + --from-plan If set atmos will use the previously generated plan + file (default "false") + + -h, --help help for apply (default "false") + + --planfile string Set the plan file to use + + +Global Flags: + + --append-user-agent string Sets the TF_APPEND_USER_AGENT environment + variable to customize the User-Agent + string in Terraform provider requests. + Example: 'Atmos/%s (Cloud Posse; + +https://atmos.tools)'. This flag works + with almost all commands. + + --logs-file string The file to write Atmos logs to. Logs can + be written to any file or any standard + file descriptor, including '/dev/stdout', + '/dev/stderr' and '/dev/null' (default + "/dev/stdout") + + --logs-level string Logs level. Supported log levels are + Trace, Debug, Info, Warning, Off. If the + log level is set to Off, Atmos will not + log any messages (default "Info") + + --redirect-stderr string File descriptor to redirect 'stderr' to. + Errors can be redirected to any file or + any standard file descriptor (including + '/dev/null'): atmos + --redirect-stderr /dev/stdout + + --skip-init Skip running 'terraform init' before + executing the command (default "false") + + -s, --stack string atmos terraform + -s + +The '--' (double-dash) can be used to signify the end of Atmos-specific options +and the beginning of additional native arguments and flags for the specific command being run. + +Example: + atmos terraform apply -s -- diff --git a/tests/snapshots/TestCLICommands_atmos_terraform_help.stderr.golden b/tests/snapshots/TestCLICommands_atmos_terraform_help.stderr.golden new file mode 100644 index 000000000..e69de29bb diff --git a/tests/snapshots/TestCLICommands_atmos_terraform_help.stdout.golden b/tests/snapshots/TestCLICommands_atmos_terraform_help.stdout.golden new file mode 100644 index 000000000..c77745dbc --- /dev/null +++ b/tests/snapshots/TestCLICommands_atmos_terraform_help.stdout.golden @@ -0,0 +1,94 @@ + + +Usage: + + atmos terraform [sub-command] [flags] + +Aliases: + + terraform, tf + + +Available Commands: + + clean Clean up Terraform state and artifacts. + deploy Deploy the specified infrastructure using Terraform + generate Generate Terraform configuration files for Atmos components and stacks. + shell Configure an environment for an Atmos component and start a new shell. + varfile Load variables from a file + write Write variables to a file + +Native terraform Commands: + + apply Apply changes to infrastructure + console Try Terraform expressions at an interactive command prompt + destroy Destroy previously-created infrastructure + fmt Reformat your configuration in the standard style + force-unlock Release a stuck lock on the current workspace + get Install or upgrade remote Terraform modules + graph Generate a Graphviz graph of the steps in an operation + import Import existing infrastructure into Terraform state. + init Prepare your working directory for other commands + login Obtain and save credentials for a remote host + logout Remove locally-stored credentials for a remote host + metadata Metadata related commands + modules Show all declared modules in a working directory + output Show output values from your root module + plan Show changes required by the current configuration + providers Show the providers required for this configuration + refresh Update the state to match remote systems + show Show the current state or a saved plan + state Advanced state management + taint Mark a resource instance as not fully functional + test Execute integration tests for Terraform modules + untaint Remove the 'tainted' state from a resource instance + validate Check whether the configuration is valid + version Show the current Terraform version + workspace Manage Terraform workspaces + + +Flags: + + --append-user-agent string Sets the TF_APPEND_USER_AGENT environment + variable to customize the User-Agent + string in Terraform provider requests. + Example: 'Atmos/%s (Cloud Posse; + +https://atmos.tools)'. This flag works + with almost all commands. + + -h, --help help for terraform (default "false") + + --skip-init Skip running 'terraform init' before + executing the command (default "false") + + -s, --stack string atmos terraform + -s + + +Global Flags: + + --logs-file string The file to write Atmos logs to. Logs can be + written to any file or any standard file + descriptor, including '/dev/stdout', + '/dev/stderr' and '/dev/null' (default + "/dev/stdout") + + --logs-level string Logs level. Supported log levels are Trace, + Debug, Info, Warning, Off. If the log level + is set to Off, Atmos will not log any + messages (default "Info") + + --redirect-stderr string File descriptor to redirect 'stderr' to. + Errors can be redirected to any file or any + standard file descriptor (including + '/dev/null'): atmos + --redirect-stderr /dev/stdout + +The '--' (double-dash) can be used to signify the end of Atmos-specific options +and the beginning of additional native arguments and flags for the specific command being run. + +Example: + atmos terraform [subcommand] -s -- + + +Use "atmos terraform [subcommand] --help" for more information about a command. diff --git a/tests/snapshots/TestCLICommands_atmos_terraform_non-existent.stderr.golden b/tests/snapshots/TestCLICommands_atmos_terraform_non-existent.stderr.golden new file mode 100644 index 000000000..7615a96b2 --- /dev/null +++ b/tests/snapshots/TestCLICommands_atmos_terraform_non-existent.stderr.golden @@ -0,0 +1,2 @@ +Error: Unknown command "non-existent" for "atmos terraform" + diff --git a/tests/snapshots/TestCLICommands_atmos_terraform_non-existent.stdout.golden b/tests/snapshots/TestCLICommands_atmos_terraform_non-existent.stdout.golden new file mode 100644 index 000000000..1634bdb72 --- /dev/null +++ b/tests/snapshots/TestCLICommands_atmos_terraform_non-existent.stdout.golden @@ -0,0 +1,35 @@ +Valid subcommands are: + apply + clean + console + deploy + destroy + fmt + force-unlock + generate + get + graph + import + init + login + logout + metadata + modules + output + plan + providers + provision + refresh + shell + show + state + taint + test + untaint + validate + varfile + version + workspace + write + +Run 'atmos terraform --help' for usage diff --git a/tests/snapshots/TestCLICommands_atmos_terraform_plan_non-existent_in_non_workspace.stderr.golden b/tests/snapshots/TestCLICommands_atmos_terraform_plan_non-existent_in_non_workspace.stderr.golden new file mode 100644 index 000000000..e69de29bb diff --git a/tests/snapshots/TestCLICommands_atmos_terraform_plan_non-existent_in_non_workspace.stdout.golden b/tests/snapshots/TestCLICommands_atmos_terraform_plan_non-existent_in_non_workspace.stdout.golden new file mode 100644 index 000000000..219bb02fb --- /dev/null +++ b/tests/snapshots/TestCLICommands_atmos_terraform_plan_non-existent_in_non_workspace.stdout.golden @@ -0,0 +1,18 @@ + +atmos.yaml CLI config file specifies the directory for Atmos stacks as stacks, +but the directory does not exist. + +To configure and start using Atmos, refer to the following documents: + +Atmos CLI Configuration: +https://atmos.tools/cli/configuration + +Atmos Components: +https://atmos.tools/core-concepts/components + +Atmos Stacks: +https://atmos.tools/core-concepts/stacks + +Quick Start: +https://atmos.tools/quick-start + diff --git a/tests/snapshots/TestCLICommands_atmos_terraform_plan_non-existent_in_workspace.stderr.golden b/tests/snapshots/TestCLICommands_atmos_terraform_plan_non-existent_in_workspace.stderr.golden new file mode 100644 index 000000000..817dd5d4f --- /dev/null +++ b/tests/snapshots/TestCLICommands_atmos_terraform_plan_non-existent_in_workspace.stderr.golden @@ -0,0 +1 @@ +'stack' is required. Usage: atmos terraform -s diff --git a/tests/snapshots/TestCLICommands_atmos_terraform_plan_non-existent_in_workspace.stdout.golden b/tests/snapshots/TestCLICommands_atmos_terraform_plan_non-existent_in_workspace.stdout.golden new file mode 100644 index 000000000..e69de29bb diff --git a/tests/test-cases/core.yaml b/tests/test-cases/core.yaml index cdbc9bb7c..d7465bad6 100644 --- a/tests/test-cases/core.yaml +++ b/tests/test-cases/core.yaml @@ -77,17 +77,3 @@ tests: exit_code: 0 stderr: - "^$" - - name: atmos terraform non-existent - enabled: false - snapshot: true - description: "Ensure atmos CLI returns an error for a non-existent command." - workdir: "../" - command: "atmos" - args: - - "terraform" - - "non-existent" - expect: - diff: [] - stderr: - - 'unknown command "non-existent" for "atmos"' - exit_code: 1 diff --git a/tests/test-cases/help-and-usage.yaml b/tests/test-cases/help-and-usage.yaml index 31137ea4c..3670be2d3 100644 --- a/tests/test-cases/help-and-usage.yaml +++ b/tests/test-cases/help-and-usage.yaml @@ -1,6 +1,8 @@ tests: - name: atmos non-existent enabled: true + snapshot: true + diff: [] description: "Ensure atmos CLI returns an error for a non-existent command." workdir: "../" command: "atmos" @@ -12,6 +14,8 @@ tests: exit_code: 1 - name: atmos --help enabled: true + snapshot: true + diff: [] description: "Ensure atmos CLI help command lists available commands." workdir: "./" command: "atmos" @@ -57,6 +61,8 @@ tests: exit_code: 1 - name: atmos terraform enabled: true + snapshot: true + diff: [] description: "Ensure atmos terraform cli shows usage command" workdir: "./" command: "atmos" @@ -73,6 +79,8 @@ tests: exit_code: 1 - name: atmos terraform help enabled: true + snapshot: true + diff: [] description: "Ensure 'atmos terraform help' shows help output" workdir: "./" command: "atmos" @@ -103,6 +111,8 @@ tests: exit_code: 0 - name: atmos terraform apply --help enabled: true + snapshot: true + diff: [] description: "Ensure atmos terraform apply --help shows help output" workdir: "./" command: "atmos" @@ -120,6 +130,8 @@ tests: exit_code: 0 - name: atmos terraform apply help enabled: true + snapshot: true + diff: [] description: "Ensure atmos terraform help shows help output" workdir: "./" command: "atmos" @@ -137,6 +149,8 @@ tests: exit_code: 0 - name: atmos terraform non-existent enabled: true + snapshot: true + diff: [] description: "Ensure atmos terraform CLI returns an error for a non-existent command." workdir: "../" command: "atmos" @@ -149,6 +163,8 @@ tests: exit_code: 1 - name: atmos terraform plan non-existent in non workspace enabled: true + snapshot: true + diff: [] description: "Ensure atmos terraform CLI returns an error for a non-existent command in non existing workspace." workdir: "../" command: "atmos" @@ -163,6 +179,8 @@ tests: exit_code: 1 - name: atmos terraform plan non-existent in workspace enabled: true + snapshot: true + diff: [] description: "Ensure atmos terraform CLI returns an error for a non-existent command in existing workspace." workdir: "../examples/quick-start-simple" command: "atmos" @@ -176,6 +194,8 @@ tests: exit_code: 1 - name: atmos helmfile enabled: true + snapshot: true + diff: [] description: "Should show usage for helmfile" workdir: "../" command: "atmos" @@ -191,6 +211,8 @@ tests: exit_code: 1 - name: atmos helmfile non-existant enabled: true + snapshot: true + diff: [] description: "Should show usage for helmfile and non-existant subcommand" workdir: "../" command: "atmos" @@ -207,6 +229,8 @@ tests: exit_code: 1 - name: atmos helmfile help enabled: true + snapshot: true + diff: [] description: "Should show help for helmfile" workdir: "../" command: "atmos" @@ -221,6 +245,8 @@ tests: exit_code: 0 - name: atmos helmfile --help enabled: true + snapshot: true + diff: [] description: "Should show help for helmfile when using help flag" workdir: "../" command: "atmos" @@ -235,6 +261,8 @@ tests: exit_code: 0 - name: atmos helmfile apply non-existant enabled: true + snapshot: true + diff: [] description: "Should show error in non atmos workspace" workdir: "../" command: "atmos" @@ -249,6 +277,8 @@ tests: exit_code: 1 - name: atmos helmfile apply enabled: true + snapshot: true + diff: [] description: "Should show error in atmos workspace" workdir: "../examples/demo-helmfile" command: "atmos" @@ -261,6 +291,8 @@ tests: exit_code: 1 - name: atmos helmfile apply help enabled: true + snapshot: true + diff: [] description: "Should show help for atmos helmfile apply" workdir: "../" command: "atmos" @@ -275,6 +307,8 @@ tests: exit_code: 0 - name: atmos helmfile apply --help enabled: true + snapshot: true + diff: [] description: "Should show help for atmos helmfile apply --help" workdir: "../" command: "atmos" @@ -289,6 +323,8 @@ tests: exit_code: 0 - name: atmos atlantis enabled: true + snapshot: true + diff: [] description: "Should show usage atmos atlantis" workdir: "../" command: "atmos" @@ -300,6 +336,8 @@ tests: exit_code: 1 - name: atmos atlantis help enabled: true + snapshot: true + diff: [] description: "Should show help 'atmos atlantis help'" workdir: "../" command: "atmos" @@ -313,6 +351,8 @@ tests: exit_code: 0 - name: atmos atlantis --help enabled: true + snapshot: true + diff: [] description: "Should show help 'atmos atlantis --help'" workdir: "../" command: "atmos" @@ -327,6 +367,8 @@ tests: - name: atmos atlantis generate enabled: true + snapshot: true + diff: [] description: "Should show usage atmos atlantis" workdir: "../" command: "atmos" @@ -339,6 +381,8 @@ tests: exit_code: 1 - name: atmos atlantis generate help enabled: true + snapshot: true + diff: [] description: "Should show help 'atmos atlantis generate help'" workdir: "../" command: "atmos" @@ -353,6 +397,8 @@ tests: exit_code: 0 - name: atmos atlantis generate --help enabled: true + snapshot: true + diff: [] description: "Should show help 'atmos atlantis --help'" workdir: "../" command: "atmos" @@ -367,6 +413,8 @@ tests: exit_code: 0 - name: atmos atlantis generate repo-config enabled: true + snapshot: true + diff: [] description: "Should show config missing in non atmos workspace 'atmos atlantis generate repo-config'" workdir: "../" command: "atmos" @@ -383,6 +431,8 @@ tests: exit_code: 1 - name: atmos atlantis generate repo-config help enabled: true + snapshot: true + diff: [] description: "Should show help for 'atmos atlantis generate repo-config help'" workdir: "../" command: "atmos" @@ -401,6 +451,8 @@ tests: exit_code: 0 - name: atmos atlantis generate repo-config --help enabled: true + snapshot: true + diff: [] description: "Should show help for 'atmos atlantis generate repo-config --help'" workdir: "../" command: "atmos" @@ -419,6 +471,8 @@ tests: exit_code: 0 - name: atmos atlantis generate repo-config non-existant enabled: true + snapshot: true + diff: [] description: "Should show usage for 'atmos atlantis generate repo-config non-existant'" workdir: "../" command: "atmos" @@ -470,4 +524,27 @@ tests: - "non-existant" expect: exit_code: 1 - + - name: atmos about non-existent + enabled: true + snapshot: true + diff: [] + description: "'atmos about non-existent' should show expected message" + workdir: "../" + command: atmos + args: + - "about" + - "non-existent" + expect: + exit_code: 1 + - name: atmos about --help + enabled: true + snapshot: true + diff: [] + description: "'atmos about --help' should show help" + workdir: "../" + command: atmos + args: + - "about" + - "--help" + expect: + exit_code: 0 \ No newline at end of file