From 53c0be79ba1849e77da0358b8685a8fd216f8abf Mon Sep 17 00:00:00 2001 From: yuelg Date: Thu, 16 Mar 2023 17:36:34 +0800 Subject: [PATCH] Fix a unitest error --- cloud-init.spec | 6 +++++- fix-unittests.patch | 11 +++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 fix-unittests.patch diff --git a/cloud-init.spec b/cloud-init.spec index 4fb4f2a..db5b30f 100644 --- a/cloud-init.spec +++ b/cloud-init.spec @@ -1,6 +1,6 @@ Name: cloud-init Version: 21.4 -Release: 7 +Release: 8 Summary: the defacto multi-distribution package that handles early initialization of a cloud instance. License: ASL 2.0 or GPLv3 URL: http://launchpad.net/cloud-init @@ -18,6 +18,7 @@ Patch6: backport-testing-add-additional-mocks-to-test_net-tests-1356.patch Patch7: backport-net-netplan-config-root-read-only-as-wifi-config-can.patch Patch8: backport-netplan-define-features.NETPLAN_CONFIG_ROOT_READ_ONL.patch Patch9: backport-Fix-the-distro.osfamily-output-problem.patch +Patch10: fix-unittests.patch Patch9000: Fix-the-error-level-logs-displayed-for-the-cloud-init-local-service.patch @@ -129,6 +130,9 @@ fi %exclude /usr/share/doc/* %changelog +* Wed Mar 16 2023 bigclouds99 - 21.4-8 +- Fix a unitest error + * Fri Jan 06 2023 shixuantong - 21.4-7 - Fix the distro.osfamily output problem diff --git a/fix-unittests.patch b/fix-unittests.patch new file mode 100644 index 0000000..7e3d761 --- /dev/null +++ b/fix-unittests.patch @@ -0,0 +1,11 @@ +--- a/tests/unittests/test_templating.py 2023-03-16 17:06:26.151150107 +0800 ++++ b/tests/unittests/test_templating.py 2023-03-16 17:06:17.234010784 +0800 +@@ -58,7 +58,7 @@ + blob = "blahblah $blah" + (template_type, _renderer, _contents) = templater.detect_template(blob) + self.assertIn("cheetah", template_type) +- self.assertEqual(blob, contents) ++ self.assertEqual(blob, _contents) + + blob = '##template:something-new' + self.assertRaises(ValueError, templater.detect_template, blob) -- Gitee