Skip to content

Commit

Permalink
Merge pull request #78 from baude/replacecs
Browse files Browse the repository at this point in the history
replace randomString func fromcontainers/storage
  • Loading branch information
openshift-merge-bot[bot] authored Feb 3, 2025
2 parents 812f819 + 9ad6720 commit 52c3795
Show file tree
Hide file tree
Showing 12 changed files with 11 additions and 2,093 deletions.
10 changes: 8 additions & 2 deletions verify/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ package verify
import (
"encoding/json"
"fmt"
"math/rand/v2"
"os"
"os/exec"
"strconv"
"strings"
"syscall"
"time"

"github.com/containers/storage/pkg/stringid"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"github.com/onsi/gomega/format"
Expand Down Expand Up @@ -173,7 +173,13 @@ func runWrapper(podmanBinary string, cmdArgs []string, timeout time.Duration, wa

// randomString returns a string of given length composed of random characters
func randomString() string {
return stringid.GenerateRandomID()[0:12]
length := 12
b := make([]byte, length)
charset := "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
for i := range b {
b[i] = charset[rand.IntN(len(charset))]
}
return string(b)
}

type ValidJSONMatcher struct {
Expand Down
2 changes: 1 addition & 1 deletion verify/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ module github.com/containers/podman-machine-os
go 1.22.6

require (
github.com/containers/storage v1.56.1
github.com/onsi/ginkgo/v2 v2.22.2
github.com/onsi/gomega v1.36.2
)
Expand All @@ -13,6 +12,7 @@ require (
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad // indirect
github.com/stretchr/testify v1.9.0 // indirect
golang.org/x/net v0.33.0 // indirect
golang.org/x/sys v0.28.0 // indirect
golang.org/x/text v0.21.0 // indirect
Expand Down
2 changes: 0 additions & 2 deletions verify/go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
github.com/containers/storage v1.56.1 h1:gDZj/S6Zxus4Xx42X6iNB3ODXuh0qoOdH/BABfrvcKo=
github.com/containers/storage v1.56.1/go.mod h1:c6WKowcAlED/DkWGNuL9bvGYqIWCVy7isRMdCSKWNjk=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY=
Expand Down
Loading

0 comments on commit 52c3795

Please sign in to comment.