Merge lp:~tvansteenburgh/charm-tools/lp-1357507 into lp:charm-tools/1.3

Proposed by Tim Van Steenburgh
Status: Needs review
Proposed branch: lp:~tvansteenburgh/charm-tools/lp-1357507
Merge into: lp:charm-tools/1.3
Diff against target: 61 lines (+12/-4)
3 files modified
charmtools/charms.py (+5/-4)
tests_functional/create/test_python_create.py (+6/-0)
tests_functional/proof/expected/test (+1/-0)
To merge this branch: bzr merge lp:~tvansteenburgh/charm-tools/lp-1357507
Reviewer Review Type Date Requested Status
Charm Toolers Pending
Review via email: mp+232597@code.launchpad.net

Description of the change

Make non-executable hook file a proof ERROR instead of INFO.

To post a comment you must log in.

Unmerged revisions

338. By Tim Van Steenburgh

Make non-executable hook a proof error

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'charmtools/charms.py'
2--- charmtools/charms.py 2014-06-17 15:44:04 +0000
3+++ charmtools/charms.py 2014-08-28 16:53:40 +0000
4@@ -58,7 +58,7 @@
5 try:
6 mode = os.stat(hook_path)[ST_MODE]
7 if not mode & S_IXUSR:
8- self.info(hook + " not executable")
9+ self.err(hook + " not executable")
10 with open(hook_path, 'r') as hook_file:
11 count = 0
12 for line in hook_file:
13@@ -247,9 +247,10 @@
14
15 charm_basename = os.path.basename(charm_path)
16 if charm['name'] != charm_basename:
17- warn_msg = ("metadata name (%s) must match directory name (%s)"
18- " exactly for local deployment.") % (
19- charm['name'], charm_basename)
20+ warn_msg = (
21+ "metadata name (%s) must match directory name (%s)"
22+ " exactly for local deployment.") % (
23+ charm['name'], charm_basename)
24 lint.warn(warn_msg)
25
26 # summary should be short
27
28=== modified file 'tests_functional/charms/test/hooks/install' (properties changed: +x to -x)
29=== modified file 'tests_functional/create/test_python_create.py'
30--- tests_functional/create/test_python_create.py 2014-06-20 19:46:59 +0000
31+++ tests_functional/create/test_python_create.py 2014-08-28 16:53:40 +0000
32@@ -39,6 +39,8 @@
33
34
35 class PythonCreateTest(TestCase):
36+ maxDiff = None
37+
38 def setUp(self):
39 self.tempdir = tempfile.mkdtemp()
40
41@@ -58,6 +60,10 @@
42 'lib/charmhelpers/core/fstab.py',
43 'lib/charmhelpers/core/hookenv.py',
44 'lib/charmhelpers/core/host.py',
45+ 'lib/charmhelpers/core/services/__init__.py',
46+ 'lib/charmhelpers/core/services/base.py',
47+ 'lib/charmhelpers/core/services/helpers.py',
48+ 'lib/charmhelpers/core/templating.py',
49 ]
50 return sorted(static_files + dynamic_files)
51
52
53=== modified file 'tests_functional/proof/expected/test'
54--- tests_functional/proof/expected/test 2014-05-16 06:06:43 +0000
55+++ tests_functional/proof/expected/test 2014-08-28 16:53:40 +0000
56@@ -9,4 +9,5 @@
57 E: template relations should be renamed to fit charm: relation-name
58 E: template interface names should be changed: interface-name
59 E: template relations should be renamed to fit charm: relation-name
60+E: install not executable
61 I: missing recommended hook config-changed

Subscribers

People subscribed via source and target branches