pacemaker/0006-Test-cts-fencing-Add-a-test-for-metadata.patch
Klaus Wenninger d819ba1cda * Mon Sep 13 2021 Klaus Wenninger <kwenning@redhat.com> - 2.1.1-8
- added test for getting metadata via stonith_admin
2021-09-13 23:34:20 +02:00

39 lines
1.4 KiB
Diff

From 18b4c8170efaa4e17fcbfcd2873722de45fb9d25 Mon Sep 17 00:00:00 2001
From: Grace Chin <gchin@redhat.com>
Date: Wed, 18 Aug 2021 09:42:57 -0400
Subject: [PATCH] Test: cts-fencing: Add a test for --metadata
---
cts/cts-fencing.in | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/cts/cts-fencing.in b/cts/cts-fencing.in
index 8dc5ec8..c4697ee 100644
--- a/cts/cts-fencing.in
+++ b/cts/cts-fencing.in
@@ -1423,6 +1423,13 @@ class Tests(object):
test.add_stonith_log_pattern("perform 'reboot' action targeting node_fake using true2")
test.add_stonith_neg_log_pattern("node_fake with true3")
+ def build_query_tests(self):
+ """ run stonith_admin --metadata for the fence_dummy agent and check command output """
+
+ test = self.new_test("get_metadata",
+ "Run stonith_admin --metadata for the fence_dummy agent", 1)
+ test.add_cmd_check_stdout("stonith_admin", "--output-as=xml -a fence_dummy --metadata", '<shortdesc lang')
+
def setup_environment(self, use_corosync):
""" Prepare the host before executing any tests """
@@ -1551,6 +1558,7 @@ def main(argv):
tests.build_unfence_on_target_tests()
tests.build_nodeid_tests()
tests.build_remap_tests()
+ tests.build_query_tests()
if opts.options['list-tests']:
tests.print_list()
--
1.8.3.1