mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
etcdctl: Adding e2e tests for userAddTest
This commit is contained in:
parent
73b4a58ac0
commit
d51a7dba43
@ -39,6 +39,18 @@ func userAddTest(cx ctlCtx) {
|
||||
expectedStr: "User username created",
|
||||
stdIn: []string{"password"},
|
||||
},
|
||||
// Adds a user name using the usertest:password syntax.
|
||||
{
|
||||
args: []string{"add", "usertest:password"},
|
||||
expectedStr: "User usertest created",
|
||||
stdIn: []string{},
|
||||
},
|
||||
// Tries to add a user with empty username.
|
||||
{
|
||||
args: []string{"add", ":password"},
|
||||
expectedStr: "empty user name is not allowed.",
|
||||
stdIn: []string{},
|
||||
},
|
||||
// Tries to add a user name that already exists.
|
||||
{
|
||||
args: []string{"add", "username", "--interactive=false"},
|
||||
|
Loading…
x
Reference in New Issue
Block a user