diff --git a/e2e/imgbuild/regressions.go b/e2e/imgbuild/regressions.go index 1e457cc89e..eef635d930 100644 --- a/e2e/imgbuild/regressions.go +++ b/e2e/imgbuild/regressions.go @@ -15,7 +15,7 @@ import ( "testing" "text/template" - uuid "github.com/satori/go.uuid" + "github.com/google/uuid" "github.com/sylabs/singularity/e2e/internal/e2e" "github.com/sylabs/singularity/internal/pkg/test/tool/require" "github.com/sylabs/singularity/internal/pkg/util/fs" @@ -177,7 +177,7 @@ func (c *imgBuildTests) issue4583(t *testing.T) { } func (c imgBuildTests) issue4837(t *testing.T) { - id, err := uuid.NewV4() + id, err := uuid.NewRandom() if err != nil { t.Fatal(err) } diff --git a/e2e/instance/instance.go b/e2e/instance/instance.go index bb6b156f4f..847f14543c 100644 --- a/e2e/instance/instance.go +++ b/e2e/instance/instance.go @@ -16,21 +16,19 @@ import ( "syscall" "testing" - "github.com/sylabs/singularity/internal/pkg/test/tool/require" - "github.com/sylabs/singularity/pkg/util/fs/proc" - - uuid "github.com/satori/go.uuid" - + "github.com/google/uuid" "github.com/pkg/errors" "github.com/sylabs/singularity/e2e/internal/e2e" "github.com/sylabs/singularity/e2e/internal/testhelper" + "github.com/sylabs/singularity/internal/pkg/test/tool/require" + "github.com/sylabs/singularity/pkg/util/fs/proc" ) // randomName generates a random name based on a UUID. func randomName(t *testing.T) string { t.Helper() - id, err := uuid.NewV4() + id, err := uuid.NewRandom() if err != nil { t.Fatal(err) } diff --git a/e2e/oci/oci.go b/e2e/oci/oci.go index 4f0231853c..dd8208775b 100644 --- a/e2e/oci/oci.go +++ b/e2e/oci/oci.go @@ -12,9 +12,9 @@ import ( "runtime" "testing" + "github.com/google/uuid" "github.com/opencontainers/runtime-spec/specs-go" "github.com/pkg/errors" - uuid "github.com/satori/go.uuid" "github.com/sylabs/singularity/e2e/internal/e2e" "github.com/sylabs/singularity/e2e/internal/testhelper" "github.com/sylabs/singularity/internal/pkg/runtime/engine/config/oci" @@ -25,7 +25,7 @@ import ( func randomContainerID(t *testing.T) string { t.Helper() - id, err := uuid.NewV4() + id, err := uuid.NewRandom() if err != nil { t.Fatal(err) } diff --git a/go.mod b/go.mod index 79016bfbec..828e818e28 100644 --- a/go.mod +++ b/go.mod @@ -23,6 +23,7 @@ require ( github.com/godbus/dbus v4.1.0+incompatible // indirect github.com/gofrs/uuid v3.2.0+incompatible // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect + github.com/google/uuid v1.2.0 github.com/gorilla/handlers v1.4.0 // indirect github.com/gorilla/websocket v1.4.2 github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 // indirect diff --git a/go.sum b/go.sum index 859ef0dab0..0074db7f5d 100644 --- a/go.sum +++ b/go.sum @@ -435,6 +435,7 @@ github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm4 github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.2.0 h1:qJYtXnJRWmpe7m/3XlyhrsLrEURqHRM2kxzoxXqyUDs= github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= diff --git a/pkg/util/crypt/crypt_dev.go b/pkg/util/crypt/crypt_dev.go index 62437d3de4..382ca0a0f8 100644 --- a/pkg/util/crypt/crypt_dev.go +++ b/pkg/util/crypt/crypt_dev.go @@ -16,7 +16,7 @@ import ( "syscall" "time" - uuid "github.com/satori/go.uuid" + "github.com/google/uuid" "github.com/sylabs/singularity/internal/pkg/util/bin" "github.com/sylabs/singularity/pkg/sylog" "github.com/sylabs/singularity/pkg/util/fs/lock" @@ -247,7 +247,7 @@ func copyDeviceContents(source, dest string, size int64) error { } func getNextAvailableCryptDevice() (string, error) { - id, err := uuid.NewV4() + id, err := uuid.NewRandom() if err != nil { return "", err }