Skip to content

Commit 8a5040e

Browse files
committed
DRIVERS-3162 Add test for SRV hostname validation
- Fix test name to reflect three parts
1 parent e42298b commit 8a5040e

3 files changed

Lines changed: 10 additions & 2 deletions

File tree

test/asynchronous/test_dns.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ async def test_4_throw_when_return_address_does_not_contain_dot_separating_share
292292
]
293293
await self.run_initial_dns_seedlist_discovery_prose_tests(test_cases)
294294

295-
async def test_5_when_srv_hostname_has_two_dot_separated_parts_it_is_valid_for_the_returned_hostname_to_be_identical(
295+
async def test_5_when_srv_hostname_has_three_or_more_dot_separated_parts_it_is_valid_for_the_returned_hostname_to_be_identical(
296296
self
297297
):
298298
test_cases = [
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"uri": "mongodb+srv://build.10gen.cc/",
3+
"seeds": [
4+
"build.10gen.cc:27017"
5+
],
6+
"ping": false,
7+
"comment": "Should not throw when SRV hostname and resolved hostname are identical and SRV hostname has three dot-separated parts."
8+
}

test/test_dns.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ def test_4_throw_when_return_address_does_not_contain_dot_separating_shared_part
290290
]
291291
self.run_initial_dns_seedlist_discovery_prose_tests(test_cases)
292292

293-
def test_5_when_srv_hostname_has_two_dot_separated_parts_it_is_valid_for_the_returned_hostname_to_be_identical(
293+
def test_5_when_srv_hostname_has_three_or_more_dot_separated_parts_it_is_valid_for_the_returned_hostname_to_be_identical(
294294
self
295295
):
296296
test_cases = [

0 commit comments

Comments
 (0)