@@ -54,8 +54,8 @@ func TestLogin(t *testing.T) {
5454 "first user?" , "yes" ,
5555 "username" , "testuser" ,
565657- "password" , "password " ,
58- "password" , "password " , // Confirm.
57+ "password" , "SomeSecurePassword! " ,
58+ "password" , "SomeSecurePassword! " , // Confirm.
5959 "trial" , "yes" ,
6060 }
6161 for i := 0 ; i < len (matches ); i += 2 {
@@ -89,8 +89,8 @@ func TestLogin(t *testing.T) {
8989 "first user?" , "yes" ,
9090 "username" , "testuser" ,
919192- "password" , "password " ,
93- "password" , "password " , // Confirm.
92+ "password" , "SomeSecurePassword! " ,
93+ "password" , "SomeSecurePassword! " , // Confirm.
9494 "trial" , "yes" ,
9595 }
9696 for i := 0 ; i < len (matches ); i += 2 {
@@ -107,7 +107,7 @@ func TestLogin(t *testing.T) {
107107 t .Parallel ()
108108 client := coderdtest .New (t , nil )
109109 doneChan := make (chan struct {})
110- root ,
_ := clitest .
New (
t ,
"login" ,
client .
URL .
String (),
"--first-user-username" ,
"testuser" ,
"--first-user-email" ,
"[email protected] " ,
"--first-user-password" ,
"password " ,
"--first-user-trial" )
110+ root ,
_ := clitest .
New (
t ,
"login" ,
client .
URL .
String (),
"--first-user-username" ,
"testuser" ,
"--first-user-email" ,
"[email protected] " ,
"--first-user-password" ,
"SomeSecurePassword! " ,
"--first-user-trial" )
111111 pty := ptytest .New (t )
112112 root .SetIn (pty .Input ())
113113 root .SetOut (pty .Output ())
@@ -143,8 +143,8 @@ func TestLogin(t *testing.T) {
143143 "first user?" , "yes" ,
144144 "username" , "testuser" ,
145145146- "password" , "mypass " ,
147- "password" , "wrongpass " , // Confirm.
146+ "password" , "MyFirstSecurePassword! " ,
147+ "password" , "MyNonMatchingSecurePassword! " , // Confirm.
148148 }
149149 for i := 0 ; i < len (matches ); i += 2 {
150150 match := matches [i ]
@@ -157,9 +157,9 @@ func TestLogin(t *testing.T) {
157157 pty .ExpectMatch ("Passwords do not match" )
158158 pty .ExpectMatch ("Enter a " + cliui .Styles .Field .Render ("password" ))
159159
160- pty .WriteLine ("pass " )
160+ pty .WriteLine ("SomeSecurePassword! " )
161161 pty .ExpectMatch ("Confirm" )
162- pty .WriteLine ("pass " )
162+ pty .WriteLine ("SomeSecurePassword! " )
163163 pty .ExpectMatch ("trial" )
164164 pty .WriteLine ("yes" )
165165 pty .ExpectMatch ("Welcome to Coder" )
0 commit comments