From ad802cfead37252ff575bddfd3f5ff99700dd1c3 Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 12 Aug 2015 14:45:43 -0700 Subject: [PATCH] Squashed commit of the following: commit 7ec9bec089408d5ec5e195b851b94568bee44627 Author: snipe Date: Wed Aug 12 14:43:11 2015 -0700 Additional notes commit 6c9d4c1b782c65f496828b289296304cdd75e01a Author: snipe Date: Wed Aug 12 14:36:28 2015 -0700 Deleted unused unit test commit 9b1f0a8096c156927adf6cc8dad1df253b79707b Author: snipe Date: Wed Aug 12 14:36:21 2015 -0700 Switching back to require from require_once commit 15db5e126d219e23180481d4559a7fd5e5d7e0d2 Author: snipe Date: Wed Aug 12 14:32:26 2015 -0700 Commenting out the unit test for user because it's throwing hasher errors. Need to come back to this. This test is used when you call straight phpunit. commit bc224f48e326babb4cd12296217e7665286102e9 Author: snipe Date: Wed Aug 12 14:29:31 2015 -0700 Fuckit. phpunit it is. commit e42801e436e3108e4db6ce38bec91be1ad8643f5 Author: snipe Date: Wed Aug 12 14:26:24 2015 -0700 This will probably just trigger that damned curl error again :( commit 8ad56fe92d6d86d78d8690a7a43ca17ea1ea6134 Author: snipe Date: Wed Aug 12 14:18:27 2015 -0700 Removed phpbrowser commit b72fc14cf4675523e7db9827602a9e6fbb1f1cfb Author: snipe Date: Wed Aug 12 13:40:10 2015 -0700 I don't know why route filters aren't working in the laravel module commit 3226c687ac6538fd838710b601ba20a97bb23cb4 Author: snipe Date: Wed Aug 12 13:31:35 2015 -0700 Require once in start? commit 1cea92c4414689be7b411826ed4ce4e2b1768e61 Author: snipe Date: Wed Aug 12 13:16:32 2015 -0700 Trying require_once commit c8b9a2853cbb8bd65685c51b93fabccb15069b1a Author: snipe Date: Wed Aug 12 13:13:35 2015 -0700 Poking and hoping commit e906d4daba8eb12be8b615dfadcedc3ea19eb58f Author: snipe Date: Wed Aug 12 13:10:50 2015 -0700 I cannot imagine that this will help, but whatever commit 279be63f5a0c90278f961fde7228edddd65db612 Author: snipe Date: Wed Aug 12 12:53:11 2015 -0700 Removing the laravel module returns the curl host error commit ce3a2fc074fd597ebd274ad42925bcaebcd25ea4 Author: snipe Date: Wed Aug 12 12:51:25 2015 -0700 Pulling laravel just to see commit bd27268539b377d03031485e4e2c133ab02b4a1f Author: snipe Date: Wed Aug 12 12:50:02 2015 -0700 Turn off email notifications commit 73d6f5cc6a2a5721acf686ad6a434a06cddcea38 Author: snipe Date: Wed Aug 12 12:49:14 2015 -0700 Reverting the revert commit 51a2f8f40e1b0240af2778076b21beb518b8909d Author: snipe Date: Wed Aug 12 12:47:07 2015 -0700 Reverting commit aa36aff57fe734b0accd71eefe9b2f6b50b1f169 Author: snipe Date: Wed Aug 12 12:45:16 2015 -0700 sigh. commit a7241c0cf6b050768379e9b36c53584c29e1268a Author: snipe Date: Wed Aug 12 12:38:14 2015 -0700 Trying gitter again commit 22b3190e0a52b072e208029e79299e74f74f8f55 Author: snipe Date: Wed Aug 12 12:31:16 2015 -0700 Missing a fucking semicolon commit 637e4f03f3ed2252dd9aa919fce7a31482bf5bb1 Author: snipe Date: Wed Aug 12 12:26:23 2015 -0700 Trying to fix parsefloat error commit 70e086fb3d571d0372e307e539a54ee93bf9ff4b Author: snipe Date: Wed Aug 12 12:22:51 2015 -0700 Removed gitter commit 65e6b1ad43e2659355a53fa30ec7aa90882b6027 Author: snipe Date: Wed Aug 12 12:12:38 2015 -0700 Removed extra comments, added route filter back in commit c18e8747dfbfd999a208ef472194e6f5ab0ca2ba Author: snipe Date: Wed Aug 12 12:07:58 2015 -0700 Removing sudo from codecept commit 2c9c2fb2d60745eb983a04ba3fb912daf728b7c8 Author: snipe Date: Wed Aug 12 12:06:18 2015 -0700 Comment out ping debugging commit 6eb57e43dc12b5724cf8cccc42df4a5a01c7e362 Author: snipe Date: Wed Aug 12 12:04:23 2015 -0700 Don't require sudo commit 0c13c9e7bc56986eccaaebaa77f39fb6883da278 Author: snipe Date: Wed Aug 12 11:58:16 2015 -0700 Use the Laravel 4 options instead of bootstrap commit 8a3c672a825a20d9c63afebcef0065d391414239 Author: snipe Date: Wed Aug 12 11:51:30 2015 -0700 Remove -vvv and -d for codeception commit bd1e3cbc2a543a580229630a0985bb9b89c6f99f Author: snipe Date: Wed Aug 12 11:50:12 2015 -0700 Add gitter integration commit 4eae1eb44776d17d9925d77e9db20d0ca3a56f14 Author: snipe Date: Wed Aug 12 11:46:34 2015 -0700 Try setting the hostname again and see if that fails commit 01a6fbe19dfc939c6412bf8858fd7a1cfdc8ac56 Merge: 8cdd44e f357e71 Author: snipe Date: Tue Aug 11 23:08:40 2015 -0700 Merge branch 'travic-ci-misery' of github.com:snipe/snipe-it into travic-ci-misery commit 8cdd44e650e88c8c0a7e5764a1b4b458e965742f Author: snipe Date: Tue Aug 11 23:08:34 2015 -0700 Output dir commit f357e71e20e42058eb4225855be973da56b3703c Author: Brady Wetherington Date: Tue Aug 11 22:54:32 2015 -0700 blech commit db2552ac2fd3eb77c37e7ddd2d61d42ba01b80af Author: Brady Wetherington Date: Tue Aug 11 22:32:59 2015 -0700 blech commit 9a3d2c513090c168922b5d8c4929da5e2d366fe0 Author: Brady Wetherington Date: Tue Aug 11 22:29:52 2015 -0700 wat commit dd7864ac5462fbc1280ba33f33a467725ad0a16a Author: Brady Wetherington Date: Tue Aug 11 22:24:08 2015 -0700 blech commit 754aa2d0d8e0dca7571ac14d8b5c43656bc4e994 Merge: 0ec8c87 d6d685c Author: snipe Date: Tue Aug 11 22:19:14 2015 -0700 Merge branch 'travic-ci-misery' of github.com:snipe/snipe-it into travic-ci-misery commit 0ec8c87e8ab38206edb28bf7e69a6bf2f41e806a Author: snipe Date: Tue Aug 11 22:18:36 2015 -0700 Slightly improved scenario description commit d6d685c15eb40b99a010cddadaf01bb3d97d603e Author: Brady Wetherington Date: Tue Aug 11 22:15:32 2015 -0700 blech commit 58ac3b3fa43575176b6156a36e91b24cb0946c16 Author: Brady Wetherington Date: Tue Aug 11 22:10:00 2015 -0700 blech commit 89844a40179440c3b89ad6d193da880906c94bca Author: Brady Wetherington Date: Tue Aug 11 22:05:13 2015 -0700 blech commit 4ccf1a513f79ce325e7d35b427a7a3231c0e5b97 Author: Brady Wetherington Date: Tue Aug 11 22:02:07 2015 -0700 blech commit 6ca0f6bdc468df629f82ce7ae1bb086f4de2057f Author: Brady Wetherington Date: Tue Aug 11 21:59:45 2015 -0700 blech commit 1caa7fe28d8421de7ca728b6d362c702717ddba8 Author: Brady Wetherington Date: Tue Aug 11 21:56:45 2015 -0700 yuck commit 24f7f3a892c47b5e8e0bb705b5b8ddfd6c58d86f Author: Brady Wetherington Date: Tue Aug 11 21:52:53 2015 -0700 try something else commit f0c83ee25302f884ce6810deded06859ec4f40c9 Author: Brady Wetherington Date: Tue Aug 11 21:47:51 2015 -0700 trying to get phpinfo commit 32336e73709c3426a982b6eaa9153dcee223d379 Author: snipe Date: Tue Aug 11 21:10:05 2015 -0700 Verbose on coceception commit ba29a13249cac866201a4165818238e9ea370d18 Author: snipe Date: Tue Aug 11 21:07:52 2015 -0700 Remove codecoverage stuff just in case it's messing things up commit 519ed11fc3997012aa34047a30c994d51b8ca68f Author: snipe Date: Tue Aug 11 21:03:17 2015 -0700 More poking and hoping commit 9949d68341b4b4c8daad7ce591cdccbb20172059 Author: snipe Date: Tue Aug 11 20:55:24 2015 -0700 Try forcing test env in codeception.yml commit 4726639f851cdf69ae8ba9c3a258d407f3c0a820 Author: snipe Date: Tue Aug 11 20:49:23 2015 -0700 Try switching back to the old instances commit ce6e417a02df729bf4c60c14037dc74876aed5a8 Author: snipe Date: Tue Aug 11 20:45:59 2015 -0700 ... commit c3767e25e4aa62d5e2c348ee2fe9964fb1c3978e Author: snipe Date: Tue Aug 11 20:42:32 2015 -0700 Changed hostname for travis commit d05951184006994e01c8ba4c26157877d33bf1b4 Author: snipe Date: Tue Aug 11 20:40:05 2015 -0700 Try to echo out the hostname so I can have some idea of WTF is happening --- .gitignore | 1 + .travis.yml | 18 ++++++++++++------ app/tests/TestCase.php | 5 ++--- app/tests/UserTest.php | 29 ----------------------------- bootstrap/start.php | 2 -- codeception.yml | 17 +---------------- tests/acceptance.suite.yml | 8 +++++++- tests/functional.suite.yml | 8 +++++++- tests/unit.suite.yml | 8 +++++++- tests/unit/UserTest.php | 2 ++ 10 files changed, 39 insertions(+), 59 deletions(-) delete mode 100644 app/tests/UserTest.php diff --git a/.gitignore b/.gitignore index eaf1c55ca9..af9e7c181f 100755 --- a/.gitignore +++ b/.gitignore @@ -26,3 +26,4 @@ public/assets/.siteflow app/config/local/session.php .couscous tests/_support/_generated/* +tests/_data/scenarios diff --git a/.travis.yml b/.travis.yml index ec5c34ef74..f28e63f0a8 100755 --- a/.travis.yml +++ b/.travis.yml @@ -1,13 +1,11 @@ addons: - hosts: - - snipe-it.dev + hosts: + - snipe-it.dev +sudo: false # see http://about.travis-ci.org/docs/user/languages/php/ for more hints language: php -# We don't use sudo here, so we can use travis' upgraded container infrastructure -sudo: false - # list any PHP version you want to test against php: - 5.4 @@ -35,9 +33,17 @@ before_script: # omitting "script:" will default to phpunit # use the $DB env variable to determine the phpunit.xml to use -script: ./vendor/bin/codecept run +# script: ./vendor/bin/codecept run +script: phpunit # configure notifications (email, IRC, campfire etc) notifications: + email: false slack: secure: vv9we1RxB9RsrMbomSdq6D7vz/okobw87pEkgIZjB+hj1QpQ2by90gsPsOa+NgsJEFaEP7e4KlT6SH8kK+zhbmuKaUd3d1//XdcancE22LZXi6tkiB5yuR/Jhhb1LLDqyGJTB4D92hMnnCPiUjpxNA3r437ttNeYRdYIEEP3drA= + webhooks: + urls: + - https://webhooks.gitter.im/e/5e136eb0c1965f3918d0 + on_success: change # options: [always|never|change] default: always + on_failure: change # options: [always|never|change] default: always + on_start: false # default: false diff --git a/app/tests/TestCase.php b/app/tests/TestCase.php index 0b95430f5c..7f9a97b444 100755 --- a/app/tests/TestCase.php +++ b/app/tests/TestCase.php @@ -35,9 +35,8 @@ class TestCase extends Illuminate\Foundation\Testing\TestCase */ private function prepareForTests() { - Artisan::call('migrate', array('--package' => 'cartalyst/sentry','--force'=>true)); - Artisan::call('migrate'); - Mail::pretend(true); + Artisan::call('migrate', array('--package' => 'cartalyst/sentry')); + Artisan::call('migrate'); } } diff --git a/app/tests/UserTest.php b/app/tests/UserTest.php deleted file mode 100644 index b33251020b..0000000000 --- a/app/tests/UserTest.php +++ /dev/null @@ -1,29 +0,0 @@ -email = "name@example.com"; - $user->password = "password"; - $user->password_confirmation = "password"; - - // User should not save - $this->assertFalse($user->save()); - - // Save the errors - $errors = $user->errors()->all(); - - // There should be 1 error - $this->assertCount(1, $errors); - - // The username error should be set - $this->assertEquals($errors[0], "The username field is required."); - } - - -} diff --git a/bootstrap/start.php b/bootstrap/start.php index 364daeaf03..b7862c418d 100755 --- a/bootstrap/start.php +++ b/bootstrap/start.php @@ -25,8 +25,6 @@ $app = new Illuminate\Foundation\Application; */ $env = $app->detectEnvironment(array( - - 'testing' => array('snipe-it.dev','worker-linux-docker-*'), 'local' => array('homestead','AlisonMBP'), 'staging' => array('stagingweb01'), 'production' => array('www.yourserver.com') diff --git a/codeception.yml b/codeception.yml index b953b30faf..cc71ac17d5 100644 --- a/codeception.yml +++ b/codeception.yml @@ -8,24 +8,9 @@ settings: bootstrap: _bootstrap.php colors: true memory_limit: 1024M -coverage: - enabled: false - remote: false - include: - - app/* - exclude: - - app/storage/cache/* - remote_context_options: - http: - timeout: 60 - ssl: - verify_peer: false modules: - enabled: - - Laravel4 - config: Db: - dsn: 'mysql:host=localhost;dbname=snipeit_laravel' + dsn: 'mysql:host=localhost;dbname=snipeit_unit' user: 'travis' password: '' dump: tests/_data/dump.sql diff --git a/tests/acceptance.suite.yml b/tests/acceptance.suite.yml index a7f423970d..7c4f3eb351 100644 --- a/tests/acceptance.suite.yml +++ b/tests/acceptance.suite.yml @@ -9,4 +9,10 @@ modules: enabled: - PhpBrowser: url: http://snipe-it.dev - - \Helper\Acceptance +# Even when filters are set to true, this doesn't seem to work. +# Also, it looks like the Laravel4 module isn't really meant for +# Acceptance tests? +# - Laravel4: +# filters: true +# cleanup: true +# environment: testing diff --git a/tests/functional.suite.yml b/tests/functional.suite.yml index 18317d973c..87c6edd80b 100644 --- a/tests/functional.suite.yml +++ b/tests/functional.suite.yml @@ -6,4 +6,10 @@ class_name: FunctionalTester modules: - enabled: [Filesystem, \Helper\Functional] + enabled: + - Filesystem + - \Helper\Functional + - Laravel4: + filters: true + cleanup: true + environment: testing diff --git a/tests/unit.suite.yml b/tests/unit.suite.yml index aaf619e4f4..913c3e51ec 100644 --- a/tests/unit.suite.yml +++ b/tests/unit.suite.yml @@ -3,4 +3,10 @@ # suite for unit (internal) tests. class_name: UnitTester modules: - enabled: [Asserts, \Helper\Unit] + enabled: + - Asserts + - \Helper\Unit + - Laravel4: + filters: true + cleanup: true + environment: testing diff --git a/tests/unit/UserTest.php b/tests/unit/UserTest.php index 623c512f5e..a5358e4e8f 100644 --- a/tests/unit/UserTest.php +++ b/tests/unit/UserTest.php @@ -12,6 +12,7 @@ class UserTest extends TestCase { $user = new User; $user->email = "name@example.com"; $user->password = "password"; + $user->setHasher(new Cartalyst\Sentry\Hashing\BCryptHasher); // User should not save @@ -29,4 +30,5 @@ class UserTest extends TestCase { */ + }