Commit Graph

175 Commits

Author SHA1 Message Date
Bernard Hamlin
1d8f112dd8 Refactor to separate 'applyState' and 'saveState' functions
`appyState` will now only read the test session data and update the
environment to relect that state. This is intended for things like
database connections and mailer classes. Actions that need to alter
state to apply it (eg creating a temp db) should be done in other
actions such as 'start'

`saveState` will only take an existing state object and persist it to a
file

Also addresses:

[Connect to test database on session load](https://github.com/silverstripe/silverstripe-testsession/pull/63)
[Skip Temp DB creation if state has no database prop](https://github.com/silverstripe/silverstripe-testsession/pull/64)
Prevent re-creating session file on end (original issue for this PR)
2019-05-17 15:46:39 +12:00
Serge Latyntcev
4f68d5bae2 Merge branch '2' 2019-05-15 08:57:07 +12:00
Serge Latyntsev
0c479ad2eb
Merge pull request #63 from blueo/pulls/db-connection-on-state-load
Connect to test database on session load
2019-05-10 14:15:03 +12:00
Guy Marriott
efb6777ee9
BUGFIX: updated route config for testsession endpoint (#66)
BUGFIX: updated route config for testsession endpoint
2019-05-08 16:27:55 +12:00
pjayme
81c2417414 updated route config for testsession endpoint 2019-05-08 12:05:28 +12:00
Bernard Hamlin
075d960e5d Connect to test database on session load 2019-03-13 09:17:12 +13:00
Serge Latyntsev
61d12ec08a
Merge pull request #61 from webbuilders-group/db-reconnect-fix
BUGFIX: Fixed issue where the incorrect database connection could be made when using a stubfile
2019-02-01 14:49:01 +13:00
UndefinedOffset
e957d1e0fd BUGFIX: Fixed issue where the incorrect database connection could be made when using a stubfile (fixes #60) 2019-01-24 15:22:29 -04:00
Serge Latyntsev
8827e97417
Merge pull request #59 from open-sausages/pulls/2.2/wait-for-pending-requests-for-real
Fix TestSessionState and TestSessionEnvironment
2019-01-10 16:24:15 +13:00
Serge Latyntcev
f54baefb5a Rename TestSessionState::microtime to millitime 2019-01-10 15:30:39 +13:00
Serge Latyntcev
32c8e6a3b1 Fix TestSessionState and TestSessionEnvironment
Fixing a bug that makes it only wait for pending requests, but
not for some time after the last response
2019-01-10 11:48:59 +13:00
Maxime Rainville
fc0f7baa11
Merge pull request #58 from open-sausages/pulls/2.2/pending-requests-awaited
ADD / TestSessionState initial implementation
2019-01-08 17:35:17 +13:00
Serge Latyntcev
0c078e5027 TestSessionState implementation refinement;
Move increment/decrement methods to TestSessionState class,
fix some documentation, fix some code style and readability issues
2019-01-08 16:47:37 +13:00
Serge Latyntcev
78dd43ed96 ADD / TestSessionState initial implementation
TestSessionState model initial implementation
TestSessionEnvironment to initialize the state for every scenario and provide API for the clients to use it
TestSessionHTTPMiddleware to keep the state fields up to date
2018-12-19 14:28:38 +13:00
Damian Mooyman
6578f983e3
Merge remote-tracking branch 'origin/2'
# Conflicts:
#	composer.json
2018-06-08 16:05:00 +12:00
Damian Mooyman
e6c9817328
Update 2 branch alias 2018-03-20 15:07:34 +13:00
Daniel Hensby
961069473c
Merge pull request #56 from open-sausages/pulls/2/fix-assets
BUG Prevent assets folder being destroyed on behat tests
2018-03-07 11:40:40 +00:00
Damian Mooyman
2e25beb703
BUG Prevent assets folder being destroyed on behat tests
ENHANCEMENT Shift into vendormodule
2018-03-07 14:34:56 +13:00
Daniel Hensby
eb1ae314ea
Merge pull request #55 from open-sausages/pulls/3/remove-construct-extension
API Remove reference to removed constructExtension() method
2018-01-16 09:52:06 +00:00
Damian Mooyman
c6d843241f
API Remove reference to removed constructExtension() method 2018-01-16 17:29:18 +13:00
Damian Mooyman
933dddcb6f
Update master to framework 5.x compatibility 2017-11-28 13:21:14 +13:00
Damian Mooyman
18694e0b69
Merge branch '2' 2017-11-28 13:20:31 +13:00
Damian Mooyman
2c277b53fb
Update branch alias for 2.x-dev to 2.1.x-dev 2017-11-28 13:20:08 +13:00
Damian Mooyman
5413f9182e
Merge branch '2.0' into 2 2017-11-28 13:19:29 +13:00
Damian Mooyman
3a65d766c7
Remove branch-alias for 2.0 branch 2017-11-28 13:19:02 +13:00
Damian Mooyman
03a1311bef Merge pull request #54 from open-sausages/pulls/2.0/i-am-getenv-us-of-your-progress
Fix update getenv call
2017-10-27 14:50:34 +13:00
Christopher Joe
a523d66402 Fix update getenv call 2017-10-27 14:37:12 +13:00
Loz Calver
b34a4f9081 Merge pull request #53 from dhensby/pulls/yml-syntax
FIX Quote yample starting with %
2017-07-27 10:59:07 +01:00
Daniel Hensby
b18ac73d81
FIX Quote yample starting with % 2017-07-27 10:47:35 +01:00
Chris Joe
2b64499e36 Merge pull request #52 from open-sausages/pulls/4.0/upgrader-tweaks
Upgrade code with upgrader
2017-07-03 16:10:18 +12:00
Damian Mooyman
0374e935e7
Upgrade code with upgrader 2017-07-03 15:09:05 +12:00
Damian Mooyman
62cd6303da Merge pull request #50 from open-sausages/pulls/4.0/update-middleware
API Replace request filter with middleware
2017-06-27 13:31:11 +12:00
Damian Mooyman
3e08c1aad0 API Replace request filter with middleware 2017-06-27 13:00:41 +12:00
Damian Mooyman
81130c7025 Merge pull request #51 from silverstripe/pulls/1/env-in-shined
Fix converted to getenv()
2017-06-27 12:58:16 +12:00
Christopher Joe
a5d1545347 Fix converted to getenv() 2017-06-27 12:22:58 +12:00
Ingo Schommer
787ba1cc67 Merge pull request #49 from open-sausages/pulls/4.0/app-object
[WIP] App object refactor
2017-06-22 23:01:41 +12:00
Damian Mooyman
2868e6bd3e Update references to deprecated global 2017-06-22 15:15:17 +12:00
Damian Mooyman
f5ef9f4fbf API Use new TempDatabase service 2017-06-21 21:04:10 +12:00
Damian Mooyman
1651d5695a
Update testsession for SapphireTest changes 2017-06-13 15:00:32 +12:00
Damian Mooyman
9ec863f917
Fix session accessors 2017-06-12 14:59:20 +12:00
Damian Mooyman
1ab843776d
App object refactor 2017-06-08 18:01:46 +12:00
Daniel Hensby
be78e58ff6 FIX Be less opinionated about test DB name 2017-05-13 10:23:45 +12:00
Damian Mooyman
beda9e158f API Namespace and update for ss 4.0 2017-04-26 15:59:54 +12:00
Damian Mooyman
04fe1e5ee8 Merge pull request #46 from open-sausages/pulls/4.0/6626-remove-jquery-datepicker
Fixed DatetimeField API usage
2017-04-04 10:58:40 +12:00
Ingo Schommer
7982a853e9 Fixed DatetimeField API usage
See https://github.com/silverstripe/silverstripe-framework/issues/6626
2017-04-03 20:20:07 +12:00
Damian Mooyman
8826a70e4d Merge pull request #44 from silverstripe/fix-composer
FIX: Allow pre-release versions of SS4.
2017-02-27 14:38:54 +13:00
Chris Joe
0f06483edd Merge pull request #45 from open-sausages/pulls/4.0/fix-header-blocks
BUG Fix use of duplicate yml header block
2017-02-27 13:30:09 +13:00
Damian Mooyman
7457549131 BUG Fix use of duplicate yml header block 2017-02-27 13:19:19 +13:00
Sam Minnee
74eed2a6d0 FIX: Allow pre-release versions of SS4.
Since SS4 has not yet been released, and this module is used to test
pre-release versions of SS4, we need to have @dev on the requirement
to make it as flexible as possible.

As a general rule, modules that plug *into* SS4 rather than making *use*
of it should have @dev on the end of their dependencies.
2017-02-27 09:08:43 +11:00
Ingo Schommer
9ca529492b Merge pull request #43 from open-sausages/pulls/4.0/i18n-locale
Update to use php-intl instead of zend_date
2017-02-16 10:57:06 +13:00