Commit Graph

63 Commits

Author SHA1 Message Date
Thibault Jouan 6f563803df Alias sh' as ` condition keyword 2014-03-08 21:10:21 +00:00
Thibault Jouan 7c6ac4c9d8 Implement `` condition keyword (shell cmd status) 2014-03-08 19:43:41 +00:00
Thibault Jouan eeab386216 Implement `has_executable' condition keyword 2014-03-05 07:19:15 +00:00
Thibault Jouan bf25b05adb Remote extra record separator from `sh' task action 2014-03-05 06:45:56 +00:00
Thibault Jouan b92dfcc9b7 Refactor some cucumber scenarios 2014-03-05 03:04:57 +00:00
Thibault Jouan 387f37f3f5 Implement `file_append' task action 2014-03-05 02:41:28 +00:00
Thibault Jouan b1c7ff27b4 Fix wording in `file_replace_content' scenarios 2014-03-05 02:21:09 +00:00
Thibault Jouan d22b023ff4 Implement `file_replace_content' task action 2014-03-05 02:02:52 +00:00
Thibault Jouan a0482d175c Implement `file_contains' condition keyword 2014-01-23 16:37:19 +00:00
Thibault Jouan 456ed17724 Implement `get' task keyword, fetch from registry 2014-01-21 17:31:32 +00:00
Thibault Jouan f92ad8128d Implement set' and get' recipe keywords:
`set' registers a value at given index in env registry, `get'
retrieves a value at given index.
2014-01-21 17:11:17 +00:00
Thibault Jouan 7f5d1a4085 Implement `mkdir' task action 2014-01-21 15:50:07 +00:00
Thibault Jouan 0b4df20f55 Implement `has_dir' condition keyword 2014-01-21 15:02:07 +00:00
Thibault Jouan dba8a7aeee Remove feature exposing env object in recipe DSL 2014-01-21 01:22:00 +00:00
Thibault Jouan 0d0ed541c8 Allow `ask' action to customize choices prompt 2014-01-21 01:19:17 +00:00
Thibault Jouan 7e062e06a1 Implement `ask' recipe keyword 2014-01-21 00:52:44 +00:00
Thibault Jouan e8b0900721 Improve `echo' action cucumber feature wording 2013-12-23 23:31:15 +00:00
Thibault Jouan e8be44d1f0 Implement `macro' recipe keyword 2013-12-20 23:19:16 +00:00
Thibault Jouan 892a9862fc Implement `file_write' action 2013-12-20 06:26:21 +00:00
Thibault Jouan 35621e1f5f Implement condition DSL negated test prefix (no_*)
* Allow no_* to be used for every tests in condition DSL:
  condition { no_has_env :shell, '/bin/sh' };
* Modify Test constructor to accept negated: named argument, implement
  #negated? and #pass?;
* Rename #success? to #verify in all test classes.
2013-12-19 20:22:44 +00:00
Thibault Jouan 85a47df547 Use SSH user name configured for a given target:
When a user is configured for the targeted host name, use it for SSH
authentification instead of the name of current user logged in.

* Modify Remote#user_name to use configured user name.
2013-09-28 20:07:36 +00:00
Thibault Jouan 2cbe1726f7 Implement `has_file' condition keyword 2013-09-26 00:28:40 +00:00
Thibault Jouan c01e143c86 Enable sftp subsystem in cucumber sshd config 2013-09-26 00:28:39 +00:00
Thibault Jouan 36cf2e041f Improve wording in sh cucumber feature 2013-09-07 21:40:59 +00:00
Thibault Jouan 85109afd46 Fix missing Then keywords in cucumber features 2013-09-07 21:40:25 +00:00
Thibault Jouan 33a2b9de5a Refactor producer invocation in cucumber features:
Use "When I successfully execute" instead of "When I execute", and
assert that exit status code was successful in this new step.
2013-09-06 20:10:28 +00:00
Thibault Jouan 7a1c01a299 Remove empty cucumber support file 2013-08-22 00:11:09 +00:00
Thibault Jouan 04afc82a29 Implement `has_env' condition keyword 2013-08-20 03:03:17 +00:00
Thibault Jouan 639bdc1c73 Implement basic condition DSL framework for tests:
Instead of interrupting task evaluation when condition is not met,
allow the whole task to be evaluated (including condition and
evaluation) so that the interpreter will get all tasks actions (whether
condition is met or not) and be able to query the condition.

* Modify Interpreter#process_task: test if task condition is met before
  applying the actions;
* Implement condition handling in Task and Task::DSL;
* Implement Condition and Condition::DSL (useless as they are, but
  needed to implement later test keywords as part of the condition DSL.
2013-08-18 00:29:14 +00:00
Thibault Jouan a675c9c910 Implement `echo' task action 2013-08-14 23:43:36 +00:00
Thibault Jouan 53db841b2d Remove Env#current_recipe attribute 2013-08-13 01:36:33 +00:00
Thibault Jouan a5d9ca26f4 Remove error handling for evaluation errors 2013-08-13 00:42:14 +00:00
Thibault Jouan 825bdec74d Improve `sh' task action error handling:
Handle exit status code in Remote#execute.
2013-08-07 23:39:49 +00:00
Thibault Jouan f10914c7d7 Implement basic `sh' task action feature:
* Executes a command on the remote host;
* Forwards remote standard output.
2013-08-07 16:16:40 +00:00
Thibault Jouan 3c92b04b90 Rename task evaluation feature file 2013-08-06 19:05:43 +00:00
Thibault Jouan 6f563d75d7 Improve a test in task evaluation feature 2013-08-06 19:05:01 +00:00
Thibault Jouan 72d6a853ae Improve wording in task evaluation feature 2013-08-06 19:04:49 +00:00
Thibault Jouan d5cbff9c4d Improve wording in `condition' task keyword feature 2013-08-06 19:02:35 +00:00
Thibault Jouan 786c2f56d6 Improve wording in `target' recipe keyword 2013-08-06 19:00:57 +00:00
Thibault Jouan cd13cebfd8 Refactor `source' recipe keyword feature 2013-08-06 19:00:14 +00:00
Thibault Jouan bc0ea65316 Improve wording in `source' recipe keyword feature 2013-08-06 18:55:24 +00:00
Thibault Jouan 64a57c7cfd Improve test in recipe evaluation output feature 2013-08-06 18:55:00 +00:00
Thibault Jouan 98b141136b Improve wording in `env' recipe keyword feature 2013-08-06 18:49:57 +00:00
Thibault Jouan 5c11487601 Fix indentation in CLI usage feature 2013-08-06 18:49:35 +00:00
Thibault Jouan 8069e1ceaf Improve features directory tree 2013-08-06 18:48:52 +00:00
Thibault Jouan d7d7d42223 Implement @sshd cucumber tag hooks:
Fork an sshd server available for the duration of the scenario.

  $HOME will be set to aruba temporary directory, and a custom ssh
config will be written so that the test server is accessible with the
alias `some_host.test'. sshd will listen on port 2222 by default, this
can be overridden by setting DEFAULT_LISTEN_PORT environment variable to
the desired port.
2013-08-05 20:08:11 +00:00
Thibault Jouan 3e3547d3be Fix incorrect paths for env and target features 2013-08-05 19:54:32 +00:00
Thibault Jouan 47560e55c5 Extract cucumber and aruba monkey patches 2013-08-05 14:15:23 +00:00
Thibault Jouan a3bba6d4da Implement target recipe keyword feature 2013-08-03 23:42:47 +00:00
Thibault Jouan a6e27edfd2 Add env recipe keyword feature 2013-08-03 23:42:41 +00:00