~ubuntu-branches/ubuntu/vivid/foodcritic/vivid-proposed

« back to all changes in this revision

Viewing changes to features/006_check_file_mode.feature

  • Committer: Package Import Robot
  • Author(s): Stefano Rivera
  • Date: 2013-06-11 00:34:40 UTC
  • Revision ID: package-import@ubuntu.com-20130611003440-czusooxs9rrpe6sb
Tags: upstream-2.1.0
ImportĀ upstreamĀ versionĀ 2.1.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Feature: Check file mode
 
2
 
 
3
  In order to ensure that file and directory permissions are applied correctly
 
4
  As a developer
 
5
  I want to identify where the mode may not be interpreted as expected
 
6
 
 
7
  Scenario Outline: Specifying file mode
 
8
    Given a <resource> resource declared with the mode <mode>
 
9
    When I check the cookbook
 
10
    Then the warning 006 should be <shown_where_invalid>
 
11
 
 
12
    Examples:
 
13
      | resource      | mode   | shown_where_invalid |
 
14
      | cookbook_file |  "644" |   valid             |
 
15
      | cookbook_file |   644  | invalid             |
 
16
      | cookbook_file | 00644  |   valid             |
 
17
      | directory     |   755  | invalid             |
 
18
      | directory     |  "755" |   valid             |
 
19
      | directory     |  0644  |   valid             |
 
20
      | directory     | "0644" |   valid             |
 
21
      | directory     |   400  | invalid             |
 
22
      | directory     | 00400  |   valid             |
 
23
      | file          |  "755" |   valid             |
 
24
      | file          |   755  | invalid             |
 
25
      | file          |   644  | invalid             |
 
26
      | file          |   044  | invalid             |
 
27
      | file          | "0644" |   valid             |
 
28
      | template      |  00400 |   valid             |
 
29
      | template      |   400  | invalid             |
 
30
      | template      |  "400" |   valid             |
 
31
 
 
32
  Scenario: Unspecified mode
 
33
    Given a file resource declared without a mode
 
34
    When I check the cookbook
 
35
    Then the warning 006 should not be displayed