nistude/cucumber-puppet.example — Issue #1: Cucumber-puppet fails on module/dhcp/features
Author: philandstuff
Created: 2012-01-16 10:33:16+00:00
State: open

I have a clean checkout of this repo, and I can get the root-level features to pass, but the module/dhcp/features don't seem to pass. Am I doing something wrong?

```
philippotter ~/src/cucumber-puppet.example $ cucumber-puppet --version
0.3.7
philippotter ~/src/cucumber-puppet.example $ puppet --version
2.7.9
philippotter ~/src/cucumber-puppet.example $ cucumber --version
1.1.4
philippotter ~/src/cucumber-puppet.example $ git status
# On branch master
nothing to commit (working directory clean)
philippotter ~/src/cucumber-puppet.example $ cucumber-puppet features/
Feature: Catalog policy
In order to ensure basic correctness
I want all catalogs to obey my policy

Scenario Outline: Generic policy for all server roles # features/catalog_policy.feature:5
Given a node with role "" # features/steps/catalog_policy.rb:1
When I compile its catalog # cucumber-puppet-0.3.7/lib/cucumber-puppet/steps.rb:14
Then compilation should succeed # cucumber-puppet-0.3.7/lib/cucumber-puppet/steps.rb:48
And puppet should ensure all packages are up-to-date # features/steps/catalog_policy.rb:7

Examples:
| server_role |
| dhcp_server |

1 scenario (1 passed)
4 steps (4 passed)
0m0.223s
philippotter ~/src/cucumber-puppet.example $ cucumber-puppet modules/dhcp/features/
Feature: Read DHCP clients from file
File format: ip_address hostname mac_address

Scenario: Read client list from file # modules/dhcp/features/dhcp_clients.feature:4
Given a file containing DHCP clients # modules/dhcp/features/steps/dhcp_clients.rb:1
"""
1.1.1.1 one.example.com 1:1:1:1:1:1
# ignores comments and empty lines

1.1.1.2 two.example.com 1:1:1:1:1:2
"""
When I call dhcp_clients with this file # modules/dhcp/features/steps/dhcp_clients.rb:7
Then it should return the parsed list of clients # modules/dhcp/features/steps/dhcp_clients.rb:11

Feature: Create static host entries from file

Scenario: Create an entry for each host # modules/dhcp/features/dhcpd.conf.feature:3
Given a hosts file with # modules/dhcp/features/steps/dhcpd.conf.rb:1
"""
1.1.1.1 one.example.com 1:1:1:1:1:1
1.1.1.2 two.example.com 1:1:1:1:1:2
"""
And a node of class "dhcp::server" using this file # modules/dhcp/features/steps/dhcpd.conf.rb:8
When I compile its catalog # cucumber-puppet-0.3.7/lib/cucumber-puppet/steps.rb:14
Function 'dhcp_clients' does not return a value at /Users/philippotter/src/cucumber-puppet.example/modules/dhcp/manifests/server.pp:6 on node dhcp_server (Puppet::Error)
modules/dhcp/features/dhcpd.conf.feature:10:in `When I compile its catalog'
Then file "/etc/dhcp/dhcpd.conf" should contain # modules/dhcp/features/steps/dhcpd.conf.rb:13
"""
host one.example.com {
hardware ethernet 1:1:1:1:1:1;
fixed-address 1.1.1.1;
}

host two.example.com {
hardware ethernet 1:1:1:1:1:2;
fixed-address 1.1.1.2;
}
"""

Failing Scenarios:
cucumber modules/dhcp/features/dhcpd.conf.feature:3 # Scenario: Create an entry for each host

2 scenarios (1 failed, 1 passed)
7 steps (1 failed, 1 skipped, 5 passed)
0m0.181s
```