-
Notifications
You must be signed in to change notification settings - Fork 174
Expand file tree
/
Copy pathtest.go
More file actions
35 lines (32 loc) · 813 Bytes
/
test.go
File metadata and controls
35 lines (32 loc) · 813 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package fixtures
import (
"github.com/stackrox/rox/generated/storage"
"github.com/stackrox/rox/pkg/protocompat"
"github.com/stackrox/rox/pkg/uuid"
)
// GetTestSingleKeyStruct returns filled TestSingleKeyStruct
func GetTestSingleKeyStruct() *storage.TestSingleKeyStruct {
return &storage.TestSingleKeyStruct{
Key: uuid.NewDummy().String(),
Name: "name",
StringSlice: []string{
"slice1", "slice2",
},
Bool: true,
Uint64: 16,
Int64: 32,
Float: 4.56,
Labels: map[string]string{
"key1": "value1",
"key2": "value2",
},
Timestamp: protocompat.GetProtoTimestampFromSecondsAndNanos(
1645640515,
0),
Enum: storage.TestSingleKeyStruct_ENUM1,
Enums: []storage.TestSingleKeyStruct_Enum{
storage.TestSingleKeyStruct_ENUM1,
storage.TestSingleKeyStruct_ENUM2,
},
}
}