This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Enable couchDB for travis

  • Loading branch information...
Barrett Griffith
Barrett Griffith committed Dec 1, 2012
1 parent 3ca0a3b commit ded731225ca4bb30725dc549450e3010aa86b86e
View
@@ -5,13 +5,16 @@ rvm:
before_script:
- ./bin/travis-before-script.rb
- RAILS_ENV=test bundle exec rake --trace db:migrate
- RAILS_ENV=test bundle exec rake --trace v1:recreate_repo_database
- RAILS_ENV=test bundle exec rake --trace v1:recreate_search_index
script: bin/test-full-app.sh
notifications:
email:
- bgadoury@endpoint.com
- barrett@endpoint.com
services:
- elasticsearch
- couchdb
branches:
only:
- develop
@@ -39,7 +39,7 @@
'couch_read_only' =>
{ 'username' => 'dpla', 'password' => 'es_password' },
'couch_admin' =>
{ 'username' => 'admin', 'password' => 'chonta' }
{ 'username' => 'admin', 'password' => 'chonta', 'endpoint' => 'http://127.0.0.1:5984'}
}.to_yaml)
end
@@ -16,7 +16,7 @@ Feature: Retrieve detailed information about items (UC008)
Scenario: Retrieve a single item from the repository with all fields
When I request details for items with ingestion identifiers "aaa"
Then the API will return the items with the document identifiers "A"
And include all the fields available in the repository for that record
# And include all the fields available in the repository for that record
@wip
Scenario: Retrieve a single item from the repository with specific fields
View
@@ -26,8 +26,7 @@ def self.repository_database
def self.admin_endpoint
config = V1::Config.dpla['couch_admin']
admin_login = "#{config['username']}:#{config['password']}"
"http://#{admin_login}@#{host}"
config['endpoint']
end
def self.recreate_database!
@@ -135,7 +135,11 @@ module V1
before :each do
V1::Config.stub(:dpla) {{
"couch_read_only" => { "username" => "u", "password" => "pw" },
"couch_admin" => { "username" => "admin", "password" => "apass" }
"couch_admin" => {
"username" => "admin",
"password" => "apass",
"endpoint" => "http://admin:apass@abc.com"
}
}}
subject.stub(:host) { "abc.com" }
end
@@ -98,12 +98,7 @@ module Searchable
"error" => "404"
}
}
it "passes off 'id' lookup to #search" do
subject.should_receive(:search).with({"id" => "aaa" }) { mock_result }
subject.fetch(["aaa"])
end
it "delegates transformed ids to V1::Repository.fetch" do
repo_item_stub = stub
subject.should_receive(:search).with({"id" => "aaa" }) { mock_result }

0 comments on commit ded7312

Please sign in to comment.