Skip to content

Commit

Permalink
Merge pull request #594 from sul-dlss/update-testing-instructions
Browse files Browse the repository at this point in the history
Additional development / testing README updates
  • Loading branch information
mejackreed authored Sep 26, 2017
2 parents b6d1ec1 + 42b2d3d commit eac7bab
Showing 1 changed file with 9 additions and 16 deletions.
25 changes: 9 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Exhibits need to provide the following configuration files:
## Reindexing content
A rake task is provided to (re)index content into the Solr index. It uses the configured sets in `config/exhibit.yml`.
A Rake task is provided to (re)index content into the Solr index. It uses the configured sets in `config/exhibit.yml`.
```console
$ rake spotlight:index
Expand All @@ -40,32 +40,25 @@ A whenever-based cron task is configured to run nightly to keep the exhibit sync

## Development

Install dependencies and set up the databases and migrations:
Install dependencies, set up the databases and run migrations:
```console
$ bundle install
$ bundle exec rake db:setup
```

Spin up solr in a separate terminal window:
You can spin up the Rails server, solr_wrapper, and populate the Solr index using this command:
```console
$ solr_wrapper
$ REMOTE_USER="archivist1@example.com" bundle exec rake server
```
When prompted to create an admin user, the email should match the email provided in `REMOTE_USER`. This will allow you to bypass the webauth authentication.

Seed test fixtures and create an admin user (e.g. archivist1@eample.com):
```console
$ bundle exec rake spotlight:seed
$ bundle exec rake spotlight:initialize
```

Spin up the rails server. (`REMOTE_USER` should match the name of the user you create when prompted. This will allow you to bypass the webauth authentication.)
## Testing
Run RuboCop and tests:
```console
$ REMOTE_USER="archivist1@example.com" bundle exec rails server
$ bundle exec rake
```


## Testing

With Solr running in another widnow, run tests with `bundle exec rspec`.
**Tip:** if you receive the error message `ERROR: Core 'blacklight-core' already exists!` you have an instance of Solr running elsewhere. Clean out your data with `solr_wrapper clean` or search for rogue instances with `ps aux | grep solr`.

## Deploying

Expand Down

0 comments on commit eac7bab

Please sign in to comment.