Changeset 510

Show
Ignore:
Timestamp:
05/30/08 12:30:05 (7 months ago)
Author:
jmowery
Message:

incremental update to storage test cases

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/trunk-pmd-intproto/test/storage.tests

    r509 r510  
    33* add 
    44        - add a file 
     5                + copy of the file exists in .__storage__/ with a timestamp appended to the name 
    56        - add a directory 
     7                + the control file .__status__ exists as do the .__nodes__/, .__storage__/, and (if root) .__logs__/ directories exist 
    68        - add a directory recursively 
     9                + as above the control files and directories for the directory exist as does a copy of each file 
    710* remove 
    811        - remove a file 
     12                + all copies of the file in .__storage__/ are gone; the file itself is not 
    913        - remove a directory (always recursive) 
     14                + no control files or directories (see above) exist in the directory or any of its sub-directories 
    1015* check-in 
    1116        - no-op if no modified files 
     17                + no new files exist in .__storage__/ 
    1218        - adds each modified file 
     19                + for each file with an applied time newer than the directory's applied time a new copy exists in .__storage__/ 
    1320        - if directory is locked should raise an exception 
     21                + raises a RuntimeError stating that the file (or directory) is locked 
    1422* lock 
    1523        - lock a file 
     
    6068        - no-op if unmodified or uncontrolled 
    6169        - updates on disk data with all changes made 
    62         - the modified flag should be cleared after all calls 
     70               + the modified flag should be cleared after all calls 
    6371* write 
    6472        - no-op if uncontrolled 
    6573        - write the current status to disk 
    66         - the modified flag should be cleared after all calls 
     74               + the modified flag should be cleared after all calls 
    6775* rollback 
    6876        - no-op if current directory is not controlled 
     
    112120* status_prefix 
    113121        - return status prefix for a file 
     122        - return status prefix for an uncontrolled file 
     123        - return status prefix for current directory 
     124        - return status prefix for a sub-directory 
    114125* version_suffix 
    115126        - return version time(s) for a controlled file or current directory 
    116127        - return empty string for an uncontrolled file or a sub-directory 
    117128* status 
     129        - return status for a file 
     130        - return status for a directory (and its files) 
     131        - return status for a directory recursively 
     132        - raise an exception if file does not exist 
    118133* revisions 
     134        - return empty dictionary for uncontrolled current directory or uncontrolled file 
     135        - return dictionary with name and revisions list for a file 
     136        - return dictionary with name and revisions list for each file in a directory 
    119137* list_controlled_files 
     138        - return list of files under revision control 
     139        - return empty list if current directory is uncontrolled 
    120140* list_local_newer 
     141        - return a list of files with applied times later than the directory 
    121142* list_controlled_dirs 
     143        - return a list of controlled sub-directories 
    122144* list_controlled 
     145        - return a list of all controlled files and directories 
    123146* lock 
     147        - no-op if file or directory is already locked 
     148        - lock a file 
     149        - lock a directory 
     150        - raise an exception if attempting to lock a file in a locked directory 
    124151* unlock 
     152        - no-op if file or directory is not locked 
     153        - unlock a locked file 
     154        - unlock a locked directory 
     155        - raise an exception if attempting to unlock a locked file in a locked directory 
    125156* is_locked 
    126 * add_node 
     157        - return true if file or directory is locked 
     158        - return true if any file under a directory is locked when called recursively 
     159* add_node //NOTE: this is an internal function 
     160        - add a node 
     161                + adds the appropriate file (named by node IP) to a layer's .__nodes__/ directory 
    127162* list_nodes 
     163        - list nodes in a directory 
    128164* get_node 
     165        - get a Node object for a node in the current directory 
    129166* append_log_messages 
     167        - applied a list of messages to the log for a given node 
    130168* get_log_messages 
     169        - get a list of all messages recorded for a single node 
    131170* clear_log 
     171        - clear the list of messages for a single node 
    132172* get_entry 
     173        - get the entry for a controlled file or sub-directory 
     174        - return none for uncontrolled files or sub-directories 
    133175 
    134176Node Class 
    135177 
    136178* creation 
     179        - given an id and the root of storage, return an existing node object 
     180        - given a new id and the root of storage, return a new unclassified node object 
     181        - given a new id and the root of storage and a classification, return a new node classified as requested 
    137182* deletion 
     183        - asserts the deleted node is unmodified since last sync to disk 
    138184* list_layers 
     185        - return an ordered list of the paths of all layers containing the node 
    139186* check_updates 
     187        - return a dictionary of names to be updated and the file to be sent (empty for deletion) 
    140188* write 
     189        - write the data to disk 
    141190* set_file_status 
     191        - set the status of a file sent to a node 
     192        - raise an exception if file does not exist or is uncontrolled 
     193        - raise an exception if attempting to add local customizations to directories other than the local customization directory for that node 
    142194* set_bool_status 
     195        - record the state of a boolean 
    143196* update 
     197        - no-op if unmodified 
     198        - updates on disk data with all changes made 
     199                + the modified flag should be cleared after all calls 
    144200* classify 
     201        - with no argument, calculate the classification of a node 
     202        - with a group name, reclassify the node so that the leaf in the hierarchy is under group's layer