1
0
Fork 0
mirror of https://github.com/capistrano/capistrano synced 2023-03-27 23:21:18 -04:00
Commit graph

12 commits

Author SHA1 Message Date
Sergey Ponomarev
859eec68c6 Fix cucumber spec for loading tasks from stage configs 2014-12-10 01:13:19 +03:00
Lee Hambley
f6af81c405 Fix rspec assertion be_false != be_falsey 2014-11-24 23:00:58 +01:00
Bruno Sutic
f26ee568e2 Update 'symlink linked files' cucumber scenario
When `deploy:symlink:linked_files` task is executed, only the
release path (containing the timestamp) is created.
After the task is done, it is hard to navigate over that release path
(again, because it's a timestamp) to perform the assertions.

To solve the issue, we're additionally creating a current path because
the assertion is much more easily done via `current_path`.
2014-11-17 13:47:24 +01:00
Bruno Sutic
c123fc1def Update 'checking linked files' cucumber scenarios
'Checking linked files' scenarios were passing, but the steps were not
defined at all.
This commit defines the required steps.
2014-11-17 13:47:24 +01:00
Bruno Sutic
a4e11a1435 Delete duplicate cucumber assertion that is unused 2014-11-17 13:47:24 +01:00
Bruno Sutic
a91d4eef0c Update assertions for 'git:check' test scenario
Capistrano 'git:check' task executes a `git ls-remote -h #{repo_url}`
command to check if remote repo is accessible. If successful, command
output is a list of references and their SHAs.

Task should be successful and we're pretty sure remote repo will have a
`master` reference, so that's what we're asserting.

We're NOT asserting:
 * repo references other than master - likely to change
 * reference SHAs - will definitely change
2014-11-17 13:47:24 +01:00
Rustam Zagirov
2c14957bf4 move to rspec 3 2014-08-12 22:52:37 +04:00
Travis Petticrew
2e13a1319c Cucumber tests will now run on the latest Vagrant
This removes the dependency on the `kuroko` gem and uses the Vagrant
command line application to control the virtual environment. The
`vagrant` command should be in your path, but if it isn't the path can
be set with the `VAGRANT_BIN` environment variable. This may even work
on older versions of Vagrant, but they are untested.

The `VagrantHelpers` module was added to mimic some of the API that was
provided by `kuroko`. The `RemoteCommandHelpers` module was modified to
accommodate those changes. Any non-zero exit status on a remote command
will raise a `VagrantHelpers::VagrantSSHCommandError` and should be
expected by any tests using the command helpers. All existing tests
work as expected.

In addition, a couple of minor changes were made. The TestApp utilizes
the Pathname library but does not require it. This was causing the suite
to fail for me so I added an explicit require. Also, the test for the
existence of a release directory would give a false positive on
subsequent runs if the `KEEP_RUNNING` option was used. I added an
`at_exit` that removes the test deployment directory to clean up the
box for the next run.

Documentation was also added to the README for how to run the test
suites.
2014-04-23 10:19:20 -05:00
Michael Nikitochkin
816b137930 🐼 Updated the loading default config tasks and stages config tasks.
To show all tasks decalred in default config and stages files was missed from the tasks list.
Added default value for :stage and load all default configs. Also added cucumber tests.
2014-01-18 23:18:55 +02:00
seenmyfate
7432c710b0 Add hook for deploy failure
If an error is raised during a deploy, the task `deploy:failed` will be
triggered.  Custom tasks can hook into this using `after`:

    after 'deploy:failed', :send_for_help do
      #
    end

I've also taken the opportunity to provide a marginally more useful
error message before triggering the task.

By default, this 'deploy:failed' will only be triggered when running
`cap <stage> deploy` - to trigger after individual tasks use `set
:deploying, true`

This closes #708 and replaces
https://github.com/capistrano/capistrano/pull/720
2013-11-01 12:24:36 +00:00
seenmyfate
d8b9b695bb Allow configuration location to be configurable
This change allows both the `deploy_config_path` and `stage_config_path`
to be moved from the default locations of `config/deploy.rb` and
`config/deploy` respectively.  These values __must__ be set in the
`Capfile` prior to `capistrano/setup` being called, for example:

    set :deploy_config_path, 'app/config/deploy.rb'
    set :stage_config_path, 'app/config/deploy'

    # Load DSL and Setup Up Stages
    require 'capistrano/setup'

Fixes #610
2013-10-14 12:44:38 +01:00
seenmyfate
e7399f4692 Integration tests with Vagrant and Cucumber
This commit removes the existing 'local' integration tests and replaces
them with Cucumber features running against VMs.  At this stage,
some of the assertions are pending due to the limited nature of the
response returned when executing commands through Vagrant, but the
framework is there as a starting point to build upon.

To run the suite:

    bundle exec cucumber

During development, avoid scraping the VM between runs:

    bundle exec cucumber KEEPING_RUNNING=1

Ultimately I would like to see the `TestApp` helpers along with the Vagrant
integration packaged and available for use when developing gems that work with
Cap. For now though, this closes #641
2013-09-27 11:45:55 +01:00