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

18 commits

Author SHA1 Message Date
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
seenmyfate
ba0d313440 Remote file task
The commit introduces a `remote_file` task, allowing the existence of a remote
file to be set as a prerequisite.  These tasks can in turn depend on local
files if required. In this implementation, the fact that we're dealing with a
file in the shared path is assumed.

As as example, this task can be used to ensure that files to be linked exist
before running the `check:linked_files` task:

      namespace :deploy do
        namespace :check do
          task :linked_files => 'config/newrelic.yml'
        end
      end

      remote_file 'config/newrelic.yml' => '/tmp/newrelic.yml', roles: :app

      file '/tmp/newrelic.yml' do |t|
        sh "curl -o #{t.name} https://rpm.newrelic.com/accounts/xx/newrelic.yml"
      end
2013-08-16 17:01:50 +01:00
seenmyfate
7eb7ca0124 Ensure release_path returns the correct value
`release_path` will now return the value of `current_path` by default.

Tasks that create a new release (i.e. `deploy`) now explicitly over-ride this
default with a new release path.  This change allows tasks that run in both
deploy and non-deploy contexts to use `release_path` to target the latest
 release when run in isolation, and the new release (before it is `current`)
when run as part of a deploy.
2013-08-10 19:31:03 +01:00
seenmyfate
ca81639e1d Match Hash implementation of fetch
An optional block can be passed to `fetch` that will be called in the
event that the variable is not set.

    fetch(:var) { fail 'var not found' }
2013-08-09 14:15:50 +01:00
seenmyfate
3aa0ff0e61 include installation integration tests in main suite run 2013-08-02 11:09:07 +01:00
Lee Hambley
c96314d4b4 Merge pull request #557 from korin/ssh-options
Allow SSHKit::Backend.ssh_options to be set.
2013-07-14 11:48:55 -07:00
Huiming Teo
ebd8fee20a Rename and add task hooks with descriptive names. 2013-07-14 22:27:31 +08:00
Rafał Lisowski
e49733f3ef user can provide global ssh settings
for example in deploy.rb:

      {
         keys: %w(/home/user/.ssh/id_rsa),
         forward_agent: false,
         auth_methods: %w(publickey password)
      }
2013-07-11 17:38:55 +02:00
Lee Hambley
682ed3b2d0 Fix #542. Also revert issues introduced in c18029e. 2013-07-05 16:21:53 +02:00
Huiming Teo
a95058dfa9 fix repo_url in deploy.rb template 2013-07-03 22:01:39 +08:00
seenmyfate
f5a585b3a4 Add integration tests for deploy task
This commit adds the outlines of a testing framework for Cap tasks.
Currently just the `cap install` and `cap deploy` tasks are covered. For
now, these tests can only be run if it is `ssh localhost` will work for
you and are currently excluded from the suite. It is my intention to
eventually replace the `sshkit` backend with a test backend, but for now
this is good enough to prevent simple regressions.
2013-06-16 13:08:15 +01:00
seenmyfate
a8e00045df Renamed integration spec 2013-06-15 07:30:16 +01:00
seenmyfate
dd4c99e04b refactor integration test 2013-06-14 17:09:32 +01:00
seenmyfate
f50945673a Integration test cap install
This spec creates new 'app', bundles a local copy of capistrano and
asserts against the results of `cap install`
2013-06-14 16:52:37 +01:00
seenmyfate
50e27d8906 allow setting of Configuration backend 2013-06-14 14:35:26 +01:00
seenmyfate
2d4506a389 test sshkit is correctly configured 2013-06-14 10:02:59 +01:00
seenmyfate
9f3c95cc21 ensure role/server syntax examples are identical 2013-06-14 09:41:40 +01:00
seenmyfate
dbbf6d4b03 Add integration tests for DSL
These tests now document how to use the Capistrano DSL to set and fetch
hosts and variables using both `role` and `server` syntax
2013-06-02 12:30:11 +01:00