reserved-exempt
Tests one part of the structure checks.
Our implementation passes this case when its check --json output for the input below equals the expected
output.
Input
nodes/a.md---
id: a
type: svc
---nodes/g.md---
id: g
type: group
---nodes/p.md---
id: p
type: plane
fields:
order: 1
---nodes/r.md---
id: r
type: rule
fields:
statement: s
severity: error
check: {require_fields: [owner]}
---Expected output
0 ghosts · 0 load errors · 4 nodes · 1 results
expected.json{
"ghosts": [],
"load_errors": [],
"nodes": [
{
"body": "",
"fields": {},
"id": "a",
"links": [],
"parent": null,
"plane": null,
"title": "a",
"type": "svc"
},
{
"body": "",
"fields": {},
"id": "g",
"links": [],
"parent": null,
"plane": null,
"title": "g",
"type": "group"
},
{
"body": "",
"fields": {
"order": 1
},
"id": "p",
"links": [],
"parent": null,
"plane": null,
"title": "p",
"type": "plane"
},
{
"body": "",
"fields": {
"check": {
"require_fields": [
"owner"
]
},
"severity": "error",
"statement": "s"
},
"id": "r",
"links": [],
"parent": null,
"plane": null,
"title": "r",
"type": "rule"
}
],
"results": [
{
"node": "a",
"rule": "r",
"severity": "error",
"status": "fail"
}
],
"structure": {
"errors": [],
"warnings": []
}
}