Commit Graph

20 Commits

Author SHA1 Message Date
Marius 6de723ec8b core: Do not emit post-receive hook when the offset didn't change 2019-05-15 23:57:32 +02:00
Adam Jensen 750d4d5eb6 Specify MaxSize in PATCH tests that refer to it 2018-06-03 16:03:28 -04:00
Adam Jensen 0976863947 Add DeclareLength tests for PATCH requests 2018-06-03 12:57:40 -04:00
Marius c470fe3a9d Emit post-finish event for empty uploads
See https://github.com/tus/tus-js-client/issues/106
2018-03-29 14:40:43 +02:00
Marius 45a9278c74 Include channel testing in goroutine fore NotifyUploadProgress test 2017-02-21 23:33:59 +01:00
Marius 68b6b20688 Add test for NotifiyUploadProgress 2017-02-21 23:00:51 +01:00
Marius 0c0bc01432 Add tests for various invalid header values 2016-10-13 19:03:18 +02:00
Marius 3b3e3bcef0 Add test for FinisherDataStore 2016-10-13 18:18:18 +02:00
Marius c2bb17b947 Refactor remaining tests to subtest style 2016-10-13 18:08:34 +02:00
Marius 4e8842d91c Do not pass chunk for uploaded uploads to data store 2016-04-09 22:09:22 +02:00
Marius af0c1bf4ca Add test for complete upload notifications 2016-03-12 22:44:54 +01:00
Marius 0e750291c9 Use assertions library for tests 2016-01-20 16:40:19 +01:00
Marius f6a5530df8 Integrate LockingStore into UnroutedHandler
The reason behind this drastic move was that sometimes a lock needs to
persist across multiple calls to a DataStore. For example, when a PATCH
request is received, following behaviour is wanted:
	* Obtain lock (LockUpload)
	* Get offset, size etc (GetInfo)
	* Write data (WriteChunk)
	* Release lock (UnlockUpload)
However, before this change, the lock would be release and then obtained again
after the GetInfo and before the WriteChunk call. This resulted in an
inefficient resource usage and even a possible race condition.

The effects of this change was:
* FileLocker is now directly integrated into FileStore and not sperarated
* LockingStore and the entire package has been removed
* MemoryLocker has been moved into its very own package
2015-12-26 21:23:09 +01:00
Marius cfabbf5ffb Extract tests into tusd_test package 2015-12-25 22:33:27 +01:00
Max Brosnahan 98d8c939c2 Remove race in patch test 2015-11-10 22:16:01 -07:00
Naren Venkataraman 7898128700 Fix tests 2015-11-04 04:56:32 -05:00
Acconut 290fea5dac return new offset after successful PATCH request 2015-03-23 19:02:12 +01:00
Acconut 46fabad314 update header names 2015-03-23 18:15:05 +01:00
Acconut 2b66ccfd56 refactor tests using httpTest 2015-02-17 15:44:12 +01:00
Acconut 38794a4cf9 split handler test into multiple files 2015-02-09 19:37:06 +01:00