Skip to content

Commit 24170dd

Browse files
authored
PYTHON-3523 Remove getNonce command usage for 6.2+ (#1135)
1 parent a4c90ae commit 24170dd

25 files changed

+1982
-1887
lines changed

.evergreen/resync-specs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ do
100100
rm $PYMONGO/test/cmap/wait-queue-fairness.json # PYTHON-1873
101101
;;
102102
apm|APM|command-monitoring|command_monitoring)
103-
cpjson command-monitoring/tests command_monitoring
103+
cpjson command-logging-and-monitoring/tests/monitoring command_monitoring
104104
;;
105105
crud|CRUD)
106106
cpjson crud/tests/ crud
Lines changed: 154 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,154 @@
1+
{
2+
"description": "bulkWrite",
3+
"schemaVersion": "1.0",
4+
"createEntities": [
5+
{
6+
"client": {
7+
"id": "client",
8+
"observeEvents": [
9+
"commandStartedEvent",
10+
"commandSucceededEvent",
11+
"commandFailedEvent"
12+
]
13+
}
14+
},
15+
{
16+
"database": {
17+
"id": "database",
18+
"client": "client",
19+
"databaseName": "command-monitoring-tests"
20+
}
21+
},
22+
{
23+
"collection": {
24+
"id": "collection",
25+
"database": "database",
26+
"collectionName": "test"
27+
}
28+
}
29+
],
30+
"initialData": [
31+
{
32+
"collectionName": "test",
33+
"databaseName": "command-monitoring-tests",
34+
"documents": [
35+
{
36+
"_id": 1,
37+
"x": 11
38+
},
39+
{
40+
"_id": 2,
41+
"x": 22
42+
},
43+
{
44+
"_id": 3,
45+
"x": 33
46+
}
47+
]
48+
}
49+
],
50+
"tests": [
51+
{
52+
"description": "A successful mixed bulk write",
53+
"operations": [
54+
{
55+
"name": "bulkWrite",
56+
"object": "collection",
57+
"arguments": {
58+
"requests": [
59+
{
60+
"insertOne": {
61+
"document": {
62+
"_id": 4,
63+
"x": 44
64+
}
65+
}
66+
},
67+
{
68+
"updateOne": {
69+
"filter": {
70+
"_id": 3
71+
},
72+
"update": {
73+
"$set": {
74+
"x": 333
75+
}
76+
}
77+
}
78+
}
79+
]
80+
}
81+
}
82+
],
83+
"expectEvents": [
84+
{
85+
"client": "client",
86+
"events": [
87+
{
88+
"commandStartedEvent": {
89+
"command": {
90+
"insert": "test",
91+
"documents": [
92+
{
93+
"_id": 4,
94+
"x": 44
95+
}
96+
],
97+
"ordered": true
98+
},
99+
"commandName": "insert",
100+
"databaseName": "command-monitoring-tests"
101+
}
102+
},
103+
{
104+
"commandSucceededEvent": {
105+
"reply": {
106+
"ok": 1,
107+
"n": 1
108+
},
109+
"commandName": "insert"
110+
}
111+
},
112+
{
113+
"commandStartedEvent": {
114+
"command": {
115+
"update": "test",
116+
"updates": [
117+
{
118+
"q": {
119+
"_id": 3
120+
},
121+
"u": {
122+
"$set": {
123+
"x": 333
124+
}
125+
},
126+
"upsert": {
127+
"$$unsetOrMatches": false
128+
},
129+
"multi": {
130+
"$$unsetOrMatches": false
131+
}
132+
}
133+
],
134+
"ordered": true
135+
},
136+
"commandName": "update",
137+
"databaseName": "command-monitoring-tests"
138+
}
139+
},
140+
{
141+
"commandSucceededEvent": {
142+
"reply": {
143+
"ok": 1,
144+
"n": 1
145+
},
146+
"commandName": "update"
147+
}
148+
}
149+
]
150+
}
151+
]
152+
}
153+
]
154+
}

test/command_monitoring/command.json

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
{
2+
"description": "command",
3+
"schemaVersion": "1.0",
4+
"createEntities": [
5+
{
6+
"client": {
7+
"id": "client",
8+
"observeEvents": [
9+
"commandStartedEvent",
10+
"commandSucceededEvent",
11+
"commandFailedEvent"
12+
]
13+
}
14+
},
15+
{
16+
"database": {
17+
"id": "database",
18+
"client": "client",
19+
"databaseName": "command-monitoring-tests"
20+
}
21+
},
22+
{
23+
"collection": {
24+
"id": "collection",
25+
"database": "database",
26+
"collectionName": "test"
27+
}
28+
}
29+
],
30+
"initialData": [
31+
{
32+
"collectionName": "test",
33+
"databaseName": "command-monitoring-tests",
34+
"documents": [
35+
{
36+
"_id": 1,
37+
"x": 11
38+
}
39+
]
40+
}
41+
],
42+
"tests": [
43+
{
44+
"description": "A successful command",
45+
"operations": [
46+
{
47+
"name": "runCommand",
48+
"object": "database",
49+
"arguments": {
50+
"command": {
51+
"ping": 1
52+
},
53+
"commandName": "ping"
54+
}
55+
}
56+
],
57+
"expectEvents": [
58+
{
59+
"client": "client",
60+
"events": [
61+
{
62+
"commandStartedEvent": {
63+
"command": {
64+
"ping": 1
65+
},
66+
"commandName": "ping",
67+
"databaseName": "command-monitoring-tests"
68+
}
69+
},
70+
{
71+
"commandSucceededEvent": {
72+
"reply": {
73+
"ok": 1
74+
},
75+
"commandName": "ping"
76+
}
77+
}
78+
]
79+
}
80+
]
81+
}
82+
]
83+
}

0 commit comments

Comments
 (0)