Skip to content
This repository has been archived by the owner on Dec 31, 2022. It is now read-only.

Commit

Permalink
fix(configure): Don't create pids symlink if it already exists
Browse files Browse the repository at this point in the history
Resolves #126
  • Loading branch information
ajgon committed Nov 2, 2017
1 parent a43830e commit 4671ac9
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 18 deletions.
17 changes: 0 additions & 17 deletions README.md
Expand Up @@ -19,23 +19,6 @@ guide in [documentation](http://opsworks-ruby.readthedocs.io/en/latest/index.htm
You can either install eveyrthing locally using [rvm](https://rvm.io/) and [pip](https://pypi.python.org/pypi/pip)
or use the Docker container which includes all necessary dependencies inside it.

### Unit Testing and Linting

```
docker-compose run -e SKIP="AuthorName AuthorEmail" cookbook \
bash -c "overcommit --sign && overcommit -r && rspec"
```

### Integration Testing

To run integration tests you need [Chef Development Kit](https://downloads.chef.io/chefdk).
After installing it, invoke:

```
chef exec bundle install -j 4 --path vendor
sudo chef exec bundle exec rake integration:docker
```

### Build documentation

```
Expand Down
18 changes: 18 additions & 0 deletions TESTING.md
@@ -0,0 +1,18 @@
# Testing

## Unit Testing and Linting

```
docker-compose run -e SKIP="AuthorName AuthorEmail" cookbook \
bash -c "overcommit --sign && overcommit -r && rspec"
```

## Integration Testing

To run integration tests you need [Chef Development Kit](https://downloads.chef.io/chefdk).
After installing it, invoke:

```
chef exec bundle install -j 4 --path vendor
sudo chef exec bundle exec rake integration:docker
```
5 changes: 4 additions & 1 deletion recipes/configure.rb
Expand Up @@ -15,8 +15,11 @@
create_deploy_dir(application, File.join('shared', 'sockets'))
create_deploy_dir(application, File.join('shared', 'vendor/bundle'))
create_dir("/run/lock/#{application['shortname']}")
link File.join(deploy_dir(application), 'shared', 'pids') do

pids_link_path = File.join(deploy_dir(application), 'shared', 'pids')
link pids_link_path do
to "/run/lock/#{application['shortname']}"
not_if { ::File.exist?(pids_link_path) }
end

databases = []
Expand Down

0 comments on commit 4671ac9

Please sign in to comment.