summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* authors -> contributors.Siddharth Ravikumar2015-12-227-7/+7
|
* .py files coding set to utf-8.Siddharth Ravikumar2015-12-227-0/+14
|
* Added combox._version module.Siddharth Ravikumar2015-12-211-0/+37
| | | | This module is the canonical place for getting version information.
* Now ComboxDirMonitor uses Lock. Addresses bug#11.Siddharth Ravikumar2015-11-191-18/+18
|
* Updated combox.events.ComboxDirMonitor and combox.events.NodeDirMonitor. See ↵rsiddharth2015-11-081-19/+20
| | | | | | ChangeLog. Changes related to bug#10.
* [bug fix] fix for :b#2:Siddharth Ravikumar2015-09-292-1/+26
| | | | | | | | | Now combox ignores tmp files created by editors. modified: TODO.org modified: combox/events.py modified: tests/events_test.py modified: tests/utils.py
* tests/silo_test: updated test_csilo_noderem test.Siddharth Ravikumar2015-09-121-1/+1
|
* Introduced `node_store_moved_info' method in combox.silo.ComboxSilo class.Siddharth Ravikumar2015-09-121-1/+13
| | | | | | | | This method allows us to track old path and new path of the file which is being renamed/moved. modified: combox/silo.py modified: tests/silo_test.py
* ests.events_test: updated TestEvents's teardown_class method.Siddharth Ravikumar2015-09-061-2/+2
|
* Wrote a fix for Google Drive client behavior for file modification.Siddharth Ravikumar2015-09-061-6/+98
| | | | | | | | | | The unit test that simulates the behavior of Google Drive for file modification runs successfully, but I need to test this fix, with the Google Drive client monitoring a node directory, to confirm if the fix actually works. modified: combox/events.py modified: tests/events_test.py
* added new function file.no_of_shards + tests.Siddharth Ravikumar2015-08-251-0/+30
| | | | | modified: combox/file.py modified: tests/file_test.py
* combox.config: silo directory is expanded to its abs. path when no silo ↵Siddharth Ravikumar2015-08-241-1/+1
| | | | | | | directory is given. modified: combox/config.py modified: tests/utils.py
* Updated combox.events.NodeDirMonitor.housekeep's 're-construct file' ↵Siddharth Ravikumar2015-05-011-0/+30
| | | | | | | | | | | | | | | | | | | | functionality. - Now the housekeep method re-contructs the files, whose shards were created when combox was off, in the combox directory only if all of its shards have made it to the respective node directories. - If it finds only some of all the shards of a file missing, it stores this information in the `file_created' dict inside the silo. - tests.events_tests.TestEvents.test_NDM_housekeep_create tests the 're-construct file' functionality of combox.events.NodeDirMonitor.housekeep method. modified: combox/events.py modified: tests/events_test.py
* Updated combox.events.NodeDirMonitor.housekeep's delete functionality.Siddharth Ravikumar2015-04-301-2/+29
| | | | | | | | | | | | | | | | | | - Now the housekeep method deletes the file in the combox directory only if all of its shards are missing in the respective node directories -- meaning it was deleted on another computer (running combox). - If it finds only some of all the shards of a file missing, it stores this information in the `file_deleted' dict inside the silo. - tests.events_tests.TestEvents.test_NDM_housekeep_delete tests the delete functionality of combox.events.NodeDirMonitor.housekeep method. modified: combox/events.py modified: tests/events_test.py
* combox.silo.ComboxSilo.node_set: added an optional parameter called `num'.Siddharth Ravikumar2015-04-291-0/+15
| | | | | | | - Updated tests as usual. modified: combox/silo.py modified: tests/silo_test.py
* rewrote combox.events.NodeDirMonitor.on_moved method.Siddharth Ravikumar2015-04-221-11/+31
| | | | | | | | | | | | | - Now the node monitor waits for all shards of the file, which was moved/renamed on a remote computer, to get moved/renamed on this computer, before it finally reconstructs the moved/renamed file in the combox directory on this computer. - Updated the tests for on_moved method at tests.events_test.TestEvents.test_NDM_onmoved method. modified: combox/events.py modified: tests/events_test.py
* rewrote combox.events.NodeDirMonitor.on_deleted method.Siddharth Ravikumar2015-04-151-0/+55
| | | | | | | | | | | | | | | | | | | | | - Now the the node monitor waits for all shards of the file, which was deleted on a remote computer, to get deleted on this computer, before it finally deletes the respective file in the combox directory. - Tests for it is at tests.events_test.TestEvents.test_NDM_ondeleted method. modified: combox/events.py modified: tests/events_test.py Did some of this while listening to Cat Stevens' (Yusuf): - Just Another Night - Wild World - Father and son (*) - Peace train - Moonshadow (*)
* rewrote combox.events.NodeDirMonitor.on_modified method.Siddharth Ravikumar2015-04-081-0/+58
| | | | | | | | | | | | | | | | - Now the the node monitor waits for all shards of the file, which was modified on a remote computer, to arrive on this computer, before it re-constructs the file into the respective location in the combox directory. - Tests for it is at tests.events_test.TestEvents.test_NDM_onmodified method. modified: combox/events.py modified: tests/events_test.py Part of this was done while listening to Avril's "Complicated" ; I think this is the only modern Pop song which I like.
* After a file which was created a in a remote computer is reconstructed in ↵Siddharth Ravikumar2015-04-081-1/+6
| | | | | | | this computer, its info is removed from the 'file_created' dictionary in the silo. modified: combox/events.py modified: tests/events_test.py
* new method combox.silo.ComboxSilo.node_remSiddharth Ravikumar2015-04-081-0/+15
| | | | | | | | | | | The method removes information about a file in the category `type_' where `type_' can be 'file_created', 'file_modified', 'file_removed', 'file_moved'. Also wrote tests for it :~( modified: combox/silo.py modified: tests/silo_test.py
* added test file to purge list in tests.events_test.TestEvents.test_NDM_oncreatedSiddharth Ravikumar2015-04-081-0/+3
| | | | modified: tests/events_test.py
* Added test for directory creation in ↵Siddharth Ravikumar2015-04-081-15/+15
| | | | | | tests.events_test.TestEvents.test_NDM_oncreated. modified: tests/events_test.py
* renamed method test_NDM_oncreate -> test_NDM_oncreated in ↵Siddharth Ravikumar2015-04-081-2/+2
| | | | | | tests.event_test.TestEvents. modified: tests/events_test.py
* modded teardown method in tests.events_test.TestEvents.Siddharth Ravikumar2015-04-031-6/+2
| | | | | | the silo is purged using the deldb method instead of doing a os.remove. modfied: tests/events_test.py
* [golden commit]: rewrote combox.events.NodeDirMonitor.on_created method.Siddharth Ravikumar2015-04-011-8/+59
| | | | | | | | | | | | | | | | | | | | | - Now the the node monitor waits for all shards of the file, which was created on a remote computer, to arrive on this computer, before it re-constructs the file into the respective location in the combox directory. - Tests for it is at tests.events_test.TestEvents.test_NDM_oncreate method. - The main test method, tests.events_test.TestEvents.test_NDM, was disabled by renaming it to tests.events_test.TestEvents.test_NDM. - Now the NodeDirMonitor requires passing the 'node monitor lock' when creating an instance of it. :~( modified: combox/events.py modified: tests/events_test.py
* updated combox.file.relative_path.Siddharth Ravikumar2015-04-011-2/+10
| | | | | | | | | This method now returns relative paths w. r. t all node directories. Before it used to return relative paths only w. r. t the first node directory. Also updated the tests for it :~( modified: combox/file.py modified: tests/file_test.py
* new variable at NodeDirMonitor -- `num_nodes'Siddharth Ravikumar2015-04-011-0/+9
| | | | | | | `num_nodes' a value that represents the number of node directories. modified: combox/events.py modified: tests/events_test.py
* renamed dict names in combox.silo.ComboxSilo from shard_* -> file_*Siddharth Ravikumar2015-04-011-51/+51
| | | | | | | | The main zarking reason for the name is that we might also want to track directories apart from shards in the node directories. modified: combox/silo.py modified: tests/silo_test.py
* refactored the way locks work in combox.siloComboxSilo.Siddharth Ravikumar2015-04-012-40/+44
| | | | | | | | modified: combox/cbox.py modified: combox/events.py modified: combox/silo.py modified: tests/events_test.py modified: tests/silo_test.py
* new methods in combox.silo.ComboxSilo -- node_get, node_set. noddicts.Siddharth Ravikumar2015-03-311-0/+110
| | | | | | | | These methods will be used to manage the dictionaries in the db related to the zarking shards. modified: combox/silo.py modified: tests/silo_test.py
* fleshed out combox.events.NodDirMonitor.housekeep method.Siddharth Ravikumar2015-03-261-2/+71
| | | | | | | wrote tests for it too :~( modified: combox/events.py modified: tests/events_test.py
* new function combox.file.node_paths: returns the abs. path of ↵Siddharth Ravikumar2015-03-191-0/+29
| | | | | | | shards/directories in node directories. modified: combox/file.py modified: tests/file_test.py
* In tests, the code that purges the files/directories in `purge_list' is now ↵Siddharth Ravikumar2015-03-193-15/+18
| | | | | | | | a function. modified: tests/events_test.py modified: tests/file_test.py modified: tests/utils.py
* fleshed out the on_move method in combox.events.NodeDirMonitorSiddharth Ravikumar2015-03-181-2/+61
| | | | | | | As usual, wrote correponding tests for it; zarking TDD or whatever :~| modified: combox/events.py modified: tests/events_test.py
* tests/events_test.py: paths in `purge_list' is purged after executing each ↵Siddharth Ravikumar2015-03-181-7/+8
| | | | test method.
* Added `shardp' method to combox.events.NodeDirMonitor + test for it.Siddharth Ravikumar2015-03-131-0/+10
| | | | | modified: combox/events.py modified: tests/events_test.py
* modded combox.file.node_path function.Siddharth Ravikumar2015-03-061-2/+4
| | | | | | | | | | | It has a third argument (boolean) which tells whether `cb_path' (the first argument) is a file or not. Updated the test for node_path function + code wherever node_path was used. modified: combox/events.py modified: combox/file.py modified: tests/file_test.py
* all the sleep calls are 1 sec long in tests.events_testSiddharth Ravikumar2015-03-041-5/+5
|
* fleshed out the on_delete method in combox.events.NodeDirMonitorSiddharth Ravikumar2015-03-041-2/+15
| | | | | | | As usual, wrote correponding tests for it :| modified: combox/events.py modified: tests/events_test.py
* renamed combox.file.rm_dir -> combox.file.rm_pathSiddharth Ravikumar2015-03-041-3/+11
| | | | | | | | rm_path deletes a file or an empty directory. updated the test for it too. modified: tests/file_test.py
* new function combox.file.mk_dirSiddharth Ravikumar2015-03-041-0/+22
| | | | | | | wrote test for it too. modified: combox/file.py modified: tests/file_test.py
* new function combox.file.rm_dirSiddharth Ravikumar2015-03-041-0/+10
| | | | | | | also wrote test for it. modified: combox/file.py modified: tests/file_test.py
* fleshed out the NodeDirMonitor's on_modified method + wrote tests for it.Siddharth Ravikumar2015-02-261-0/+34
| | | | | modified: combox/events.py modified: tests/events_test.py
* updated tests.utils.shardedp - nows additionally checks if shard exists.Siddharth Ravikumar2015-02-261-1/+1
|
* modded combox.file.hash_file function -- added new arg `file_content'Siddharth Ravikumar2015-02-261-2/+4
| | | | | | | | | | - `file_content' is set to None by default - If `file_content' is not None, hash of this is returned. Updated the test for hash_file function. modified: combox/file.py modified: tests/file_test.py
* updated combox.silo.ComboxSilo.stale method - added new arg fhashSiddharth Ravikumar2015-02-261-1/+2
| | | | | | | | - the arg `fhash' is set to None by default. - if `fhash' is not None, it is considered as file's current hash. modified: combox/silo.py modified: tests/silo_test.py
* updated tests.crypto_test.TestCrypto.test_convenience_cryptoSiddharth Ravikumar2015-02-261-1/+5
| | | | | Added code to test the new arg `write' in the decrypt_and_glue function.
* tests/file_test.py: corrected typo in the docstring of test_cbpath method.Siddharth Ravikumar2015-02-251-1/+1
|
* new function combox.file.node_path.Siddharth Ravikumar2015-02-251-0/+19
| | | | | | | | | | | | | This function takes the path to the file in the combox and returns the path of its first shard in the node directory. If the the given argument is a directory (inside the combox directory), the function returns the corresponding path of the directory under the first node directory. Test for the function was also written. modified: combox/file.py modified: tests/file_test.py
* New combox.events.NodeDirMonitor class defined.Siddharth Ravikumar2015-02-201-6/+58
| | | | | | | | | | At the moment only the on_created method of this class is kinda fleshed out. The tests for this class is at tests.events_test.TestEvents.test_NDM modified: combox/events.py modified: tests/events_test.py