Skip to content
Snippets Groups Projects

Improve test coverage of rbac stuff

Merged Ghost User requested to merge 207-improve-test-coverage-of-rbac-stuff into develop
1 file
+ 2
2
Compare changes
  • Side-by-side
  • Inline
@@ -28,7 +28,7 @@ func TestLogin(t *testing.T) {
@@ -28,7 +28,7 @@ func TestLogin(t *testing.T) {
args: args{
args: args{
ctx: context.TODO(),
ctx: context.TODO(),
addr: testAPIEndpoint,
addr: testAPIEndpoint,
username: "admin",
username: "testAdmin",
pwd: "admin",
pwd: "admin",
},
},
want: &apb.LoginResponse{
want: &apb.LoginResponse{
@@ -38,7 +38,7 @@ func TestLogin(t *testing.T) {
@@ -38,7 +38,7 @@ func TestLogin(t *testing.T) {
},
},
}
}
err := userService.Add(&rbac.User{UserID: uuid.New(), UserName: "admin", Roles: map[string]string{pndID: "admin"}, Password: "admin"})
err := userService.Add(&rbac.User{UserID: uuid.New(), UserName: "testAdmin", Roles: map[string]string{pndID: "admin"}, Password: "admin"})
if err != nil {
if err != nil {
t.Errorf("Login() error = %v", err)
t.Errorf("Login() error = %v", err)
return
return
Loading