From e3fd572b94f8ecba961baf0aa130b8a755f61dd7 Mon Sep 17 00:00:00 2001 From: Achilleas Koutsou Date: Fri, 22 Mar 2024 16:24:23 +0100 Subject: [PATCH] test/systemd_unit_create: add new options to unit test Add the new options to the unit test. --- stages/test/test_systemd_unit_create.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/stages/test/test_systemd_unit_create.py b/stages/test/test_systemd_unit_create.py index 38adef22..b686261d 100644 --- a/stages/test/test_systemd_unit_create.py +++ b/stages/test/test_systemd_unit_create.py @@ -74,6 +74,20 @@ def test_systemd_unit_create(tmp_path, stage_module, unit_type, unit_path, expec "ExecStart": [ "mkdir -p /etc/mydir", "touch /etc/myfile" + ], + "Environment": [ + { + "key": "DEBUG", + "value": "1", + }, + { + "key": "TRACE", + "value": "1", + }, + ], + "EnvironmentFile": [ + "/etc/example.env", + "/etc/second.env", ] }, "Install": { @@ -104,6 +118,10 @@ def test_systemd_unit_create(tmp_path, stage_module, unit_type, unit_path, expec RemainAfterExit=True ExecStart=mkdir -p /etc/mydir ExecStart=touch /etc/myfile + Environment="DEBUG=1" + Environment="TRACE=1" + EnvironmentFile=/etc/example.env + EnvironmentFile=/etc/second.env [Install] WantedBy=local-fs.target