profile-edit-traverse #199
@ -3,6 +3,7 @@ package menutraversaltest
|
|||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"context"
|
"context"
|
||||||
|
"flag"
|
||||||
"log"
|
"log"
|
||||||
"math/rand"
|
"math/rand"
|
||||||
"os"
|
"os"
|
||||||
@ -15,14 +16,15 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
testData = driver.ReadData()
|
testData = driver.ReadData()
|
||||||
testStore = ".test_state"
|
testStore = ".test_state"
|
||||||
groupTestFile = "group_test.json"
|
sessionID string
|
||||||
sessionID string
|
src = rand.NewSource(42)
|
||||||
src = rand.NewSource(42)
|
g = rand.New(src)
|
||||||
g = rand.New(src)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
var groupTestFile = flag.String("test-file", "group_test.json", "The test file to use for running the group tests")
|
||||||
|
|
||||||
func GenerateSessionId() string {
|
func GenerateSessionId() string {
|
||||||
uu := uuid.NewGenWithOptions(uuid.WithRandomReader(g))
|
uu := uuid.NewGenWithOptions(uuid.WithRandomReader(g))
|
||||||
v, err := uu.NewV4()
|
v, err := uu.NewV4()
|
||||||
@ -337,7 +339,7 @@ func TestMainMenuSend(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestGroups(t *testing.T) {
|
func TestGroups(t *testing.T) {
|
||||||
groups, err := driver.LoadTestGroups(groupTestFile)
|
groups, err := driver.LoadTestGroups(*groupTestFile)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalf("Failed to load test groups: %v", err)
|
log.Fatalf("Failed to load test groups: %v", err)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user