Skip to content

Commit c54a7da

Browse files
committed
pull unified test from spec repo
1 parent 08dbbf7 commit c54a7da

File tree

2 files changed

+103
-0
lines changed

2 files changed

+103
-0
lines changed

.evergreen/resync-specs.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,9 @@ do
131131
gridfs)
132132
cpjson gridfs/tests gridfs
133133
;;
134+
handshake)
135+
cpjson mongodb-handshake/tests handshake
136+
;;
134137
index|index-management)
135138
cpjson index-management/tests index_management
136139
;;
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
{
2+
"description": "client metadata is not propagated to the server",
3+
"schemaVersion": "1.9",
4+
"runOnRequirements": [
5+
{
6+
"minServerVersion": "6.0"
7+
}
8+
],
9+
"createEntities": [
10+
{
11+
"client": {
12+
"id": "client",
13+
"observeEvents": [
14+
"commandSucceededEvent",
15+
"commandFailedEvent",
16+
"connectionClosedEvent",
17+
"connectionCreatedEvent"
18+
]
19+
}
20+
},
21+
{
22+
"database": {
23+
"id": "database",
24+
"client": "client",
25+
"databaseName": "test"
26+
}
27+
}
28+
],
29+
"tests": [
30+
{
31+
"description": "metadata append does not create new connections or close existing ones and no hello command is sent",
32+
"operations": [
33+
{
34+
"name": "runCommand",
35+
"object": "database",
36+
"arguments": {
37+
"commandName": "ping",
38+
"command": {
39+
"ping": 1
40+
}
41+
},
42+
"expectResult": {
43+
"ok": 1
44+
}
45+
},
46+
{
47+
"name": "appendMetadata",
48+
"object": "client",
49+
"arguments": {
50+
"driverInfoOptions": {
51+
"name": "framework",
52+
"version": "2.0",
53+
"platform": "Framework Platform"
54+
}
55+
}
56+
},
57+
{
58+
"name": "runCommand",
59+
"object": "database",
60+
"arguments": {
61+
"commandName": "ping",
62+
"command": {
63+
"ping": 1
64+
}
65+
},
66+
"expectResult": {
67+
"ok": 1
68+
}
69+
}
70+
],
71+
"expectEvents": [
72+
{
73+
"client": "client",
74+
"eventType": "cmap",
75+
"events": [
76+
{
77+
"connectionCreatedEvent": {}
78+
}
79+
]
80+
},
81+
{
82+
"client": "client",
83+
"eventType": "command",
84+
"events": [
85+
{
86+
"commandSucceededEvent": {
87+
"commandName": "ping"
88+
}
89+
},
90+
{
91+
"commandSucceededEvent": {
92+
"commandName": "ping"
93+
}
94+
}
95+
]
96+
}
97+
]
98+
}
99+
]
100+
}

0 commit comments

Comments
 (0)