core: implement AutomountContext/Runtime for io.systemd.Unit.List + tests
This commit is contained in:
@@ -232,6 +232,11 @@ invocation_id="$(systemctl show -P InvocationID systemd-journald.service)"
|
||||
varlinkctl call /run/systemd/io.systemd.Manager io.systemd.Unit.List "{\"invocationID\": \"$invocation_id\"}"
|
||||
# test for KillContext
|
||||
varlinkctl call /run/systemd/io.systemd.Manager io.systemd.Unit.List '{"pid": {"pid": 0}}' | jq -e '.context.Kill'
|
||||
# test for AutomountContext/Runtime
|
||||
automount_id=$(varlinkctl call --collect /run/systemd/io.systemd.Manager io.systemd.Unit.List '{}' | jq -r '.[] | select(.context.Type == "automount" and .runtime.LoadState == "loaded") .context.ID' | grep -v null | tail -n 1)
|
||||
test -n "$automount_id"
|
||||
varlinkctl call /run/systemd/io.systemd.Manager io.systemd.Unit.List "{\"name\": \"$automount_id\"}" | jq -e '.context.Automount'
|
||||
varlinkctl call /run/systemd/io.systemd.Manager io.systemd.Unit.List "{\"name\": \"$automount_id\"}" | jq -e '.runtime.Automount'
|
||||
|
||||
# test io.systemd.Metrics
|
||||
varlinkctl info /run/systemd/report/io.systemd.Manager
|
||||
|
||||
Reference in New Issue
Block a user