Skip to content

Commit

Permalink
Linter issues
Browse files Browse the repository at this point in the history
  • Loading branch information
majst01 committed Sep 8, 2023
1 parent 1a9358a commit 556b6ac
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions cmd/metal-api/internal/service/partition-service.go
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,7 @@ func (r *partitionResource) calcPartitionCapacity(pcr *v1.PartitionCapacityReque
p := p
capacities := make(map[string]*v1.ServerCapacity)
for _, m := range machines {
m := m
if m.Partition == nil {
continue
}
Expand Down
5 changes: 2 additions & 3 deletions cmd/metal-api/internal/service/project-service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import (
"github.com/metal-stack/security"
"github.com/stretchr/testify/require"
"go.uber.org/zap/zaptest"
"gopkg.in/rethinkdb/rethinkdb-go.v6"
r "gopkg.in/rethinkdb/rethinkdb-go.v6"
)

Expand Down Expand Up @@ -210,7 +209,7 @@ func Test_projectResource_deleteProject(t *testing.T) {
name string
userScenarios []security.User
projectServiceMock func(mock *mdmv1mock.ProjectServiceClient)
dsMock func(mock *rethinkdb.Mock)
dsMock func(mock *r.Mock)
id string
wantStatus int
want *v1.ProjectResponse
Expand Down Expand Up @@ -241,7 +240,7 @@ func Test_projectResource_deleteProject(t *testing.T) {
mock.On("Get", context.Background(), &mdmv1.ProjectGetRequest{Id: "123"}).Return(&mdmv1.ProjectResponse{Project: &mdmv1.Project{Meta: &mdmv1.Meta{Id: "123"}}}, nil)
mock.On("Delete", context.Background(), &mdmv1.ProjectDeleteRequest{Id: "123"}).Return(&mdmv1.ProjectResponse{Project: &mdmv1.Project{}}, nil)
},
dsMock: func(mock *rethinkdb.Mock) {
dsMock: func(mock *r.Mock) {
mock.On(r.DB("mockdb").Table("machine").Filter(r.MockAnything(), r.FilterOpts{})).Return([]metal.Machines{}, nil)
mock.On(r.DB("mockdb").Table("network").Filter(r.MockAnything(), r.FilterOpts{})).Return([]metal.Networks{}, nil)
mock.On(r.DB("mockdb").Table("ip").Filter(r.MockAnything(), r.FilterOpts{})).Return([]metal.IPs{}, nil)
Expand Down

0 comments on commit 556b6ac

Please sign in to comment.