[roads] QA F-04: a dangling owner or group member drops only itself, not every plan
Deleting a person from directory.json without editing devices.json left a dangling owner, a snapshot error, and so no plans for anybody. A well-formed owner or member id that is not a person is now reported on its own codes (devices.owner-unknown, directory.member-unknown) and removed: the device is ownerless, the member leaves the group. Malformed ids, duplicates and bad JSON still stop every plan. Two new structural fixtures keep devices.owner and directory.member covered.
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"format": 1,
|
||||
"people": [
|
||||
{ "id": "mark", "name": "Mark" },
|
||||
{ "id": "jana", "name": "Jana" },
|
||||
{ "id": "petr", "name": "Petr" },
|
||||
{ "id": "eva", "name": "Eva" }
|
||||
],
|
||||
"groups": [
|
||||
{ "id": "household", "name": "Household", "members": ["mark", "no body"] }
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"format": 1,
|
||||
"people": [
|
||||
{ "id": "mark", "name": "Mark" },
|
||||
{ "id": "jana", "name": "Jana" },
|
||||
{ "id": "petr", "name": "Petr" },
|
||||
{ "id": "eva", "name": "Eva" }
|
||||
],
|
||||
"groups": [
|
||||
{ "id": "household", "name": "Household", "members": ["mark", "mark"] }
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"format": 1,
|
||||
"devices": [
|
||||
{ "key": "AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQE", "name": "mark-pc", "owner": "mark", "address": "100.96.0.1" },
|
||||
{ "key": "AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI", "name": "home-server", "owner": "mark", "address": "100.96.0.2", "exit": true, "relay": true,
|
||||
"routes": ["192.168.100.0/24"],
|
||||
"services": [
|
||||
{ "host": "photos.home.arpa", "ports": ["tcp/443"] },
|
||||
{ "host": "git.home.arpa", "ports": ["tcp/443", "tcp/22"] }
|
||||
] },
|
||||
{ "key": "AwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwM", "name": "jana-phone", "owner": "jana", "address": "100.96.0.3" },
|
||||
{ "key": "BAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQ", "name": "jana-laptop", "owner": "jana", "address": "100.96.0.4" },
|
||||
{ "key": "BQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQU", "name": "router", "address": "100.96.0.5", "classic": true },
|
||||
{ "key": "BgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgY", "name": "friend-node", "owner": "petr", "address": "100.96.0.6", "exit": true },
|
||||
{ "key": "BwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwc", "name": "petr-phone", "owner": "no body", "address": "100.96.0.7" }
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user