Files
airshipctl/cmd/config/testdata/TestConfigSetContextGoldenOutput/config-cmd-set-context-too-many-args.golden
Alexander Hughes 8f27532ce0 [#34] Add tests to commands expecting N args
Commands using cobra's ExactArgs feature previously did not have any
validation that the ExactArgs was being enforced. This patchset adds
tests to ensure that in the cases ExactArgs=n, that only n args are
accepted, and other values such as x or y throw an appropriate error.

Change-Id: I27b5774e79db51e0e9bc81d8c207be80811ba459
2020-02-12 14:11:30 +00:00

22 lines
896 B
Plaintext

Error: accepts 1 arg(s), received 2
Usage:
set-context NAME [flags]
Examples:
# Create a completely new e2e context entry
airshipctl config set-context e2e --namespace=kube-system --manifest=manifest --user=auth-info --cluster-type=target
# Update the current-context to e2e
airshipctl config set-context e2e --current-context=true
Flags:
--cluster string cluster for the context entry in airshipctl config
--cluster-type string cluster-type for the context entry in airshipctl config
--current-context current-context for the context entry in airshipctl config
-h, --help help for set-context
--manifest string manifest for the context entry in airshipctl config
--namespace string namespace for the context entry in airshipctl config
--user string user for the context entry in airshipctl config