Permalink
Browse files

Squashed commit of the following:

commit cbd7f9a
Merge: 7369711 8b73ec1
Author: Joseph Anthony Pasquale Holsten <joseph@josephholsten.com>
Date:   Sun Feb 27 12:41:39 2011 -0600

    merge gem runner

commit 7369711
Merge: b87f558 5984e85
Author: Joseph Anthony Pasquale Holsten <joseph@josephholsten.com>
Date:   Sun Feb 27 12:39:44 2011 -0600

    merge bundle clean

commit 8b73ec1
Author: Joseph Anthony Pasquale Holsten <joseph@josephholsten.com>
Date:   Fri Feb 25 02:42:49 2011 -0600

    move cucumber-nagios from generated script onto gem path

    	* Rakefile: add cucumber-nagios to executables
    	* lib/generators/project/bin/cucumber-nagios -> bin/cucumber-nagios: use cwd, not install path
    	* features/installing.feature: use cucumber-nagios from path
    	* features/steps/creating_steps.rb: use cucumber-nagios from path
    	* features/steps/installing_steps.rb: use cucumber-nagios from path
    	* features/steps/using_steps.rb: use cucumber-nagios from path
    	* lib/generators/project/README: use cucumber-nagios from path

commit 5984e85
Author: Joseph Anthony Pasquale Holsten <joseph@josephholsten.com>
Date:   Sun Feb 27 10:29:48 2011 -0600

    convert to bundler for gem creation

        * .gitignore (.bundle): add
        * Gemfile, Gemfile.lock, MANIFEST: add
        * Rakefile: remove jeweler, test tasks. add bundler
        * cucumber-nagios.gemspec: simplify. use MANIFEST
        * lib/generators/project/Gemfile: only use cucumber-nagios deps
        * README.md: point contributors to HACKING
        * HACKING: rewrite

commit b87f558
Author: Joseph Anthony Pasquale Holsten <joseph@josephholsten.com>
Date:   Sun Feb 27 06:48:36 2011 -0600

    revert to silenced system

commit f52c3dc
Author: Joseph Anthony Pasquale Holsten <joseph@josephholsten.com>
Date:   Sun Feb 27 06:47:27 2011 -0600

    remove generated bin/cucumber-nagios and update tests

commit e4506cf
Author: Joseph Anthony Pasquale Holsten <joseph@josephholsten.com>
Date:   Sun Feb 27 06:31:56 2011 -0600

    tweak bin/cucumber-nagios to work from inside gem

commit bab6ec2
Merge: 397720f 2dcda55
Author: Joseph Anthony Pasquale Holsten <joseph@josephholsten.com>
Date:   Sun Feb 27 06:22:15 2011 -0600

    merge in bundler

commit 2dcda55
Author: Joseph Anthony Pasquale Holsten <joseph@josephholsten.com>
Date:   Sun Feb 27 06:13:48 2011 -0600

    mention environment setup

commit bff7675
Author: Joseph Anthony Pasquale Holsten <joseph@josephholsten.com>
Date:   Sun Feb 27 06:09:51 2011 -0600

    add contributing note to readme

commit fc70d83
Author: Lindsay Holmwood <lindsay@holmwood.id.au>
Date:   Thu Feb 3 01:02:34 2011 +1100

    convert to bundler for gem creation

    	* .gitignore (.bundle): add
    	* Gemfile, Gemfile.lock, MANIFEST: add
    	* Rakefile: remove jeweler, test tasks. add bundler
    	* cucumber-nagios.gemspec: simplify. use MANIFEST
    	* lib/generators/project/Gemfile: only use cucumber-nagios deps

commit 397720f
Author: Joseph Anthony Pasquale Holsten <joseph@josephholsten.com>
Date:   Sun Feb 27 05:37:42 2011 -0600

    convert to bundler for gem creation

commit 1fbf551
Author: Joseph Anthony Pasquale Holsten <joseph@josephholsten.com>
Date:   Sun Feb 27 05:15:48 2011 -0600

    ignore .bundle config

commit 263f766
Author: Joseph Anthony Pasquale Holsten <joseph@josephholsten.com>
Date:   Sun Feb 27 05:14:23 2011 -0600

    ignore bundler files

commit 7d41194
Author: Joseph Anthony Pasquale Holsten <joseph@josephholsten.com>
Date:   Sun Feb 27 04:35:34 2011 -0600

    Initial commit to great-website-tests.

commit 585763d
Author: Joseph Anthony Pasquale Holsten <joseph@josephholsten.com>
Date:   Fri Feb 25 14:36:24 2011 -0600

    not that high

commit 47a8c25
Author: Joseph Anthony Pasquale Holsten <joseph@josephholsten.com>
Date:   Fri Feb 25 14:34:31 2011 -0600

    update net-ssh

commit b6eea45
Author: Joseph Anthony Pasquale Holsten <joseph@josephholsten.com>
Date:   Fri Feb 25 13:48:18 2011 -0600

    lossen net-ssh dependency

commit 2ced90c
Author: Joseph Anthony Pasquale Holsten <joseph@josephholsten.com>
Date:   Fri Feb 25 02:42:49 2011 -0600

    loosen up the bundler dependency to 1.0.x

Signed-off-by: Hedgehog <hedgehogshiatus@gmail.com>

Closes GH #45

Signed-off-by: Hedgehog <hedgehogshiatus@gmail.com>

Closes GH #48

Signed-off-by: Hedgehog <hedgehogshiatus@gmail.com>

Closes GH #41

Signed-off-by: Hedgehog <hedgehogshiatus@gmail.com>

Painless password-less SSH.

In order to make password-less SSH the CN default it needs to be recognized
that it is painless to setup.  Maybe make this setup a CN step?

Conflicts:
	Gemfile.lock
	HACKING
	Rakefile
	bin/cucumber-nagios-gen
	cucumber-nagios.gemspec
	features/steps/using_steps.rb
Squashed commit of the following:

commit 8caee91
Merge: bc8fb97 a283e92
Author: Lindsay Holmwood <lindsay@holmwood.id.au>
Date:   Sun Mar 6 23:10:08 2011 +1100

    Merge branch 'master' of github.com:auxesis/cucumber-nagios into auxesis

    Conflicts:
    	cucumber-nagios.gemspec
    	lib/cucumber/nagios/version.rb

commit bc8fb97
Author: Lindsay Holmwood <lindsay@holmwood.id.au>
Date:   Sun Mar 6 23:06:11 2011 +1100

    Bumped minor version

commit 7e90d6c
Author: Lindsay Holmwood <lindsay@holmwood.id.au>
Date:   Sun Mar 6 23:05:51 2011 +1100

    Implement manual Cucumber features task, to work around bundler bugs.

commit daf5349
Author: Lindsay Holmwood <lindsay@holmwood.id.au>
Date:   Sun Mar 6 22:12:27 2011 +1100

    Made alignment consistent. Automatically generate list of extra_rdoc_files.

commit 0c80b39
Author: Lindsay Holmwood <lindsay@holmwood.id.au>
Date:   Sun Mar 6 22:07:07 2011 +1100

    Updated list of contributors

commit 6121e57
Author: Lindsay Holmwood <lindsay@holmwood.id.au>
Date:   Sun Mar 6 22:04:06 2011 +1100

    Removed MANIFEST in favour of calling out to git-ls-files

commit b5d5aa0
Author: Lindsay Holmwood <lindsay@holmwood.id.au>
Date:   Sun Mar 6 22:03:48 2011 +1100

    Use git ls-files to build up list of files.

commit fe9de14
Author: Lindsay Holmwood <lindsay@holmwood.id.au>
Date:   Sun Mar 6 21:50:34 2011 +1100

    Give HACKING the right extension (.md) so it renders nicely on GitHub

commit cc4e425
Author: Lindsay Holmwood <lindsay@holmwood.id.au>
Date:   Sun Mar 6 21:49:48 2011 +1100

    Cleaned up whitespace. Minor syntax and grammar fixes.

commit e72151e
Author: Lindsay Holmwood <lindsay@holmwood.id.au>
Date:   Sun Mar 6 21:33:58 2011 +1100

    Made dependencies a bit more flexible.

commit 933c533
Author: Hedgehog <hedgehogshiatus@gmail.com>
Date:   Tue Mar 1 23:07:56 2011 +1100

    Closes GH #45

    Signed-off-by: Hedgehog <hedgehogshiatus@gmail.com>
    Signed-off-by: Lindsay Holmwood <lindsay@holmwood.id.au>

commit 0af1260
Merge: 1b4f95c 5984e85
Author: Lindsay Holmwood <lindsay@holmwood.id.au>
Date:   Sun Mar 6 21:18:01 2011 +1100

    Merge branch 'bundler-clean' of https://github.com/josephholsten/cucumber-nagios into josephholsten-bundler-clean

    Conflicts:
    	Rakefile
    	cucumber-nagios.gemspec

commit 1b4f95c
Author: Hedgehog <hedgehogshiatus@gmail.com>
Date:   Tue Mar 1 21:31:56 2011 +1100

    Closes GH #41

    Signed-off-by: Hedgehog <hedgehogshiatus@gmail.com>
    Signed-off-by: Lindsay Holmwood <lindsay@holmwood.id.au>

commit a283e92
Author: Lindsay Holmwood <lindsay@holmwood.id.au>
Date:   Sun Mar 6 20:54:24 2011 +1100

    Bumped gem version

commit a98b6f3
Author: Lindsay Holmwood <lindsay@holmwood.id.au>
Date:   Sun Mar 6 20:12:53 2011 +1100

    Use Dir.chdir instead of dodgy cd's

commit 4852dbe
Author: Lindsay Holmwood <lindsay@holmwood.id.au>
Date:   Sun Mar 6 19:41:30 2011 +1100

    Backport tests to work with Ruby 1.8.x

commit 209f818
Author: Hedgehog <hedgehogshiatus@gmail.com>
Date:   Tue Mar 1 23:09:47 2011 +1100

    Closes GH #48

    Signed-off-by: Hedgehog <hedgehogshiatus@gmail.com>
    Signed-off-by: Lindsay Holmwood <lindsay@holmwood.id.au>

commit c646ff8
Author: Lindsay Holmwood <lindsay@holmwood.id.au>
Date:   Sun Mar 6 18:48:48 2011 +1100

    Bumped gem version

commit 8b73ec1
Author: Joseph Anthony Pasquale Holsten <joseph@josephholsten.com>
Date:   Fri Feb 25 02:42:49 2011 -0600

    move cucumber-nagios from generated script onto gem path

    	* Rakefile: add cucumber-nagios to executables
    	* lib/generators/project/bin/cucumber-nagios -> bin/cucumber-nagios: use cwd, not install path
    	* features/installing.feature: use cucumber-nagios from path
    	* features/steps/creating_steps.rb: use cucumber-nagios from path
    	* features/steps/installing_steps.rb: use cucumber-nagios from path
    	* features/steps/using_steps.rb: use cucumber-nagios from path
    	* lib/generators/project/README: use cucumber-nagios from path

commit 5984e85
Author: Joseph Anthony Pasquale Holsten <joseph@josephholsten.com>
Date:   Sun Feb 27 10:29:48 2011 -0600

    convert to bundler for gem creation

        * .gitignore (.bundle): add
        * Gemfile, Gemfile.lock, MANIFEST: add
        * Rakefile: remove jeweler, test tasks. add bundler
        * cucumber-nagios.gemspec: simplify. use MANIFEST
        * lib/generators/project/Gemfile: only use cucumber-nagios deps
        * README.md: point contributors to HACKING
        * HACKING: rewrite

Merged aruba_ssh branch

Squashed commit of the following:

commit 3ad6dd3
Author: Hedgehog <hedgehogshiatus@gmail.com>
Date:   Tue Mar 15 17:09:37 2011 +1100

    doc typo

    Signed-off-by: Hedgehog <hedgehogshiatus@gmail.com>

commit 6786f79
Author: Hedgehog <hedgehogshiatus@gmail.com>
Date:   Tue Mar 15 17:08:48 2011 +1100

    Introducing: SSH sessions descriptions via Aruba steps

    Signed-off-by: Hedgehog <hedgehogshiatus@gmail.com>

Signed-off-by: Hedgehog <hedgehogshiatus@gmail.com>

Convert commands.feature to use Aruba steps

    # For complete Aruba step listing see:
    # lib/aruba/cucumber.rb
    # or https://github.com/aslakhellesoy/aruba/blob/master/lib/aruba/cucumber.rb
    Feature: Executing commands
      In order to test a running local system
      As an administrator
      I want to use Aruba steps to run commands and test output

      Background:                          # /usr/src/cucumber-nagios/features/commands.feature:9
        Given that "cuken/cmd" is required # features/step_definitions/cuken_dev_steps.rb:9

      Scenario: Check Stdout                                                                   # /usr/src/cucumber-nagios/features/commands.feature:12
        When I do aruba I run "echo 'i like cheese'"                                           # features/step_definitions/cuken_dev_steps.rb:13
        Then I see aruba the stdout from "echo 'i like cheese'" should contain "i like cheese" # features/step_definitions/cuken_dev_steps.rb:21

      Scenario: Check Stderr                                                                        # /usr/src/cucumber-nagios/features/commands.feature:16
        When I do aruba I run "echo 'i like cheese' 1>&2"                                           # features/step_definitions/cuken_dev_steps.rb:13
        Then I see aruba the stderr from "echo 'i like cheese' 1>&2" should contain "i like cheese" # features/step_definitions/cuken_dev_steps.rb:21

      Scenario: Check Stdout for multiple lines # /usr/src/cucumber-nagios/features/commands.feature:20
        When I run "echo 'one\none\none\n'"     # aruba-0.3.2/lib/aruba/cucumber.rb:94
        Then the output should contain:         # aruba-0.3.2/lib/aruba/cucumber.rb:126
          """
          one
          one
          one
          """

      Scenario: Check exit code            # /usr/src/cucumber-nagios/features/commands.feature:29
        When I run "true"                  # aruba-0.3.2/lib/aruba/cucumber.rb:94
        Then the exit status should be 0   # aruba-0.3.2/lib/aruba/cucumber.rb:154

      Scenario: Check exit code            # /usr/src/cucumber-nagios/features/commands.feature:33
        When I run "false"                 # aruba-0.3.2/lib/aruba/cucumber.rb:94
        Then the exit status should be 1   # aruba-0.3.2/lib/aruba/cucumber.rb:154

Signed-off-by: Hedgehog <hedgehogshiatus@gmail.com>

Drecate command steps.

Signed-off-by: Hedgehog <hedgehogshiatus@gmail.com>

All file, command and ssh features pass using Aruba steps and some custom ones.

Added files for: All file, command and ssh features pass using Aruba steps and some custom ones.

Closes GH #62 and refactor creating.feature

Signed-off-by: Hedgehog <hedgehogshiatus@gmail.com>

Closes GH #62, using Aruba API and steps where possible.

Signed-off-by: Hedgehog <hedgehogshiatus@gmail.com>

Less verbose create project step expression

Signed-off-by: Hedgehog <hedgehogshiatus@gmail.com>

Using feature now uses Aruba steps and cuken library

Signed-off-by: Hedgehog <hedgehogshiatus@gmail.com>

gitignore Aruba's working area

Signed-off-by: Hedgehog <hedgehogshiatus@gmail.com>

fixing file and step step definitions

Signed-off-by: Hedgehog <hedgehogshiatus@gmail.com>

Document and tidy up using_steps.rb

Signed-off-by: Hedgehog <hedgehogshiatus@gmail.com>

Use Aruba steps not just the API.

Signed-off-by: Hedgehog <hedgehogshiatus@gmail.com>

Doc use of Aruba steps in step files generated.

Signed-off-by: Hedgehog <hedgehogshiatus@gmail.com>

Installing feature uses Aruba. Remove redundant steps.

Signed-off-by: Hedgehog <hedgehogshiatus@gmail.com>

Use Aruba steps

Signed-off-by: Hedgehog <hedgehogshiatus@gmail.com>

Doc the generated step files.

Signed-off-by: Hedgehog <hedgehogshiatus@gmail.com>

One more env var to look for a hostname.

Signed-off-by: Hedgehog <hedgehogshiatus@gmail.com>

Bring Aruba along if including cucumber steps directly.

Signed-off-by: Hedgehog <hedgehogshiatus@gmail.com>

API's may be included directly - bring Aruba API along too.

Signed-off-by: Hedgehog <hedgehogshiatus@gmail.com>

Files.feature uses Aruba/Cucken steps

Signed-off-by: Hedgehog <hedgehogshiatus@gmail.com>

fixups post rebase+merge

Signed-off-by: Hedgehog <hedgehogshiatus@gmail.com>

The 'Less-is-More' commit

By removing step definitions we get to use Aruba and Cuken
step definitions.

Signed-off-by: Hedgehog <hedgehogshiatus@gmail.com>

doc fixes

Signed-off-by: Hedgehog <hedgehogshiatus@gmail.com>

Fixes related to passing under Ruby 1.8.7-p334

Signed-off-by: Hedgehog <hedgehogshiatus@gmail.com>

doc fixes

Signed-off-by: Hedgehog <hedgehogshiatus@gmail.com>
  • Loading branch information...
1 parent 8caee91 commit 226324a4f956c1af5f3d3baf68d38aa786e0615e @hedgehog hedgehog committed Mar 1, 2011
View
@@ -24,3 +24,9 @@ man/*
## BUNDLER
.bundle
+
+## RVM
+.rvmrc
+
+## Aruba
+tmp/*
View
2 .rvmrc
@@ -0,0 +1,2 @@
+rvm use ruby-1.8.7
+rvm gemset use cucumber-nagios
View
@@ -1,3 +1,7 @@
source "http://rubygems.org"
+git "git://github.com/hedgehog/ssh-forever.git", :branch => 'master' do
+ gem 'ssh-forever', ">= 0.4.0"
+end
+
gemspec
View
@@ -1,13 +1,24 @@
+GIT
+ remote: git://github.com/hedgehog/ssh-forever.git
+ revision: 6ea5a2c5fea4829a1952eab3eb1d58cf16269f2b
+ branch: master
+ specs:
+ ssh-forever (0.4.0)
+ open4 (>= 1.0.1)
+
PATH
remote: .
specs:
cucumber-nagios (0.9.0)
amqp (= 0.6.7)
- bundler (~> 1.0.7)
+ aruba (>= 0.3.3)
+ bundler (~> 1.0.10)
cucumber (>= 0.10.0)
+ cuken (>= 0.1.0)
mechanize (= 1.0.0)
net-ssh (~> 2.1.0)
- rspec (>= 2.3.0)
+ rspec (>= 2.5.0)
+ ssh-forever (>= 0.4.0)
templater (>= 1.0.0)
webrat (= 0.7.2)
@@ -16,25 +27,37 @@ GEM
specs:
amqp (0.6.7)
eventmachine (>= 0.12.4)
+ aruba (0.3.3)
+ childprocess (~> 0.1.7)
+ cucumber (~> 0.10)
+ rspec (~> 2.5)
builder (3.0.0)
+ childprocess (0.1.7)
+ ffi (~> 0.6.3)
cucumber (0.10.0)
builder (>= 2.1.2)
diff-lcs (~> 1.1.2)
gherkin (~> 2.3.2)
json (~> 1.4.6)
term-ansicolor (~> 1.0.5)
+ cuken (0.1.1)
+ aruba (~> 0.3.3)
+ ssh-forever
diff-lcs (1.1.2)
eventmachine (0.12.10)
extlib (0.9.15)
- gherkin (2.3.3)
+ ffi (0.6.3)
+ rake (>= 0.8.7)
+ gherkin (2.3.4)
json (~> 1.4.6)
highline (1.6.1)
json (1.4.6)
mechanize (1.0.0)
nokogiri (>= 1.2.1)
net-ssh (2.1.3)
nokogiri (1.4.4)
- rack (1.2.1)
+ open4 (1.0.1)
+ rack (1.2.2)
rack-test (0.5.7)
rack (>= 1.0)
rake (0.8.7)
@@ -60,13 +83,6 @@ PLATFORMS
ruby
DEPENDENCIES
- amqp (= 0.6.7)
- bundler (~> 1.0.7)
- cucumber (>= 0.10.0)
cucumber-nagios!
- mechanize (= 1.0.0)
- net-ssh (~> 2.1.0)
rake (>= 0.8.3)
- rspec (>= 2.3.0)
- templater (>= 1.0.0)
- webrat (= 0.7.2)
+ ssh-forever (>= 0.4.0)!
View
@@ -0,0 +1,50 @@
+.gitignore
+.rvmrc
+AUTHORS
+Gemfile
+Gemfile.lock
+HACKING
+LICENSE
+MANIFEST
+README.md
+Rakefile
+TODO
+bin/cucumber-nagios
+bin/cucumber-nagios-gen
+cucumber-nagios.gemspec
+features/commands.feature
+features/creating.feature
+features/files.feature
+features/http_steps.feature
+features/installing.feature
+features/steps/creating_steps.rb
+features/steps/installing_steps.rb
+features/steps/using_steps.rb
+features/support/env.rb
+features/support/silent_system.rb
+features/support/webrat_logging_patches.rb
+features/using.feature
+lib/cucumber-nagios.rb
+lib/cucumber/formatter/nagios.rb
+lib/cucumber/nagios.rb
+lib/cucumber/nagios/command.rb
+lib/cucumber/nagios/steps.rb
+lib/cucumber/nagios/steps/amqp_steps.rb
+lib/cucumber/nagios/steps/benchmark_steps.rb
+lib/cucumber/nagios/steps/command_steps.rb
+lib/cucumber/nagios/steps/dns_steps.rb
+lib/cucumber/nagios/steps/file_steps.rb
+lib/cucumber/nagios/steps/http_header_steps.rb
+lib/cucumber/nagios/steps/http_steps.rb
+lib/cucumber/nagios/steps/ping_steps.rb
+lib/cucumber/nagios/steps/ssh_steps.rb
+lib/cucumber/nagios/support/env.rb
+lib/cucumber/nagios/support/webrat_logging_patches.rb
+lib/cucumber/nagios/version.rb
+lib/generators/feature/%feature_name%.feature
+lib/generators/feature/%feature_name%_steps.rb
+lib/generators/project/.bzrignore
+lib/generators/project/.gitignore
+lib/generators/project/Gemfile
+lib/generators/project/README
+man/cucumber-nagios.1.ronn
View
@@ -51,6 +51,34 @@ This will spit out a bunch of files in the directory specified as `<project-name
Check the `README` within this directory for specific instructions for managing
the project.
+Setting up Password-less SSH
+============================
+To use Aruba's step definitions with SSH sessions we use passwordl-less
+authetication.
+
+Once you have installed the Cucumber-Nagios gem it should 'just-work'.
+Of course you server needs to accept these connections.
+To test your localhost password-less access (bash):
+
+ ssh-forever `whoami`@`hostname` -p 22 -i ~/.ssh/test_id_rsa.pub -n testing -b
+ ssh cuken "echo 'Hello there from here: `hostname`'"
+
+If you want an interactive login after you set up a new SSH user/key/host:
+
+ ssh-forever `whoami`@`hostname` -p 22 -i ~/.ssh/test_id_rsa.pub -n testing2 -a -q
+
+Finally if you need to enter you password to create a key, try this:
+
+ ssh-forever `whoami`@`hostname` -p 22 -i ~/.ssh/test_id_rsa.pub -n testing3
+
+
+Once you have your SSH server accepting secure, but password-less,
+connections you can remove the test keys from `~/.ssh/`, and you can
+remove the Host entry in `~/.ssh/config`.
+
+You are now good to use SSH-forever - which of course is the gem we use :)
+
+For a full example see [ssh-forever](https://github.com/mattwynne/ssh-forever).
Bundling dependencies
=====================
View
@@ -20,12 +20,15 @@ Gem::Specification.new do |s|
s.extra_rdoc_files = s.files.grep(/^[A-Z]+(\.md)*$/)
s.add_runtime_dependency "cucumber", ">= 0.10.0"
- s.add_runtime_dependency "rspec", ">= 2.3.0"
+ s.add_runtime_dependency "rspec", ">= 2.5.0"
+ s.add_runtime_dependency "aruba", ">= 0.3.3"
+ s.add_runtime_dependency "cuken", ">= 0.1.0"
+ s.add_runtime_dependency "ssh-forever", ">= 0.4.0"
s.add_runtime_dependency "webrat", "= 0.7.2"
s.add_runtime_dependency "mechanize", "= 1.0.0"
s.add_runtime_dependency "templater", ">= 1.0.0"
s.add_runtime_dependency "net-ssh", "~> 2.1.0"
s.add_runtime_dependency "amqp", "= 0.6.7"
- s.add_runtime_dependency "bundler", "~> 1.0.7"
+ s.add_runtime_dependency "bundler", "~> 1.0.10"
s.add_development_dependency "rake", ">= 0.8.3"
end
View
@@ -1,30 +1,37 @@
+# For complete reusable step listings see:
+# lib/aruba/cucumber.rb
+# https://github.com/aslakhellesoy/aruba/blob/master/lib/aruba/cucumber.rb
+# AND
+# lib/cuken/*.rb
+# https://github.com/hedgehog/cuken
+
Feature: Executing commands
- In order to test a running system
+ In order to test a running local system
As an administrator
- I want to run arbitrary commands and test the output
+ I want to use Aruba steps to run commands and test output
- @steps
Scenario: Check Stdout
- When I run 'echo "i like cheese"'
- Then 'stdout' should have 'i like cheese'
+ When I run "echo 'i like cheese'"
+ Then the stdout from "echo 'i like cheese'" should contain "i like cheese"
- @steps
Scenario: Check Stderr
- When I run 'echo "i like cheese" 1>&2'
- Then 'stderr' should have 'i like cheese'
+ When I run "some_error"
+ Then the stderr from "some_error" should contain "No such file or directory - some_error"
- @steps
Scenario: Check Stdout for multiple lines
- When I run 'shopt -s xpg_echo ; echo "one\n\one\none\n"'
- Then 'one' should appear on 'stdout' '3' times
+ When I run "echo 'one\none\none\n'"
+ Then the output should contain:
+ """
+ one
+ one
+ one
+ """
- @steps
Scenario: Check exit code
- When I run 'true'
- Then it should exit '0'
+ When I run "true"
+ Then the exit status should be 0
- @steps
Scenario: Check exit code
- When I run 'false'
- Then it should exit '1'
+ When I run "false"
+ Then the exit status should be 1
View
@@ -1,18 +1,40 @@
+# For complete reusable step listings see:
+# lib/aruba/cucumber.rb
+# https://github.com/aslakhellesoy/aruba/blob/master/lib/aruba/cucumber.rb
+# AND
+# lib/cuken/*.rb
+# https://github.com/hedgehog/cuken
+
Feature: Creating new project
To test websites
A cucumber-nagios project
Must be created
+ Background:
+ Given cucumber-nagios is installed
+
@create
Scenario: Create a project
- Given cucumber-nagios is installed
- When I create a new project called "great-website-tests"
- And I freeze in dependencies
- Then a Gemfile lock should be created
+ Given I successfully run "cucumber-nagios-gen project great-website-tests"
+ When I cd to "great-website-tests"
+ Then these directories exist:
+ | features/steps |
+ | features/support |
+ And these files exist:
+ | features/support/env.rb |
+ | features/steps/amqp_steps.rb |
+ | features/steps/benchmark_steps.rb |
+ | features/steps/command_steps.rb |
+ | features/steps/dns_steps.rb |
+ | features/steps/file_steps.rb |
+ | features/steps/http_header_steps.rb |
+ | features/steps/http_steps.rb |
+ | features/steps/ping_steps.rb |
+ | features/steps/ssh_steps.rb |
@create
Scenario: Pretend to create a project
- Given cucumber-nagios is installed
- When I pretend to create a new project called "greatest-website-tests"
- Then I do not freeze in dependencies
- And a Gemfile lock should not be created
+ Given I successfully run "cucumber-nagios-gen project --pretend greatest-website-tests"
+ Then these directories do not exist:
+ | greatest-website-tests/features/steps |
+ | greatest-website-tests/features/support |
Oops, something went wrong.

0 comments on commit 226324a

Please sign in to comment.