Blame SOURCES/0002.patch

ccd223
From fd7b5edbb777d216ba9f94e5023f793fb01583cd Mon Sep 17 00:00:00 2001
ccd223
From: Kairui Song <kasong@redhat.com>
ccd223
Date: Wed, 21 Jul 2021 02:06:36 +0800
ccd223
Subject: [PATCH 2/2] Enable kdump by default
ccd223
ccd223
Signed-off-by: Kairui Song <kasong@redhat.com>
ccd223
---
ccd223
 com_redhat_kdump/service/kdump.py     | 2 +-
ccd223
 com_redhat_kdump/service/kickstart.py | 2 +-
ccd223
 test/unittests/test_kickstart.py      | 4 ++--
ccd223
 3 files changed, 4 insertions(+), 4 deletions(-)
ccd223
ccd223
diff --git a/com_redhat_kdump/service/kdump.py b/com_redhat_kdump/service/kdump.py
ccd223
index 46e7242..4f4cdd1 100755
ccd223
--- a/com_redhat_kdump/service/kdump.py
ccd223
+++ b/com_redhat_kdump/service/kdump.py
ccd223
@@ -41,7 +41,7 @@ class KdumpService(KickstartService):
ccd223
     def __init__(self):
ccd223
         """Create a service."""
ccd223
         super().__init__()
ccd223
-        self._kdump_enabled = False
ccd223
+        self._kdump_enabled = True
ccd223
         self.kdump_enabled_changed = Signal()
ccd223
 
ccd223
         self._fadump_enabled = False
ccd223
diff --git a/com_redhat_kdump/service/kickstart.py b/com_redhat_kdump/service/kickstart.py
ccd223
index c2455a4..32c532f 100644
ccd223
--- a/com_redhat_kdump/service/kickstart.py
ccd223
+++ b/com_redhat_kdump/service/kickstart.py
ccd223
@@ -36,7 +36,7 @@ class KdumpKickstartData(AddonData):
ccd223
 
ccd223
     def __init__(self):
ccd223
         super().__init__()
ccd223
-        self.enabled = False
ccd223
+        self.enabled = True
ccd223
         self.reserve_mb = "auto"
ccd223
         self.enablefadump = False
ccd223
 
ccd223
diff --git a/test/unittests/test_kickstart.py b/test/unittests/test_kickstart.py
ccd223
index 49d73d2..f833504 100644
ccd223
--- a/test/unittests/test_kickstart.py
ccd223
+++ b/test/unittests/test_kickstart.py
ccd223
@@ -26,12 +26,12 @@ class KdumpKickstartTestCase(TestCase):
ccd223
         self.assertEqual(output.strip(), dedent(ks_out).strip())
ccd223
 
ccd223
     def ks_default_test(self):
ccd223
-        self.assertEqual(self._service.kdump_enabled, False)
ccd223
+        self.assertEqual(self._service.kdump_enabled, True)
ccd223
         self.assertEqual(self._service.fadump_enabled, False)
ccd223
         self.assertEqual(self._service.reserved_memory, "auto")
ccd223
 
ccd223
         self._check_ks_output("""
ccd223
-        %addon com_redhat_kdump --disable
ccd223
+        %addon com_redhat_kdump --enable --reserve-mb='auto'
ccd223
 
ccd223
         %end
ccd223
         """)
ccd223
-- 
ccd223
2.31.1
ccd223