@@ -8,42 +8,41 @@ package unified
88
99import (
1010 "context"
11- "path"
1211 "testing"
12+
13+ "go.mongodb.org/mongo-driver/v2/internal/spectest"
1314)
1415
1516var (
1617 passDirectories = []string {
17- "unified-test-format/valid-pass" ,
18- "versioned-api" ,
19- "crud/unified" ,
20- "change-streams" ,
21- "transactions/unified" ,
22- "load-balancers" ,
23- "collection-management" ,
24- "command-monitoring" ,
25- "command-monitoring/logging" ,
26- "connection-monitoring-and-pooling/logging" ,
27- "sessions" ,
28- "retryable-reads/unified" ,
29- "retryable-writes/unified" ,
30- "client-side-encryption/unified" ,
31- "client-side-operations-timeout" ,
32- "gridfs" ,
33- "server-selection/logging" ,
34- "server-discovery-and-monitoring/unified" ,
35- "run-command" ,
36- "index-management" ,
18+ "unified-test-format/tests/valid-pass" ,
19+ "versioned-api/tests" ,
20+ "crud/tests/unified" ,
21+ "change-streams/tests/unified" ,
22+ "transactions/tests/unified" ,
23+ "load-balancers/tests" ,
24+ "collection-management/tests" ,
25+ "command-logging-and-monitoring/tests/monitoring" ,
26+ "command-logging-and-monitoring/tests/logging" ,
27+ "connection-monitoring-and-pooling/tests/logging" ,
28+ "sessions/tests" ,
29+ "retryable-reads/tests/unified" ,
30+ "retryable-writes/tests/unified" ,
31+ "client-side-encryption/tests/unified" ,
32+ "client-side-operations-timeout/tests" ,
33+ "gridfs/tests" ,
34+ "server-selection/tests/logging" ,
35+ "server-discovery-and-monitoring/tests/unified" ,
36+ "run-command/tests/unified" ,
37+ "index-management/tests" ,
38+ "transactions-convenient-api/tests/unified" ,
39+ "atlas-data-lake-testing/tests/unified" ,
3740 }
3841 failDirectories = []string {
39- "unified-test-format/valid-fail" ,
42+ "unified-test-format/tests/ valid-fail" ,
4043 }
4144)
4245
43- const (
44- dataDirectory = "../../../testdata"
45- )
46-
4746func TestUnifiedSpec (t * testing.T ) {
4847 // Ensure the cluster is in a clean state before test execution begins.
4948 if err := terminateOpenSessions (context .Background ()); err != nil {
@@ -52,13 +51,13 @@ func TestUnifiedSpec(t *testing.T) {
5251
5352 for _ , testDir := range passDirectories {
5453 t .Run (testDir , func (t * testing.T ) {
55- runTestDirectory (t , path . Join ( dataDirectory , testDir ), false )
54+ runTestDirectory (t , spectest . Path ( testDir ), false )
5655 })
5756 }
5857
5958 for _ , testDir := range failDirectories {
6059 t .Run (testDir , func (t * testing.T ) {
61- runTestDirectory (t , path . Join ( dataDirectory , testDir ), true )
60+ runTestDirectory (t , spectest . Path ( testDir ), true )
6261 })
6362 }
6463}
0 commit comments