Commit Graph

121 Commits

Author SHA1 Message Date
Lucas Bickel 39fb738945 Always log locally during test run 2017-03-02 16:45:34 +01:00
Lucas Bickel 693f1f6e51 Remove system zf1 from test include path 2017-03-02 13:57:56 +01:00
Lucas Bickel 7f3f420763 Regression: travis db is on localhost
This is one of the "small" things I need to take care of on my local env. Once the value is changeable through more than just the config file, I'll won't be touching these in my docker envs as much.
2017-02-28 12:29:40 +01:00
Lucas Bickel 1ca47d67d5 Use local configuration in tests
This way the tests should really run out of the box with what is described in TESTING.md.
2017-02-28 12:16:03 +01:00
Lucas Bickel 625f92fe44 Vendorize ZF1, fix PHPUnit and configure travis
This a a rather large commit due to the nature of the stuff it is touching. To get PHPUnit up and running again I had to update some deps and I did so by vendorizing them. The vendorizing of zf1 makes sense since distros are already considering to drop it from their repos.

* [x] install vendorized zf1 with composer
* [x] load composer autoloader before zf1
* [x] Implement headAction for all Zend_Rest_Controller based controllers
* [x] switch to yml dataset to get around string only limitations of xml sets (also removed warning in readme)
* [x] use year 2044 as hardcoded date for tests since it is in the future and has the same days like previously used 2016
* [x] make tests easier to run when accessing phpunit directly
* [x] clean up test helper to always use airtime.conf
* [x] switch test dbname to libretime_test
* [x] test db username password switched to libretime/libretime
* [x] install phpunit with composer in a clear version (make tests easier to reproduce on other platforms)
* [x] remove local libs from airtime repo (most of airtime_mvc/library was not needed of in vendor already)
* [x] configure composer autoloading and use it (also removed requires that are not needed anymore)
* [x] add LibreTime prefix for FileNotFoundException (phing had a similar class and these are all pre-namespace style)
* [x] add .travis.yml file
* [x] make etc and logdir configurable with LIBRETIME_CONF_DIR and LIBRETIME_LOG_DIR env (so travis can change it)
* [x] slight cleanup in config for travis not to fail
* [x] add cloud_storage.conf for during test runs
* [x] rewrite mvc testing docs and move them to docs/ folder
* [x] don't use `static::class` in a class that does not have a parent class, use `__CLASS__` instead.
* [x] don't use `<ClassName>::class`, since we already know what class we want `"<ClassName>"` ist just fine.
* [x] fix "can't use method in write context" errors on 5.4 (also helps the optimizer)
* [x] add build status badge on main README.md

Fixes https://github.com/LibreTime/libretime/issues/4

The PHP parts of https://github.com/LibreTime/libretime/pull/10 get obsoleted by this change and it will need rebasing.

This also contains https://github.com/LibreTime/libretime/pull/8, the late static binding compat code was broken for no reason and until CentOS drops php 5.4 there is no reason I'm aware of not to support it. I inlined #8 since the test would be failing on php 5.4 without the change.

If you want to run tests you need to run `composer install` in the root directory and then `cd airtime_mvc/tests && ../../vendor/bin/phpunit`. For the tests to run the user `libretime` needs to be allowed to create the `libretime_test` database. See `docs/TESTING.md` for more info on getting set up.
2017-02-27 17:59:01 +01:00
Duncan Sommerville 15c7ef5885 Celery backend and support for dev-env worker parallelization 2015-06-12 12:31:55 -04:00
Albert Santoni 11c6818e61 Merge branch '2.5.x-installer' into saas-installer-albert
Conflicts:
	.gitignore
	airtime_mvc/application/Bootstrap.php
	airtime_mvc/application/configs/conf.php
	airtime_mvc/application/controllers/SystemstatusController.php
	airtime_mvc/application/controllers/UpgradeController.php
	airtime_mvc/application/upgrade/Upgrades.php
	airtime_mvc/application/views/scripts/systemstatus/index.phtml
	airtime_mvc/build/airtime.conf
	airtime_mvc/build/sql/defaultdata.sql
	airtime_mvc/public/index.php
	airtime_mvc/tests/application/helpers/AirtimeInstall.php
	install_minimal/airtime-install
	install_minimal/include/airtime-constants.php
	install_minimal/include/airtime-copy-files.sh
	install_minimal/include/airtime-db-install.php
	install_minimal/include/airtime-initialize.sh
	install_minimal/include/airtime-install.php
	install_minimal/include/airtime-installed-check.php
	install_minimal/include/airtime-remove-files.sh
	install_minimal/include/airtime-upgrade.php
	python_apps/media-monitor/install/media-monitor-copy-files.py
	python_apps/monit/monit-airtime-generic.cfg
	python_apps/pypo/airtime-playout
	python_apps/pypo/install/pypo-copy-files.py
	python_apps/pypo/liquidsoap/generate_liquidsoap_cfg.py
	python_apps/pypo/liquidsoap/ls_script.liq
	python_apps/pypo/pypo/__main__.py
	python_apps/pypo/pypo/media/update/replaygain.py
	python_apps/pypo/pypo/media/update/replaygainupdater.py
	python_apps/pypo/pypo/media/update/silananalyzer.py
	python_apps/python-virtualenv/airtime_virtual_env.pybundle
	python_apps/python-virtualenv/requirements
	utils/airtime-check-system.php
2015-05-22 16:05:29 -04:00
Duncan Sommerville bc604b992e CC-5986 - Fixed unit tests, removed unnecessary code from service execution files 2015-01-28 13:19:50 -05:00
drigato 648198b3e6 Fixed unit tests by including the vendor directory for propel files, and the cloud_storage directory 2015-01-27 10:53:58 -05:00
drigato ef6572aea9 Merge branch '2.5.x' into saas
Conflicts:
	airtime_mvc/tests/application/services/database/datasets/test_ccShowInsertedIntoDatabase.xml
2015-01-23 16:24:09 -05:00
Albert Santoni 6e43505379 Merge branch '2.5.x' into 2.5.x-installer 2015-01-22 17:36:12 -05:00
Albert Santoni 239aae029e Added image_path to unit tests. 2015-01-22 17:30:29 -05:00
Duncan Sommerville 5e22f929c7 Reverted commit mistakenly changing file modifiers to 755 2015-01-14 20:45:03 -05:00
Duncan Sommerville f4c5cf1353 Added virtualenv back into install process 2015-01-05 16:41:03 -05:00
Duncan Sommerville f5b4928538 More work on web installer 2014-12-09 17:48:16 -05:00
Duncan Sommerville 0196aa21f5 Fixed testcases to account for show image path in and show instance description 2014-10-09 09:39:50 -04:00
drigato 871ddb47d8 Removed database test that confirms the is_linkable is set to false after a show is un-linked.
Since we removed this behaviour from Airtime, and a show can be linked and unlinked as many
times as the user wants, this test is deprecated.
2014-08-25 18:33:41 -04:00
drigato daaff1e68a Removed database test that confirms the is_linkable is set to false after a show is un-linked.
Since we removed this behaviour from Airtime, and a show can be linked and unlinked as many
times as the user wants, this test is deprecated.
2014-08-21 17:56:00 -04:00
Albert Santoni 345c782eb9 Fixed the unit tests and changed ops->zu 2014-06-09 11:34:25 -04:00
Albert Santoni 80f09959bb Fixed permissions of unit tests 2014-03-19 17:34:07 -04:00
Albert Santoni c104048bc7 Merge branch '2.5.x' of github.com:sourcefabric/Airtime into 2.5.x 2014-03-12 18:01:51 -04:00
Albert Santoni 5b9ceb8d2d Made the runtests.sh script work regardless of CWD 2014-03-12 18:01:27 -04:00
drigato f7602cadd8 Fixed broken test 2014-03-12 17:32:22 -04:00
drigato 78d34a6d16 Fixed broken test 2014-03-10 17:31:24 -04:00
drigato 03bb0e1df9 CC-5725 Changing a show's repeat type removes first instance from repeating seriesCC-5726: Write database test cases for CC-5725 2014-03-07 15:59:57 -05:00
drigato bcda9ea5e6 Broke unit test for adding content to single show 2014-03-05 14:50:35 -05:00
drigato ebc68b980c CC-5718: Show content can get scheduled in instances that are in the past
Disabled scheduled content into instances that have already played out
Removed setting the show's start date to the first repeating instance's start date
because we already fixed that in CC-5697
2014-03-05 13:12:27 -05:00
drigato 1715f2187d CC-5715: Write database test to check the schedule start times after editing a repeating show and changing the repeat day 2014-02-27 13:08:41 -05:00
drigato 4cb785a062 CC-5716: Write database test to check the show content after editing a repeating show and removing a repeat day 2014-02-27 12:10:28 -05:00
drigato e5cdaf3785 Temporarily commenting out test 2014-02-27 09:32:28 -05:00
drigato 1acdf2ca80 CC-5716: Write database test to check the show content after editing a repeating show and removing a repeat day 2014-02-27 07:35:08 -05:00
Albert Santoni 7ee5c8ffd7 Another dummy commit for Bamboo 2014-02-10 13:32:41 -05:00
Albert Santoni 36d6a6b2bf Dummy commit to test web hook 2014-02-10 13:18:28 -05:00
Albert Santoni 034d1dc9f8 Unit test docs update 2014-02-10 13:03:11 -05:00
Albert Santoni 296adfdb24 CC-5651: Unit Test the Scheduler
* Added a beastly unit test for Application_Model_Schedule::isFileScheduledInTheFuture
2014-02-05 15:37:47 -05:00
drigato ba84e609e7 Moved commit hook scripts to dev_tools directory 2014-01-31 16:42:53 -05:00
drigato 6d63b81f76 Testing commit triggers.... 2014-01-31 15:56:59 -05:00
drigato a00ab8bc79 Added comment for phpunit 2014-01-31 15:31:40 -05:00
drigato f71909d255 CC-5651: Unit Test the Scheduler
Some fine tuning
2014-01-31 15:22:19 -05:00
drigato e24d25e398 CC-5651: Unit Test the Scheduler
Log results in xml file for junit parser
2014-01-31 12:41:15 -05:00
drigato 5c01234445 CC-5651: Unit Test the Scheduler
Small fix to runtests script
2014-01-31 11:18:46 -05:00
drigato 4beb06a1d9 CC-5651: Unit Test the Scheduler
Creat a rabbitmq vhost and user before running tests so airtime doesn't have to be installed
2014-01-31 11:09:22 -05:00
drigato a59453cde5 CC-5651: Unit Test the Scheduler 2014-01-27 17:17:03 -05:00
drigato 55665fb246 CC-5651: Unit Test the Scheduler
Added test for weekly repeat show R&R show creation
2014-01-27 15:10:42 -05:00
drigato 697e50c50d CC-5651: Unit Test the Scheduler
Added test for non-repeating record and rebroadcast shows
2014-01-27 13:23:28 -05:00
drigato 6da493110f CC-5651: Unit Test the Scheduler
Fixed linked show test
2014-01-27 12:23:46 -05:00
drigato d6aabfdc88 CC-5651: Unit Test the Scheduler
Added some linked show tests
2014-01-24 17:25:40 -05:00
drigato 2bbc42f532 CC-5651: Unit Test the Scheduler
Moved test data outside of services
2014-01-24 16:08:38 -05:00
drigato e0650fb840 CC-5651: Unit Test the Scheduler
Overlapping show tests
2014-01-24 15:14:31 -05:00
drigato 2076b3c069 CC-5651: Unit Test the Scheduler
Add logging class to bootstrap
2014-01-24 11:39:15 -05:00