Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/metal-stack/metal-api int…
Browse files Browse the repository at this point in the history
…o dualstack-support
  • Loading branch information
majst01 committed Sep 10, 2024
2 parents d2cb195 + 0f3ecad commit d408762
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cmd/metal-api/internal/datastore/integer.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ func makeRange(min, max uint) []integer {
a := make([]integer, max-min+1)
for i := range a {
a[i] = integer{
ID: min + uint(i),
ID: min + uint(i), // nolint:gosec
}
}
return a
Expand Down
4 changes: 0 additions & 4 deletions cmd/metal-api/internal/datastore/shared_mutex.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,6 @@ type lockOptAcquireTimeout struct {
timeout time.Duration
}

func newLockOptAcquireTimeout(t time.Duration) *lockOptAcquireTimeout {
return &lockOptAcquireTimeout{timeout: t}
}

func (m *sharedMutex) lock(ctx context.Context, key string, expiration time.Duration, opts ...lockOpt) error {
timeout := defaultSharedMutexAcquireTimeout
for _, opt := range opts {
Expand Down
4 changes: 4 additions & 0 deletions cmd/metal-api/internal/datastore/shared_mutex_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ import (
r "gopkg.in/rethinkdb/rethinkdb-go.v6"
)

func newLockOptAcquireTimeout(t time.Duration) *lockOptAcquireTimeout {
return &lockOptAcquireTimeout{timeout: t}
}

func Test_sharedMutex_reallyLocking(t *testing.T) {
defer mutexCleanup(t)
ctx := context.Background()
Expand Down
4 changes: 2 additions & 2 deletions cmd/metal-api/internal/grpc/boot-service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func TestBootService_Register(t *testing.T) {
name string
uuid string
numcores int
memory int
memory uint64
dbsizes []metal.Size
dbmachines metal.Machines
neighbormac1 metal.MacAddress
Expand Down Expand Up @@ -121,7 +121,7 @@ func TestBootService_Register(t *testing.T) {
req := &v1.BootServiceRegisterRequest{
Uuid: tt.uuid,
Hardware: &v1.MachineHardware{
Memory: uint64(tt.memory),
Memory: tt.memory,
Disks: []*v1.MachineBlockDevice{
{
Size: 1000000000000,
Expand Down

0 comments on commit d408762

Please sign in to comment.