fence-agents: master - testing: Extend tests of using invalid keys for "options"

Marek GrĂ¡c marx at fedoraproject.org
Sun Mar 2 13:57:47 UTC 2014


Gitweb:        http://git.fedorahosted.org/git/?p=fence-agents.git;a=commitdiff;h=a6f6979c26b474ac0ef2695a39e45fcf26fa57f2
Commit:        a6f6979c26b474ac0ef2695a39e45fcf26fa57f2
Parent:        f1ee9c18423a1c65ccab4650601bd0146f200ef3
Author:        Marek 'marx' Grac <mgrac at redhat.com>
AuthorDate:    Thu Feb 27 14:52:08 2014 +0100
Committer:     Marek 'marx' Grac <mgrac at redhat.com>
CommitterDate: Sun Mar 2 14:57:33 2014 +0100

testing: Extend tests of using invalid keys for "options"

Previously only keys that match [--.*] where considered because [-.*] should not be used in
v4.x at all. Currently, tests where extended to find also these problems.

Relevant: rhbz#1018780
---
 fence/agents/lib/check_used_options.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/fence/agents/lib/check_used_options.py b/fence/agents/lib/check_used_options.py
index 2d75756..86dc35f 100755
--- a/fence/agents/lib/check_used_options.py
+++ b/fence/agents/lib/check_used_options.py
@@ -38,8 +38,8 @@ def main():
 
 	## check if all options are defined
 	agent_file = open(agent)
-	option_use_re = re.compile("options\[\"(--[^\"]*)\"\]")
-	option_has_re = re.compile("options.has_key\(\"(--[^\"]*)\"\)")
+	option_use_re = re.compile("options\[\"(-[^\"]*)\"\]")
+	option_has_re = re.compile("options.has_key\(\"(-[^\"]*)\"\)")
 
 	counter = 0
 	without_errors = True


More information about the cluster-commits mailing list