...
1
2
3
4
5
6
7 package description
8
9 import (
10 "path"
11 "testing"
12
13 "go.mongodb.org/mongo-driver/internal/spectest"
14 )
15
16 const maxStalenessTestsDir = "../../testdata/max-staleness"
17
18
19 func TestMaxStalenessSpec(t *testing.T) {
20 for _, topology := range [...]string{
21 "ReplicaSetNoPrimary",
22 "ReplicaSetWithPrimary",
23 "Sharded",
24 "Single",
25 "Unknown",
26 } {
27 for _, file := range spectest.FindJSONFilesInDir(t,
28 path.Join(maxStalenessTestsDir, topology)) {
29
30 runTest(t, maxStalenessTestsDir, topology, file)
31 }
32 }
33 }
34
View as plain text