From 7b004a297e19aab42dd12006b1cd2d5b4ac7018d Mon Sep 17 00:00:00 2001 From: Achilleas Koutsou Date: Mon, 25 Mar 2024 15:04:36 +0100 Subject: [PATCH] test/systemd.unit: Environment option object Add an org.osbuild.systemd.unit stage using the new format for the Environment option with two instances to the test manifest. The contents of the new dropin file at tree/usr/lib/systemd/system/boltd.service.d/30-boltd-debug.conf are: [Service] Environment="G_MESSAGES_DEBUG=all" Environment="G_MESSAGES_TRACE=none" --- test/data/stages/systemd.unit/b.json | 21 +++++++++++++++++++++ test/data/stages/systemd.unit/b.mpp.yaml | 11 +++++++++++ test/data/stages/systemd.unit/diff.json | 2 ++ 3 files changed, 34 insertions(+) diff --git a/test/data/stages/systemd.unit/b.json b/test/data/stages/systemd.unit/b.json index 858bb842..af7175b0 100644 --- a/test/data/stages/systemd.unit/b.json +++ b/test/data/stages/systemd.unit/b.json @@ -636,6 +636,27 @@ } } } + }, + { + "type": "org.osbuild.systemd.unit", + "options": { + "unit": "boltd.service", + "dropin": "30-boltd-debug.conf", + "config": { + "Service": { + "Environment": [ + { + "key": "G_MESSAGES_DEBUG", + "value": "all" + }, + { + "key": "G_MESSAGES_TRACE", + "value": "none" + } + ] + } + } + } } ] } diff --git a/test/data/stages/systemd.unit/b.mpp.yaml b/test/data/stages/systemd.unit/b.mpp.yaml index 77108c62..ab5b16f0 100644 --- a/test/data/stages/systemd.unit/b.mpp.yaml +++ b/test/data/stages/systemd.unit/b.mpp.yaml @@ -45,3 +45,14 @@ pipelines: config: Unit: ConditionPathExists: /usr/lib/greenboot/greenboot + - type: org.osbuild.systemd.unit + options: + unit: boltd.service + dropin: 30-boltd-debug.conf + config: + Service: + Environment: + - key: "G_MESSAGES_DEBUG" + value: "all" + - key: "G_MESSAGES_TRACE" + value: "none" diff --git a/test/data/stages/systemd.unit/diff.json b/test/data/stages/systemd.unit/diff.json index fedb6dfe..d5abd514 100644 --- a/test/data/stages/systemd.unit/diff.json +++ b/test/data/stages/systemd.unit/diff.json @@ -1,5 +1,7 @@ { "added_files": [ + "/usr/lib/systemd/system/boltd.service.d", + "/usr/lib/systemd/system/boltd.service.d/30-boltd-debug.conf", "/usr/lib/systemd/system/nm-cloud-setup.service.d", "/usr/lib/systemd/system/nm-cloud-setup.service.d/10-rh-enable-for-ec2.conf", "/usr/lib/systemd/user/grub-boot-success.timer.d",