Files
airshipctl/cmd/config/testdata/TestConfigSetAuthInfoGoldenOutput/config-cmd-set-authinfo-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

26 lines
1.1 KiB
Plaintext

Error: accepts 1 arg(s), received 2
Usage:
set-credentials NAME [flags]
Examples:
# Set only the "client-key" field on the "cluster-admin"
# entry, without touching other values:
airshipctl config set-credentials cluster-admin --username=~/.kube/admin.key
# Set basic auth for the "cluster-admin" entry
airshipctl config set-credentials cluster-admin --username=admin --password=uXFGweU9l35qcif
# Embed client certificate data in the "cluster-admin" entry
airshipctl config set-credentials cluster-admin --client-certificate=~/.kube/admin.crt --embed-certs=true
Flags:
--client-certificate string Path to client-certificate file for the user entry in airshipctl
--client-key string Path to client-key file for the user entry in airshipctl
--embed-certs Embed client cert/key for the user entry in airshipctl
-h, --help help for set-credentials
--password string password for the user entry in airshipctl
--token string token for the user entry in airshipctl
--username string username for the user entry in airshipctl