Skip to content

Commit 0ce103e

Browse files
committed
Skip pre-4.2 SDAM spec tests.
1 parent 27a1d43 commit 0ce103e

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

internal/spectest/skip.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -841,6 +841,18 @@ var skipTests = map[string][]string{
841841
"Support queryable encryption in Client.BulkWrite (GODRIVER-3403)": {
842842
"TestUnifiedSpec/crud/tests/unified/client-bulkWrite-qe.json",
843843
},
844+
845+
// Pre-4.2 SDAM tests
846+
"Pre-4.2 SDAM tests": {
847+
"TestSDAMSpec/errors/pre-42-InterruptedAtShutdown.json",
848+
"TestSDAMSpec/errors/pre-42-InterruptedDueToReplStateChange.json",
849+
"TestSDAMSpec/errors/pre-42-LegacyNotPrimary.json",
850+
"TestSDAMSpec/errors/pre-42-NotPrimaryNoSecondaryOk.json",
851+
"TestSDAMSpec/errors/pre-42-NotPrimaryOrSecondary.json",
852+
"TestSDAMSpec/errors/pre-42-NotWritablePrimary.json",
853+
"TestSDAMSpec/errors/pre-42-PrimarySteppedDown.json",
854+
"TestSDAMSpec/errors/pre-42-ShutdownInProgress.json",
855+
},
844856
}
845857

846858
// CheckSkip checks if the fully-qualified test name matches a list of skipped test names for a given reason.

x/mongo/driver/topology/sdam_spec_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,8 @@ func runTest(t *testing.T, directory string, filename string) {
463463
assert.Nil(t, err, "ReadFile error: %v", err)
464464

465465
t.Run(directory+"/"+filename, func(t *testing.T) {
466+
spectest.CheckSkip(t)
467+
466468
var test testCase
467469
err = bson.UnmarshalExtJSON(content, false, &test)
468470
assert.Nil(t, err, "Unmarshal error: %v", err)

0 commit comments

Comments
 (0)