Skip to content

Commit

Permalink
Merge pull request kubernetes#5261 from tghartland/5218-magnum-uuid-dep
Browse files Browse the repository at this point in the history
Magnum provider: switch UUID dependency from satori to gofrs
  • Loading branch information
k8s-ci-robot authored Oct 28, 2022
2 parents 887810c + aeee344 commit e0d4679
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"testing"
"time"

"github.com/satori/go.uuid"
"github.com/gofrs/uuid"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"
"github.com/stretchr/testify/require"
Expand All @@ -46,7 +46,12 @@ func (m *magnumManagerDiscoveryMock) autoDiscoverNodeGroups(cfgs []magnumAutoDis
ngs := []*nodegroups.NodeGroup{}
two := 2
for i := 0; i < rand.Intn(20); i++ {
ngs = append(ngs, &nodegroups.NodeGroup{Name: uuid.NewV4().String(), NodeCount: 1, MinNodeCount: 1, MaxNodeCount: &two})
newUUID, err := uuid.NewV4()
if err != nil {
return nil, fmt.Errorf("failed to produce a random UUID: %v", err)
}
newUUIDStr := newUUID.String()
ngs = append(ngs, &nodegroups.NodeGroup{Name: newUUIDStr, NodeCount: 1, MinNodeCount: 1, MaxNodeCount: &two})
}
return ngs, nil
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"sort"
"strings"

"github.com/satori/go.uuid"
"github.com/gofrs/uuid"

apiv1 "k8s.io/api/core/v1"

Expand Down

0 comments on commit e0d4679

Please sign in to comment.