From 1960136b5ec3071ab67f9913f0bc0de849694f16 Mon Sep 17 00:00:00 2001 From: Ryan Lue Date: Tue, 8 May 2018 18:27:05 +0800 Subject: [PATCH 1/3] Hotfix for moved database.yml.pkgr file --- contrib/packager.io/functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/packager.io/functions b/contrib/packager.io/functions index 9d3bb84ad..0e3821c2d 100644 --- a/contrib/packager.io/functions +++ b/contrib/packager.io/functions @@ -180,7 +180,7 @@ function update_database_yml () { sed -e "s/.*adapter:.*/ adapter: ${ADAPTER}/" \ -e "s/.*username:.*/ username: ${DB_USER}/" \ -e "s/.*password:.*/ password: ${DB_PASS}/" \ - -e "s/.*database:.*/ database: ${DB}/" < ${ZAMMAD_DIR}/config/database.yml.pkgr > ${ZAMMAD_DIR}/config/database.yml + -e "s/.*database:.*/ database: ${DB}/" < ${ZAMMAD_DIR}/contrib/database.yml.pkgr > ${ZAMMAD_DIR}/config/database.yml } function initialise_database () { From 121c06e4be5e00d41de3e770e82474816c8359ac Mon Sep 17 00:00:00 2001 From: Ryan Lue Date: Tue, 8 May 2018 18:31:43 +0800 Subject: [PATCH 2/3] Hotfix for websocket-server spec (port assignment) --- spec/scripts/websocket_server_spec.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spec/scripts/websocket_server_spec.rb b/spec/scripts/websocket_server_spec.rb index 557fcab70..88e61f2bd 100644 --- a/spec/scripts/websocket_server_spec.rb +++ b/spec/scripts/websocket_server_spec.rb @@ -14,6 +14,8 @@ describe 'websocket-server' do # This error is raised for invalid bind addresses let(:error_msg) { "`start_tcp_server': no acceptor" } let(:ipv6_addr) { '::1/128' } + # Prevent port assignment conflicts during parallel test execution + let(:port) { '60042' } # Flush logs before do @@ -23,7 +25,7 @@ describe 'websocket-server' do it 'starts up successfully' do begin - system("#{ws_server} start -db #{ipv6_addr} >/dev/null 2>&1") + system("#{ws_server} start -db #{ipv6_addr} -p #{port} >/dev/null 2>&1") # Wait for daemon to start Timeout.timeout(20, Timeout::Error, 'WebSocket Server startup timed out') do From f1c1a16c7f1c9960a83ba8c534f539f4736c4e35 Mon Sep 17 00:00:00 2001 From: Ryan Lue Date: Tue, 8 May 2018 19:16:28 +0800 Subject: [PATCH 3/3] Hotfix for CI build broken by 297d9bb --- .travis.yml | 4 ++-- contrib/travis-ci.org/database.yml.test-mysql | 11 +++++++++++ contrib/travis-ci.org/database.yml.test-postgresql | 11 +++++++++++ 3 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 contrib/travis-ci.org/database.yml.test-mysql create mode 100644 contrib/travis-ci.org/database.yml.test-postgresql diff --git a/.travis.yml b/.travis.yml index 8d77cc9bb..59b08827a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -49,9 +49,9 @@ before_install: - git fetch --unshallow - 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}" = "mysql" ]; then cp contrib/travis-ci.org/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 + - if [ "${DB}" = "postgresql" ]; then cp contrib/travis-ci.org/database.yml.test-postgresql config/database.yml; fi - export RAILS_ENV=test - export ZAMMAD_VERSION=$(git describe --tags | sed -e 's/-[a-z0-9]\{8,\}.*//g') install: diff --git a/contrib/travis-ci.org/database.yml.test-mysql b/contrib/travis-ci.org/database.yml.test-mysql new file mode 100644 index 000000000..f6b525b4c --- /dev/null +++ b/contrib/travis-ci.org/database.yml.test-mysql @@ -0,0 +1,11 @@ +# Warning: The database defined as "test" will be erased and +# re-generated from your development database when you run "rake". +# Do not set this db to the same as development or production. +test: + adapter: mysql2 + database: zammad_test + pool: 50 + timeout: 5000 + encoding: utf8 + username: some_user + password: some_pass diff --git a/contrib/travis-ci.org/database.yml.test-postgresql b/contrib/travis-ci.org/database.yml.test-postgresql new file mode 100644 index 000000000..bda094235 --- /dev/null +++ b/contrib/travis-ci.org/database.yml.test-postgresql @@ -0,0 +1,11 @@ +# Warning: The database defined as "test" will be erased and +# re-generated from your development database when you run "rake". +# Do not set this db to the same as development or production. +test: + adapter: postgresql + database: zammad_test + pool: 50 + timeout: 5000 + encoding: utf8 + username: postgres + password: