Skip to content

Commit ddad650

Browse files
authored
Add usage snapshot test (#1144)
Adding snapshot tests as coverage for command design changes.
1 parent 600f686 commit ddad650

39 files changed

+628
-2
lines changed

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
*.go text eol=lf
2+
*.snap text eol=lf
23
*.txt text eol=lf

.vscode/cspell-github-user-aliases.txt

+1
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,4 @@ sethvargo
1717
stretchr
1818
theckman
1919
benbjohnson
20+
bradleyjkemp

cli/azd/.vscode/cspell-azd-dictionary.txt

+2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ cflags
2929
cmdsubst
3030
containerapp
3131
csharpapp
32+
cupaloy
3233
devel
3334
dockerproject
3435
dskip
@@ -70,6 +71,7 @@ rzip
7071
semconv
7172
serverfarms
7273
setenvs
74+
snapshotter
7375
sstore
7476
staticcheck
7577
staticwebapp
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Usage:
2+
azd config get <path> [flags]
3+
4+
Flags:
5+
-h, --help Gets help for get.
6+
-o, --output string The output format (the supported formats are json). (default "json")
7+
8+
Global Flags:
9+
-C, --cwd string Sets the current working directory.
10+
--debug Enables debugging and diagnostics logging.
11+
-e, --environment string The name of the environment to use.
12+
--no-prompt Accepts the default value instead of prompting, or it fails if there is no default.
13+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Usage:
2+
azd config list [flags]
3+
4+
Flags:
5+
-h, --help Gets help for list.
6+
-o, --output string The output format (the supported formats are json). (default "json")
7+
8+
Global Flags:
9+
-C, --cwd string Sets the current working directory.
10+
--debug Enables debugging and diagnostics logging.
11+
-e, --environment string The name of the environment to use.
12+
--no-prompt Accepts the default value instead of prompting, or it fails if there is no default.
13+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Usage:
2+
azd config reset [flags]
3+
4+
Flags:
5+
-h, --help Gets help for reset.
6+
7+
Global Flags:
8+
-C, --cwd string Sets the current working directory.
9+
--debug Enables debugging and diagnostics logging.
10+
-e, --environment string The name of the environment to use.
11+
--no-prompt Accepts the default value instead of prompting, or it fails if there is no default.
12+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
Usage:
2+
azd config set <path> <value> [flags]
3+
4+
Examples:
5+
$ azd config set defaults.subscription <yourSubscriptionID>
6+
$ azd config set defaults.location eastus
7+
8+
Flags:
9+
-h, --help Gets help for set.
10+
11+
Global Flags:
12+
-C, --cwd string Sets the current working directory.
13+
--debug Enables debugging and diagnostics logging.
14+
-e, --environment string The name of the environment to use.
15+
--no-prompt Accepts the default value instead of prompting, or it fails if there is no default.
16+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Usage:
2+
azd config unset <path> [flags]
3+
4+
Examples:
5+
$ azd config unset defaults.location
6+
7+
Flags:
8+
-h, --help Gets help for unset.
9+
10+
Global Flags:
11+
-C, --cwd string Sets the current working directory.
12+
--debug Enables debugging and diagnostics logging.
13+
-e, --environment string The name of the environment to use.
14+
--no-prompt Accepts the default value instead of prompting, or it fails if there is no default.
15+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
Usage:
2+
azd config [command]
3+
4+
Available Commands:
5+
get Gets a configuration
6+
list Lists all configuration values
7+
reset Resets configuration to default
8+
set Sets a configuration
9+
unset Unsets a configuration
10+
11+
Flags:
12+
-h, --help Gets help for config.
13+
14+
Global Flags:
15+
-C, --cwd string Sets the current working directory.
16+
--debug Enables debugging and diagnostics logging.
17+
-e, --environment string The name of the environment to use.
18+
--no-prompt Accepts the default value instead of prompting, or it fails if there is no default.
19+
20+
Use "azd config [command] --help" for more information about a command.
21+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Usage:
2+
azd deploy [flags]
3+
4+
Flags:
5+
-h, --help Gets help for deploy.
6+
-o, --output string The output format (the supported formats are json, none). (default "none")
7+
--service string Deploys a specific service (when the string is unspecified, all services that are listed in the azure.yaml file are deployed).
8+
9+
Global Flags:
10+
-C, --cwd string Sets the current working directory.
11+
--debug Enables debugging and diagnostics logging.
12+
-e, --environment string The name of the environment to use.
13+
--no-prompt Accepts the default value instead of prompting, or it fails if there is no default.
14+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Usage:
2+
azd down [flags]
3+
4+
Flags:
5+
--force Does not require confirmation before it deletes resources.
6+
-h, --help Gets help for down.
7+
-o, --output string The output format (the supported formats are json, none). (default "none")
8+
--purge Does not require confirmation before it permanently deletes resources that are soft-deleted by default (for example, key vaults).
9+
10+
Global Flags:
11+
-C, --cwd string Sets the current working directory.
12+
--debug Enables debugging and diagnostics logging.
13+
-e, --environment string The name of the environment to use.
14+
--no-prompt Accepts the default value instead of prompting, or it fails if there is no default.
15+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Usage:
2+
azd env get-values [flags]
3+
4+
Flags:
5+
-h, --help Gets help for get-values.
6+
-o, --output string The output format (the supported formats are json, dotenv). (default "dotenv")
7+
8+
Global Flags:
9+
-C, --cwd string Sets the current working directory.
10+
--debug Enables debugging and diagnostics logging.
11+
-e, --environment string The name of the environment to use.
12+
--no-prompt Accepts the default value instead of prompting, or it fails if there is no default.
13+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
Usage:
2+
azd env list [flags]
3+
4+
Aliases:
5+
list, ls
6+
7+
Flags:
8+
-h, --help Gets help for list.
9+
-o, --output string The output format (the supported formats are json, table). (default "table")
10+
11+
Global Flags:
12+
-C, --cwd string Sets the current working directory.
13+
--debug Enables debugging and diagnostics logging.
14+
-e, --environment string The name of the environment to use.
15+
--no-prompt Accepts the default value instead of prompting, or it fails if there is no default.
16+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Usage:
2+
azd env new <environment> [flags]
3+
4+
Flags:
5+
-h, --help Gets help for new.
6+
-l, --location string Azure location for the new environment
7+
--subscription string Name or ID of an Azure subscription to use for the new environment
8+
9+
Global Flags:
10+
-C, --cwd string Sets the current working directory.
11+
--debug Enables debugging and diagnostics logging.
12+
-e, --environment string The name of the environment to use.
13+
--no-prompt Accepts the default value instead of prompting, or it fails if there is no default.
14+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Usage:
2+
azd env refresh [flags]
3+
4+
Flags:
5+
-h, --help Gets help for refresh.
6+
-o, --output string The output format (the supported formats are json, none). (default "none")
7+
8+
Global Flags:
9+
-C, --cwd string Sets the current working directory.
10+
--debug Enables debugging and diagnostics logging.
11+
-e, --environment string The name of the environment to use.
12+
--no-prompt Accepts the default value instead of prompting, or it fails if there is no default.
13+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Usage:
2+
azd env select <environment> [flags]
3+
4+
Flags:
5+
-h, --help Gets help for select.
6+
7+
Global Flags:
8+
-C, --cwd string Sets the current working directory.
9+
--debug Enables debugging and diagnostics logging.
10+
-e, --environment string The name of the environment to use.
11+
--no-prompt Accepts the default value instead of prompting, or it fails if there is no default.
12+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Usage:
2+
azd env set <key> <value> [flags]
3+
4+
Flags:
5+
-h, --help Gets help for set.
6+
7+
Global Flags:
8+
-C, --cwd string Sets the current working directory.
9+
--debug Enables debugging and diagnostics logging.
10+
-e, --environment string The name of the environment to use.
11+
--no-prompt Accepts the default value instead of prompting, or it fails if there is no default.
12+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
Usage:
2+
azd env [command]
3+
4+
Available Commands:
5+
get-values Get all environment values.
6+
list List environments
7+
new Create a new environment.
8+
refresh Refresh environment settings by using information from a previous infrastructure provision.
9+
select Set the default environment.
10+
set Set a value in the environment.
11+
12+
Flags:
13+
-h, --help Gets help for env.
14+
15+
Global Flags:
16+
-C, --cwd string Sets the current working directory.
17+
--debug Enables debugging and diagnostics logging.
18+
-e, --environment string The name of the environment to use.
19+
--no-prompt Accepts the default value instead of prompting, or it fails if there is no default.
20+
21+
Use "azd env [command] --help" for more information about a command.
22+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
Usage:
2+
azd infra create [flags]
3+
4+
Aliases:
5+
create, provision
6+
7+
Flags:
8+
-h, --help Gets help for create.
9+
--no-progress Suppresses progress information.
10+
-o, --output string The output format (the supported formats are json, none). (default "none")
11+
12+
Global Flags:
13+
-C, --cwd string Sets the current working directory.
14+
--debug Enables debugging and diagnostics logging.
15+
-e, --environment string The name of the environment to use.
16+
--no-prompt Accepts the default value instead of prompting, or it fails if there is no default.
17+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Usage:
2+
azd infra delete [flags]
3+
4+
Flags:
5+
--force Does not require confirmation before it deletes resources.
6+
-h, --help Gets help for delete.
7+
--purge Does not require confirmation before it permanently deletes resources that are soft-deleted by default (for example, key vaults).
8+
9+
Global Flags:
10+
-C, --cwd string Sets the current working directory.
11+
--debug Enables debugging and diagnostics logging.
12+
-e, --environment string The name of the environment to use.
13+
--no-prompt Accepts the default value instead of prompting, or it fails if there is no default.
14+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
Usage:
2+
azd infra [command]
3+
4+
Available Commands:
5+
create Create Azure resources for an application.
6+
delete Delete Azure resources for an application.
7+
8+
Flags:
9+
-h, --help Gets help for infra.
10+
11+
Global Flags:
12+
-C, --cwd string Sets the current working directory.
13+
--debug Enables debugging and diagnostics logging.
14+
-e, --environment string The name of the environment to use.
15+
--no-prompt Accepts the default value instead of prompting, or it fails if there is no default.
16+
17+
Use "azd infra [command] --help" for more information about a command.
18+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
Usage:
2+
azd init [flags]
3+
4+
Flags:
5+
-b, --branch string The template branch to initialize from.
6+
-h, --help Gets help for init.
7+
-l, --location string Azure location for the new environment
8+
--subscription string Name or ID of an Azure subscription to use for the new environment
9+
-t, --template string The template to use when you initialize the project. You can use Full URI, <owner>/<repository>, or <repository> if it's part of the azure-samples organization.
10+
11+
Global Flags:
12+
-C, --cwd string Sets the current working directory.
13+
--debug Enables debugging and diagnostics logging.
14+
-e, --environment string The name of the environment to use.
15+
--no-prompt Accepts the default value instead of prompting, or it fails if there is no default.
16+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
Usage:
2+
azd login [flags]
3+
4+
Flags:
5+
--check-status Checks the log-in status instead of logging in.
6+
--client-certificate string The path to the client certificate for the service principal to authenticate with.
7+
--client-id string The client id for the service principal to authenticate with.
8+
--client-secret string The client secret for the service principal to authenticate with. Set to the empty string to read the value from the console.
9+
--federated-credential string The federated token for the service principal to authenticate with. Set to the empty string to read the value from the console.
10+
--federated-credential-provider string The provider to use to acquire a federated token to authenticate with.
11+
-h, --help Gets help for login.
12+
-o, --output string The output format (the supported formats are json, none). (default "none")
13+
--tenant-id string The tenant id for the service principal to authenticate with.
14+
--use-device-code When true, log in by using a device code instead of a browser.
15+
16+
Global Flags:
17+
-C, --cwd string Sets the current working directory.
18+
--debug Enables debugging and diagnostics logging.
19+
-e, --environment string The name of the environment to use.
20+
--no-prompt Accepts the default value instead of prompting, or it fails if there is no default.
21+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Usage:
2+
azd logout [flags]
3+
4+
Flags:
5+
-h, --help Gets help for logout.
6+
7+
Global Flags:
8+
-C, --cwd string Sets the current working directory.
9+
--debug Enables debugging and diagnostics logging.
10+
-e, --environment string The name of the environment to use.
11+
--no-prompt Accepts the default value instead of prompting, or it fails if there is no default.
12+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Usage:
2+
azd monitor [flags]
3+
4+
Flags:
5+
-h, --help Gets help for monitor.
6+
--live Open a browser to Application Insights Live Metrics. Live Metrics is currently not supported for Python applications.
7+
--logs Open a browser to Application Insights Logs.
8+
--overview Open a browser to Application Insights Overview Dashboard.
9+
10+
Global Flags:
11+
-C, --cwd string Sets the current working directory.
12+
--debug Enables debugging and diagnostics logging.
13+
-e, --environment string The name of the environment to use.
14+
--no-prompt Accepts the default value instead of prompting, or it fails if there is no default.
15+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
Usage:
2+
azd pipeline config [flags]
3+
4+
Flags:
5+
--auth-type string The authentication type used between the pipeline provider and Azure for deployment (Only valid for GitHub provider)
6+
-h, --help Gets help for config.
7+
--principal-name string The name of the service principal to use to grant access to Azure resources as part of the pipeline.
8+
--principal-role string The role to assign to the service principal. (default "Contributor")
9+
--provider string The pipeline provider to use (GitHub and Azdo supported).
10+
--remote-name string The name of the git remote to configure the pipeline to run on. (default "origin")
11+
12+
Global Flags:
13+
-C, --cwd string Sets the current working directory.
14+
--debug Enables debugging and diagnostics logging.
15+
-e, --environment string The name of the environment to use.
16+
--no-prompt Accepts the default value instead of prompting, or it fails if there is no default.
17+

0 commit comments

Comments
 (0)