migrate callers to g/g/uuid

This commit is contained in:
Mike Danese
2019-11-04 23:15:20 -08:00
parent 590cbef0f6
commit a4ca9e6c93
25 changed files with 50 additions and 48 deletions

View File

@@ -27,7 +27,7 @@ import (
"time"
"github.com/go-openapi/spec"
"github.com/pborman/uuid"
"github.com/google/uuid"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/apimachinery/pkg/util/wait"
authauthenticator "k8s.io/apiserver/pkg/authentication/authenticator"
@@ -157,12 +157,12 @@ func startMasterOrDie(masterConfig *master.Config, incomingServer *httptest.Serv
}
masterConfig.GenericConfig.LoopbackClientConfig.Host = s.URL
privilegedLoopbackToken := uuid.NewRandom().String()
privilegedLoopbackToken := uuid.New().String()
// wrap any available authorizer
tokens := make(map[string]*user.DefaultInfo)
tokens[privilegedLoopbackToken] = &user.DefaultInfo{
Name: user.APIServerUser,
UID: uuid.NewRandom().String(),
UID: uuid.New().String(),
Groups: []string{user.SystemPrivilegedGroup},
}
@@ -260,7 +260,7 @@ func DefaultEtcdOptions() *options.EtcdOptions {
// This causes the integration tests to exercise the etcd
// prefix code, so please don't change without ensuring
// sufficient coverage in other ways.
etcdOptions := options.NewEtcdOptions(storagebackend.NewDefaultConfig(uuid.New(), nil))
etcdOptions := options.NewEtcdOptions(storagebackend.NewDefaultConfig(uuid.New().String(), nil))
etcdOptions.StorageConfig.Transport.ServerList = []string{GetEtcdURL()}
return etcdOptions
}
@@ -332,7 +332,7 @@ func RunAMasterUsingServer(masterConfig *master.Config, s *httptest.Server, mast
// SharedEtcd creates a storage config for a shared etcd instance, with a unique prefix.
func SharedEtcd() *storagebackend.Config {
cfg := storagebackend.NewDefaultConfig(path.Join(uuid.New(), "registry"), nil)
cfg := storagebackend.NewDefaultConfig(path.Join(uuid.New().String(), "registry"), nil)
cfg.Transport.ServerList = []string{GetEtcdURL()}
return cfg
}