From f5bfd509abdea45b0cef8accd544f1099b6377c4 Mon Sep 17 00:00:00 2001 From: Haibo Lin Date: Fri, 5 Jun 2020 14:48:13 +0800 Subject: [PATCH] notification: Add compose_path into the messages It's needed by the notification script added in RHELCMP-401. Signed-off-by: Haibo Lin --- pungi/notifier.py | 1 + tests/test_notifier.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/pungi/notifier.py b/pungi/notifier.py index 7ecc14c7..5eed865c 100644 --- a/pungi/notifier.py +++ b/pungi/notifier.py @@ -52,6 +52,7 @@ class PungiNotifier(object): data.setdefault("compose_type", self.compose.compose_type) data.setdefault("compose_respin", self.compose.compose_respin) data.setdefault("compose_label", self.compose.compose_label) + data.setdefault("compose_path", self.compose.topdir) data.setdefault("release_short", self.compose.conf["release_short"]) data.setdefault("release_name", self.compose.conf["release_name"]) data.setdefault("release_version", self.compose.conf["release_version"]) diff --git a/tests/test_notifier.py b/tests/test_notifier.py index 28c0fe55..445b6ff3 100644 --- a/tests/test_notifier.py +++ b/tests/test_notifier.py @@ -29,6 +29,7 @@ class TestNotifier(unittest.TestCase): compose_respin=1, compose_label="Updates-20171031.1021", compose_type="production", + topdir="/a/b", log_warning=mock.Mock(), conf={ "release_name": "Layer", @@ -56,6 +57,7 @@ class TestNotifier(unittest.TestCase): data["compose_type"] = "production" data["compose_respin"] = 1 data["compose_label"] = "Updates-20171031.1021" + data["compose_path"] = "/a/b" data["release_short"] = "L" data["release_name"] = "Layer" data["release_version"] = "27"