Skip to content
Snippets Groups Projects
Commit 6ff8237e authored by André Sterba's avatar André Sterba
Browse files

Fix tests

parent 69f7084f
No related branches found
No related tags found
3 merge requests!376Add additional example application hostname-checker,!344Enhance northbound interface to get user and roles by id,!343Add basic application framework and example application to show interaction between events an NBI
Pipeline #107499 failed
This commit is part of merge request !343. Comments created here will be created in the context of that merge request.
......@@ -61,7 +61,7 @@ func TestGetRole(t *testing.T) {
ctx context.Context
addr string
name string
uuid uuid.UUID
id uuid.UUID
}
tests := []struct {
name string
......@@ -75,6 +75,7 @@ func TestGetRole(t *testing.T) {
ctx: context.TODO(),
addr: testAPIEndpoint,
name: "adminTestRole",
id: uuid.Nil,
},
want: &apb.GetRoleResponse{
Status: apb.Status_STATUS_OK,
......@@ -91,6 +92,7 @@ func TestGetRole(t *testing.T) {
ctx: context.TODO(),
addr: testAPIEndpoint,
name: "not role",
id: uuid.Nil,
},
want: nil,
wantErr: true,
......@@ -98,7 +100,7 @@ func TestGetRole(t *testing.T) {
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
got, err := GetRole(tt.args.ctx, tt.args.addr, tt.args.name, tt.args.uuid)
got, err := GetRole(tt.args.ctx, tt.args.addr, tt.args.name, tt.args.id)
if (err != nil) != tt.wantErr {
t.Errorf("GetRole() error = %v, wantErr %v", err, tt.wantErr)
return
......
......@@ -79,6 +79,7 @@ func TestGetUser(t *testing.T) {
ctx: context.TODO(),
addr: testAPIEndpoint,
name: "testAdmin",
id: uuid.Nil,
},
want: &apb.GetUserResponse{
Status: apb.Status_STATUS_OK,
......@@ -95,6 +96,7 @@ func TestGetUser(t *testing.T) {
ctx: context.TODO(),
addr: testAPIEndpoint,
name: "foos",
id: uuid.Nil,
},
want: nil,
wantErr: true,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment