@@ -16,20 +16,21 @@ import (
1616func TestSignupAndViewApplication (t * testing.T ) {
1717 client := & http.Client {}
1818 accessToken := helpers .LoginAsRoot (t , client , helpers .GetHost ())
19+ suffix := "8687"
1920 group := helpers .CreateGroup (
2021 t ,
2122 client ,
2223 helpers .GetHost (),
2324 accessToken ,
24- "engineering-signup" ,
25+ "engineering-signup-" + suffix ,
2526 "Engineering Team for signup test" ,
2627 )
2728
2829 var applicationID string
2930
3031 t .Run ("signup" , func (t * testing.T ) {
3132 signupReq := map [string ]interface {}{
32- "username" : "alice" ,
33+ "username" : "alice-" + suffix ,
3334 "name" : "Alice Smith" ,
3435 "password" : "alicepass" ,
3536 "confirm_password" : "alicepass" ,
@@ -83,7 +84,7 @@ func TestSignupAndViewApplication(t *testing.T) {
8384 err = json .Unmarshal (bodyBytes , & appDetail )
8485 require .NoError (t , err , "failed to decode signup app detail: %s" , string (bodyBytes ))
8586 require .Equal (t , applicationID , appDetail .Data .Application .ID )
86- require .Equal (t , "alice" , appDetail .Data .User .Username )
87+ require .Equal (t , "alice-" + suffix , appDetail .Data .User .Username )
8788 require .Equal (t , "Alice Smith" , appDetail .Data .User .Name )
8889 aliceID = appDetail .Data .User .ID
8990 })
@@ -139,7 +140,7 @@ func TestSignupAndViewApplication(t *testing.T) {
139140 err = json .Unmarshal (body , & detailResp )
140141 require .NoError (t , err , "failed to decode ticket detail: %s" , string (body ))
141142 require .Equal (t , applicationID , detailResp .Data .Ticket .ID )
142- require .Equal (t , "alice" , detailResp .Data .Applicant .Username )
143+ require .Equal (t , "alice-" + suffix , detailResp .Data .Applicant .Username )
143144 require .Equal (t , "Alice Smith" , detailResp .Data .Applicant .Name )
144145 })
145146
@@ -168,7 +169,7 @@ func TestSignupAndViewApplication(t *testing.T) {
168169 })
169170
170171 t .Run ("user can login after approval" , func (t * testing.T ) {
171- loginResp , _ := helpers .LoginUser (t , client , "alice" , "alicepass" )
172+ loginResp , _ := helpers .LoginUser (t , client , "alice-" + suffix , "alicepass" )
172173 defer loginResp .Body .Close ()
173174 if ! assert .Equal (t , http .StatusOK , loginResp .StatusCode ) {
174175 body , _ := io .ReadAll (loginResp .Body )
0 commit comments