Merge branch 'develop' of github.com:zammad/zammad into develop

This commit is contained in:
André Bauer 2016-11-30 14:47:45 +01:00
commit e18079fce7
2 changed files with 32 additions and 7 deletions

View file

@ -1,14 +1,20 @@
dist: trusty
sudo: required
notifications:
email: false
email:
- me+tv@zammad.com
env:
- DB=mysql
- DB=postgresql
addons:
postgresql: "9.4"
apt:
packages:
- mysql-server-5.6
- mysql-client-core-5.6
- mysql-client-5.6
services:
- postgresql
- mysql
language: ruby
rvm:
@ -16,13 +22,17 @@ rvm:
before_install:
- sudo apt-get -qq update
- sudo apt-get install -y curl git-core patch build-essential bison zlib1g-dev libssl-dev libxml2-dev libxml2-dev sqlite3 libsqlite3-dev autotools-dev libxslt1-dev libyaml-0-2 autoconf automake libreadline6-dev libyaml-dev libtool libgmp-dev libgdbm-dev libncurses5-dev pkg-config libffi-dev libmysqlclient-dev postfix
- mysql -u root -e "CREATE USER 'some_user'@'localhost' IDENTIFIED BY 'some_pass';"
- mysql -u root -e "GRANT ALL PRIVILEGES ON *.* TO 'some_user'@'localhost';"
- export RAILS_ENV=development
- cp config/database.yml.dist config/database.yml
- if [ "${DB}" = "mysql" ]; then mysql -u root -e "CREATE USER 'some_user'@'localhost' IDENTIFIED BY 'some_pass';"; fi
- if [ "${DB}" = "mysql" ]; then mysql -u root -e "GRANT ALL PRIVILEGES ON *.* TO 'some_user'@'localhost';"; fi
- if [ "${DB}" = "mysql" ]; then cp config/database.yml.test-mysql config/database.yml; fi
- if [ "${DB}" = "postgresql" ]; then psql -c 'create database zammad_test;' -U postgres; fi
- if [ "${DB}" = "postgresql" ]; then cp config/database.yml.test-postgresql config/database.yml; fi
- export RAILS_ENV=test
install:
- bundle install --without postgres
- if [ "${DB}" = "mysql" ]; then bundle install --without postgres; fi
- if [ "${DB}" = "postgresql" ]; then bundle install; fi
script:
- bundle exec rubocop
- rake db:create
- rake db:migrate
- rake db:seed
@ -30,3 +40,17 @@ script:
- rake test:controllers
- rake assets:precompile
- rake db:drop
- rake db:create
- rake db:migrate
- rake db:seed
- ruby -I test/ test/integration/auto_wizard_test.rb
- rake db:drop
- rake db:create
- rake db:migrate
- rake db:seed
- ruby -I test/ test/integration/geo_location_test.rb
- ruby -I test/ test/integration/geo_calendar_test.rb
- ruby -I test/ test/integration/user_agent_test.rb
- ruby -I test/ test/integration/user_device_controller_test.rb
- ruby -I test/ test/integration/sipgate_controller_test.rb
- rake db:drop

View file

@ -548,7 +548,8 @@ class TicketOverviewTest < ActiveSupport::TestCase
assert_equal(result[2][:tickets].class, Array)
assert(result[2][:tickets].empty?)
sleep 1
travel_to Time.zone.now + 1.second # because of mysql millitime issues
ticket3 = Ticket.create(
title: 'overview test 3',
group: Group.lookup(name: 'OverviewTest'),