File tree Expand file tree Collapse file tree 3 files changed +3
-24
lines changed
tests/integration/suite/daprd Expand file tree Collapse file tree 3 files changed +3
-24
lines changed Original file line number Diff line number Diff line change @@ -22,15 +22,13 @@ import (
22
22
"net/http"
23
23
"net/url"
24
24
"os"
25
- "regexp"
26
25
"strings"
27
26
"testing"
28
27
"time"
29
28
30
29
fuzz "github.com/google/gofuzz"
31
30
"github.com/stretchr/testify/assert"
32
31
"github.com/stretchr/testify/require"
33
- "k8s.io/apimachinery/pkg/api/validation/path"
34
32
35
33
"github.com/dapr/dapr/tests/integration/framework"
36
34
procdaprd "github.com/dapr/dapr/tests/integration/framework/process/daprd"
@@ -54,21 +52,8 @@ type fuzzsecret struct {
54
52
func (f * fuzzsecret ) Setup (t * testing.T ) []framework.Option {
55
53
const numTests = 1000
56
54
57
- reg , err := regexp .Compile ("^([a-zA-Z].*)$" )
58
- require .NoError (t , err )
59
-
60
55
takenNames := make (map [string ]bool )
61
- fz := fuzz .New ().Funcs (func (s * string , c fuzz.Continue ) {
62
- for * s == "" ||
63
- takenNames [* s ] ||
64
- len (path .IsValidPathSegmentName (* s )) > 0 ||
65
- ! reg .MatchString (* s ) ||
66
- * s == "." {
67
- * s = c .RandString ()
68
- }
69
- takenNames [* s ] = true
70
- })
71
- fz .Fuzz (& f .secretStoreName )
56
+ f .secretStoreName = util .RandomString (t , 10 )
72
57
73
58
f .values = make (map [string ]string )
74
59
for i := 0 ; i < numTests ; i ++ {
Original file line number Diff line number Diff line change @@ -99,10 +99,7 @@ func (f *fuzzstate) Setup(t *testing.T) []framework.Option {
99
99
},
100
100
}
101
101
102
- for f .storeName == "" ||
103
- len (path .IsValidPathSegmentName (f .storeName )) > 0 {
104
- fuzz .New ().Fuzz (& f .storeName )
105
- }
102
+ f .storeName = util .RandomString (t , 10 )
106
103
107
104
f .daprd = procdaprd .New (t , procdaprd .WithResourceFiles (fmt .Sprintf (`
108
105
apiVersion: dapr.io/v1alpha1
Original file line number Diff line number Diff line change @@ -109,10 +109,7 @@ func (f *fuzzstate) Setup(t *testing.T) []framework.Option {
109
109
},
110
110
}
111
111
112
- for f .storeName == "" ||
113
- len (path .IsValidPathSegmentName (f .storeName )) > 0 {
114
- fuzz .New ().Fuzz (& f .storeName )
115
- }
112
+ f .storeName = util .RandomString (t , 10 )
116
113
117
114
f .daprd = procdaprd .New (t , procdaprd .WithResourceFiles (fmt .Sprintf (`
118
115
apiVersion: dapr.io/v1alpha1
You can’t perform that action at this time.
0 commit comments