/* ServiceContext enums */
TEST_IDL_ENUM(ServiceType, service_type, vl_type_ServiceType);
+ TEST_IDL_ENUM(ServiceExitType, service_exit_type, vl_type_ServiceExitType);
+ TEST_IDL_ENUM(ServiceRestart, service_restart, vl_type_ServiceRestart);
+ TEST_IDL_ENUM(ServiceRestartMode, service_restart_mode, vl_type_ServiceRestartMode);
+ TEST_IDL_ENUM(ServiceTimeoutFailureMode, service_timeout_failure_mode, vl_type_ServiceTimeoutFailureMode);
+
+ /* ServiceRuntime enums */
+ TEST_IDL_ENUM(NotifyAccess, notify_access, vl_type_NotifyAccess);
+ TEST_IDL_ENUM(ServiceResult, service_result, vl_type_ServiceResult);
/* PathContext enums */
TEST_IDL_ENUM(PathType, path_type, vl_type_PathType);
path_params=$(jq -cn --arg name "$path_id" '{name: $name}')
varlinkctl call /run/systemd/io.systemd.Manager io.systemd.Unit.List "$path_params" | jq -e '.context.Path'
varlinkctl call /run/systemd/io.systemd.Manager io.systemd.Unit.List "$path_params" | jq -e '.runtime.Path'
+# test for ServiceContext/Runtime
+service_id=$(varlinkctl call --collect /run/systemd/io.systemd.Manager io.systemd.Unit.List '{}' | jq -r '.[] | select(.context.Type == "service" and .runtime.LoadState == "loaded") .context.ID // empty' | tail -n 1)
+test -n "$service_id"
+service_params=$(jq -cn --arg name "$service_id" '{name: $name}')
+varlinkctl call /run/systemd/io.systemd.Manager io.systemd.Unit.List "$service_params" | jq -e '.context.Service'
+varlinkctl call /run/systemd/io.systemd.Manager io.systemd.Unit.List "$service_params" | jq -e '.runtime.Service'
# test for ScopeContext/Runtime
scope_id=$(varlinkctl call --collect /run/systemd/io.systemd.Manager io.systemd.Unit.List '{}' | jq -r '.[] | select(.context.Type == "scope" and .runtime.LoadState == "loaded") .context.ID // empty' | tail -n 1)
test -n "$scope_id"