smoke: REST API regression harness + baseline snapshots (Meteor 1.6.1.1)
Adds a standalone Node smoke test (smoke/) that exercises every REST endpoint consumed by the Flutter app against a seeded local dev server and compares responses to committed snapshots. This is the safety net for the Meteor upgrade: it must stay byte-identical after every escala. - smoke/seed.js: deterministic Mongo seed (fixed ObjectIds, geo indexes) - smoke/run.js: calls endpoints, normalizes volatile fields, diffs snapshots - smoke/smoke.sh: seed + run wrapper - smoke/snapshots/: baseline captured on Meteor 1.6.1.1 - IPGeocoder.js: degrade gracefully when MaxMind DB absent (dev boot) - settings-development.json: dev-only internalApiToken to enable the REST API - .meteorignore: exclude smoke/ from the Meteor server build
This commit is contained in:
parent
39415808bf
commit
296dab4f38
18 changed files with 539 additions and 4 deletions
4
smoke/snapshots/fires_in.json
Normal file
4
smoke/snapshots/fires_in.json
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"real": 2,
|
||||
"total": 2
|
||||
}
|
||||
30
smoke/snapshots/fires_in_full.json
Normal file
30
smoke/snapshots/fires_in_full.json
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
"falsePos": [],
|
||||
"fires": [
|
||||
{
|
||||
"_id": {
|
||||
"_str": "a0000000000000000000000a"
|
||||
},
|
||||
"lat": 40.41,
|
||||
"lon": -3.7,
|
||||
"scan": 0.5,
|
||||
"track": 0.4,
|
||||
"type": "viirs",
|
||||
"when": "2024-01-01T00:00:00.000Z"
|
||||
},
|
||||
{
|
||||
"_id": {
|
||||
"_str": "b0000000000000000000000b"
|
||||
},
|
||||
"lat": 40.43,
|
||||
"lon": -3.68,
|
||||
"scan": 0.5,
|
||||
"track": 0.4,
|
||||
"type": "viirs",
|
||||
"when": "2024-01-02T00:00:00.000Z"
|
||||
}
|
||||
],
|
||||
"industries": [],
|
||||
"real": 2,
|
||||
"total": 2
|
||||
}
|
||||
9
smoke/snapshots/mobile_falsepositive_post.json
Normal file
9
smoke/snapshots/mobile_falsepositive_post.json
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"data": {
|
||||
"upsert": {
|
||||
"insertedId": "<insertedId>",
|
||||
"numberAffected": 1
|
||||
}
|
||||
},
|
||||
"status": "success"
|
||||
}
|
||||
29
smoke/snapshots/mobile_subscriptions_all.json
Normal file
29
smoke/snapshots/mobile_subscriptions_all.json
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
"data": {
|
||||
"count": 1,
|
||||
"subscriptions": [
|
||||
{
|
||||
"_id": {
|
||||
"_str": "d0000000000000000000000d"
|
||||
},
|
||||
"createdAt": "<createdAt>",
|
||||
"distance": 40,
|
||||
"geo": {
|
||||
"coordinates": [
|
||||
-3.7,
|
||||
40.41
|
||||
],
|
||||
"type": "Point"
|
||||
},
|
||||
"location": {
|
||||
"lat": 40.41,
|
||||
"lon": -3.7
|
||||
},
|
||||
"owner": "<owner>",
|
||||
"type": "mobile",
|
||||
"updatedAt": "<updatedAt>"
|
||||
}
|
||||
]
|
||||
},
|
||||
"status": "success"
|
||||
}
|
||||
4
smoke/snapshots/mobile_subscriptions_delete.json
Normal file
4
smoke/snapshots/mobile_subscriptions_delete.json
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"data": {},
|
||||
"status": "success"
|
||||
}
|
||||
6
smoke/snapshots/mobile_subscriptions_post.json
Normal file
6
smoke/snapshots/mobile_subscriptions_post.json
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"data": {
|
||||
"subsId": "d0000000000000000000000d"
|
||||
},
|
||||
"status": "success"
|
||||
}
|
||||
13
smoke/snapshots/mobile_users_post.json
Normal file
13
smoke/snapshots/mobile_users_post.json
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"data": {
|
||||
"lang": "es",
|
||||
"mobileToken": "smoke-mobile-token",
|
||||
"upsertResult": {
|
||||
"insertedId": "<insertedId>",
|
||||
"numberAffected": 1
|
||||
},
|
||||
"userId": "<userId>",
|
||||
"username": "<username>"
|
||||
},
|
||||
"status": "success"
|
||||
}
|
||||
3
smoke/snapshots/status_active_fires_count.json
Normal file
3
smoke/snapshots/status_active_fires_count.json
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"total": 2
|
||||
}
|
||||
9
smoke/snapshots/status_last_fire_check.json
Normal file
9
smoke/snapshots/status_last_fire_check.json
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"_id": {
|
||||
"_str": "51e00000000000000000000c"
|
||||
},
|
||||
"createdAt": "2024-01-01T00:00:00.000Z",
|
||||
"name": "last-fire-check",
|
||||
"updatedAt": "2024-01-01T00:00:00.000Z",
|
||||
"value": "2024-01-01T00:00:00.000Z"
|
||||
}
|
||||
29
smoke/snapshots/status_last_fire_detected.json
Normal file
29
smoke/snapshots/status_last_fire_detected.json
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
"_id": {
|
||||
"_str": "b0000000000000000000000b"
|
||||
},
|
||||
"acq_date": "2024-01-01",
|
||||
"acq_time": "00:05",
|
||||
"bright_ti4": 331,
|
||||
"bright_ti5": 292,
|
||||
"confidence": 60,
|
||||
"createdAt": "2024-01-01T00:00:00.000Z",
|
||||
"daynight": "N",
|
||||
"frp": 6.1,
|
||||
"lat": 40.43,
|
||||
"lon": -3.68,
|
||||
"ourid": {
|
||||
"coordinates": [
|
||||
-3.68,
|
||||
40.43
|
||||
],
|
||||
"type": "Point"
|
||||
},
|
||||
"satellite": "N",
|
||||
"scan": 0.5,
|
||||
"track": 0.4,
|
||||
"type": "viirs",
|
||||
"updatedAt": "2024-01-01T00:00:00.000Z",
|
||||
"version": "1.0NRT",
|
||||
"when": "2024-01-02T00:00:00.000Z"
|
||||
}
|
||||
23
smoke/snapshots/status_subs_public_union.json
Normal file
23
smoke/snapshots/status_subs_public_union.json
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"data": {
|
||||
"bounds": {
|
||||
"_id": {
|
||||
"_str": "51e0000000000000000000b2"
|
||||
},
|
||||
"createdAt": "2024-01-01T00:00:00.000Z",
|
||||
"name": "subs-public-union-bounds",
|
||||
"updatedAt": "2024-01-01T00:00:00.000Z",
|
||||
"value": "{\"ne\":{\"lat\":41.41,\"lon\":-2.7},\"sw\":{\"lat\":39.41,\"lon\":-4.7}}"
|
||||
},
|
||||
"union": {
|
||||
"_id": {
|
||||
"_str": "51e0000000000000000000a1"
|
||||
},
|
||||
"createdAt": "2024-01-01T00:00:00.000Z",
|
||||
"name": "subs-public-union",
|
||||
"updatedAt": "2024-01-01T00:00:00.000Z",
|
||||
"value": "{\"type\":\"Feature\",\"geometry\":{\"type\":\"MultiPolygon\",\"coordinates\":[[[[-4.7,39.41],[-2.7,39.41],[-2.7,41.41],[-4.7,41.41],[-4.7,39.41]]]]}}"
|
||||
}
|
||||
},
|
||||
"status": "success"
|
||||
}
|
||||
3
smoke/snapshots/status_uptime.json
Normal file
3
smoke/snapshots/status_uptime.json
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"ms": "<ms>"
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue