From d51a7dba43856f9518f01359c922170a862b1221 Mon Sep 17 00:00:00 2001 From: Jonathan Bazan Date: Wed, 26 Oct 2016 15:02:36 -0300 Subject: [PATCH] etcdctl: Adding e2e tests for userAddTest --- e2e/ctl_v3_user_test.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/e2e/ctl_v3_user_test.go b/e2e/ctl_v3_user_test.go index 85cbdd466..392ab4e42 100644 --- a/e2e/ctl_v3_user_test.go +++ b/e2e/ctl_v3_user_test.go @@ -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"},