From 77332d80e31a76b44ab4a3df23cc78e029d8c29c Mon Sep 17 00:00:00 2001 From: Ferdinando Papale <4850119+papafe@users.noreply.github.com> Date: Wed, 16 Jul 2025 11:36:42 +0200 Subject: [PATCH] CSHARP-5479: Add mixed case tests for read preference tags --- .../tests/read-preference-options.json | 15 +++++++++++++++ .../uri-options/tests/read-preference-options.yml | 11 +++++++++++ 2 files changed, 26 insertions(+) diff --git a/specifications/uri-options/tests/read-preference-options.json b/specifications/uri-options/tests/read-preference-options.json index 054f5e089ed..abbf0d0cc6e 100644 --- a/specifications/uri-options/tests/read-preference-options.json +++ b/specifications/uri-options/tests/read-preference-options.json @@ -36,6 +36,21 @@ ] } }, + { + "description": "Read preference tags are case sensitive", + "uri": "mongodb://example.com/?readPreference=secondary&readPreferenceTags=dc:NY", + "valid": true, + "warning": false, + "hosts": null, + "auth": null, + "options": { + "readPreferenceTags": [ + { + "dc": "NY" + } + ] + } + }, { "description": "Invalid readPreferenceTags causes a warning", "uri": "mongodb://example.com/?readPreferenceTags=invalid", diff --git a/specifications/uri-options/tests/read-preference-options.yml b/specifications/uri-options/tests/read-preference-options.yml index c7f18fe72f2..267454c0ea0 100644 --- a/specifications/uri-options/tests/read-preference-options.yml +++ b/specifications/uri-options/tests/read-preference-options.yml @@ -26,6 +26,17 @@ tests: readPreferenceTags: - dc: "ny" + - + description: "Read preference tags are case sensitive" + uri: "mongodb://example.com/?readPreference=secondary&readPreferenceTags=dc:NY" + valid: true + warning: false + hosts: ~ + auth: ~ + options: + readPreferenceTags: + - + dc: "NY" - description: "Invalid readPreferenceTags causes a warning" uri: "mongodb://example.com/?readPreferenceTags=invalid"