diff --git a/controller/api/role_test.go b/controller/api/role_test.go index 2dd79fd69e1318f88040637e7db6082b46cfb8cb..785ae3128e3c36d770bd67208492d27cb8aaccb4 100644 --- a/controller/api/role_test.go +++ b/controller/api/role_test.go @@ -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 diff --git a/controller/api/user_test.go b/controller/api/user_test.go index 4687df95c602ac5de5164cfafc93c8b33f1839ad..afa2f6dc6aa0f3bc9edbde0030dab5f20d74b31d 100644 --- a/controller/api/user_test.go +++ b/controller/api/user_test.go @@ -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,