mirror of
https://github.com/chenasraf/snpr.git
synced 2026-05-18 01:39:01 +00:00
Merge pull request #69 from djab/travis_and_test_fixes
Travis and test fixes
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
language: ruby # Defaults to ruby, but travis-ci recommends making this explicit.
|
||||
rvm:
|
||||
- 1.9.2
|
||||
- 1.9.3
|
||||
- 2.0.0
|
||||
env: DB=postgres CI=1
|
||||
before_install:
|
||||
- git clone git://github.com/redis/hiredis.git && cd hiredis && make && sudo make install && sudo ldconfig && cd ..
|
||||
@@ -11,6 +13,8 @@ before_script:
|
||||
- echo "bar" > mail_password.txt
|
||||
- echo "anyOleBollocks" > secret_token
|
||||
- psql -c 'create database snpr_test;' -U postgres
|
||||
script: "bundle install"
|
||||
# script: "bundle install" # this is automatically run by travis-ci
|
||||
services:
|
||||
- redis-server
|
||||
script: "bundle exec rake --trace db:migrate test"
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
GIT
|
||||
remote: git://github.com/norman/friendly_id.git
|
||||
revision: cb0c987be9cc36fea581ba56b321f8790f0b1c50
|
||||
remote: git://github.com/FriendlyId/friendly_id.git
|
||||
revision: d59c38a868d32dfc3c08d34f26aaf1b78e73664b
|
||||
specs:
|
||||
friendly_id (4.1.0.beta.2)
|
||||
|
||||
|
||||
4
Procfile
Normal file
4
Procfile
Normal file
@@ -0,0 +1,4 @@
|
||||
Server: bundle exec rails s
|
||||
Solr: bundle exec rake sunspot:solr:run
|
||||
Redis: redis-server /usr/local/etc/redis.conf
|
||||
Sidekiq: bundle exec sidekiq -q preparse,2 -q parse,2 -q deletegenotype -q fitbit -q fixphenotypes -q frequency -q genomegov -q mailnewgenotype -q mendeley_details -q mendeley -q pgp -q plos_details -q plos -q zipfulldata -q snpedia -q zipgenotyping
|
||||
@@ -55,7 +55,7 @@ class GenotypesControllerTest < ActionController::TestCase
|
||||
"#{Rails.root}/test/fixtures")
|
||||
genotype_file = fixture_file_upload('testdatensatz1_23andme.txt')
|
||||
genotype_file.content_type = 'text/plain'
|
||||
Resque.expects(:enqueue).with(Preparsing, is_a(Fixnum))
|
||||
Sidekiq::Client.expects(:enqueue).with(Preparsing, is_a(Fixnum))
|
||||
assert_difference 'UserAchievement.count' do
|
||||
assert_difference 'Genotype.count' do
|
||||
put :create, commit: "Upload", genotype:
|
||||
|
||||
@@ -5,7 +5,7 @@ class SnpsControllerTest < ActionController::TestCase
|
||||
context "Snps" do
|
||||
setup do
|
||||
activate_authlogic
|
||||
Resque.stubs(:enqueue)
|
||||
Sidekiq::Client.stubs(:enqueue)
|
||||
@user = FactoryGirl.create(:user)
|
||||
@snp = FactoryGirl.create(:snp)
|
||||
@snp_comment = FactoryGirl.create(:snp_comment, snp: @snp, user: @user)
|
||||
|
||||
@@ -20,7 +20,7 @@ class ParsingTest < ActiveSupport::TestCase
|
||||
|
||||
should "parse 23andMe data" do
|
||||
FileUtils.cp @file_23andMe, @temp_file
|
||||
Parsing.perform(@genotype_23andme.id, @temp_file)
|
||||
Parsing.new.perform(@genotype_23andme.id, @temp_file)
|
||||
|
||||
# Snp
|
||||
snp_data = Snp.all.map do |s|
|
||||
@@ -51,7 +51,7 @@ class ParsingTest < ActiveSupport::TestCase
|
||||
|
||||
should "parse deCODEme data" do
|
||||
FileUtils.cp @file_deCODEme, @temp_file
|
||||
Parsing.perform(@genotype_decodeme.id, @temp_file)
|
||||
Parsing.new.perform(@genotype_decodeme.id, @temp_file)
|
||||
|
||||
# Snp
|
||||
snp_data = Snp.all.map do |s|
|
||||
|
||||
@@ -11,16 +11,16 @@ class SnpTest < ActiveSupport::TestCase
|
||||
@snp.mendeley_updated = @snp.snpedia_updated = @snp.plos_updated = 32.days.ago
|
||||
@snp.save
|
||||
queue = sequence('queue')
|
||||
Resque.expects(:enqueue).with(Mendeley, @snp.id).in_sequence(queue)
|
||||
Resque.expects(:enqueue).with(Snpedia, @snp.id).in_sequence(queue)
|
||||
Resque.expects(:enqueue).with(Plos, @snp.id).in_sequence(queue)
|
||||
Sidekiq::Client.expects(:enqueue).with(Mendeley, @snp.id).in_sequence(queue)
|
||||
Sidekiq::Client.expects(:enqueue).with(Snpedia, @snp.id).in_sequence(queue)
|
||||
Sidekiq::Client.expects(:enqueue).with(Plos, @snp.id).in_sequence(queue)
|
||||
Snp.update_papers
|
||||
end
|
||||
|
||||
should "not be updated when not older than 31 days" do
|
||||
@snp.mendeley_updated = @snp.snpedia_updated = @snp.plos_updated = 30.days.ago
|
||||
@snp.save
|
||||
Resque.expects(:enqueue).never
|
||||
Sidekiq::Client.expects(:enqueue).never
|
||||
Snp.update_papers
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user