Skip to content

Commit 656b60d

Browse files
committed
feat: update mgodatagen template configuration with more data type and index examples
1 parent 570e6b4 commit 656b60d

1 file changed

Lines changed: 58 additions & 3 deletions

File tree

internal/web/tests/02-run.spec.ts

Lines changed: 58 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -263,14 +263,69 @@ test('test mgodatagen template', async ({ page }) => {
263263
await expectEditorContent('config', `[
264264
{
265265
"collection": "collection",
266-
"count": 10,
266+
"count": 3,
267267
"content": {
268-
"key": {
268+
"enum": {
269+
"type": "enum",
270+
"values": [
271+
"abc",
272+
"xyz",
273+
"123"
274+
]
275+
},
276+
"int": {
269277
"type": "int",
270278
"min": 0,
271279
"max": 10
280+
},
281+
"coordinates": {
282+
"type": "enum",
283+
"values": [
284+
{
285+
"coordinates": [
286+
53.23,
287+
67.12
288+
],
289+
"type": "Point"
290+
},
291+
{
292+
"coordinates": [
293+
54.23,
294+
67.12
295+
],
296+
"type": "Point"
297+
},
298+
{
299+
"coordinates": [
300+
51.23,
301+
64.12
302+
],
303+
"type": "Point"
304+
}
305+
]
272306
}
273-
}
307+
},
308+
"indexes": [
309+
{
310+
"name": "single_idx",
311+
"key": {
312+
"enum": 1
313+
}
314+
},
315+
{
316+
"name": "compund_idx",
317+
"key": {
318+
"enum": -1,
319+
"int": -1
320+
}
321+
},
322+
{
323+
"name": "2dsphere_idx",
324+
"key": {
325+
"coordinates": "2dsphere"
326+
}
327+
}
328+
]
274329
}
275330
]`)
276331

0 commit comments

Comments
 (0)