Child pages
  • GetFileIDs tests
Skip to end of metadata
Go to start of metadata
Describes the tests needed to validate the GetFileIDs functionality.

Examples of the commands to run has been given. Though please change the file-id for the next release-test, and make sure to use the right checksum to delete with (just md5sum on the file).


Prerequisites: A least 2 different files are present in the collection. 

List all files
  1. Request listing of all files
    1. The existing files in the system should be listed with their size and a count of pillars where the file is present.
      1. bash bin/bitmag.sh get-file-ids -c integrationtest1
List known file
  1. Request listing of a single existing file, see it comes back in the listing with the correct file size and pillar count.
      1. bash bin/bitmag.sh get-file-ids -c integrationtest1 -i DefaultFile
List unknown file
  1. Request listing of a file not in the collection.
    1. An empty list is returned.
      1. bash bin/bitmag.sh get-file-ids -c integrationtest1 -i This_File_Does_Not_Exist_10293847857675684930201
Missing files
  1. Put a new file to a single pillar
      1. bash bin/bitmag.sh put-file -c integrationtest2 -f bin/massupload.sh -i file-ids-test-v1.4-4.1.txt -p kbpillar2
  2. Request listing of all files.
    1. Verify that the new file is present on all pillars and that they agree on its size.
      1. bash bin/bitmag.sh get-file-ids -c integrationtest2 -i file-ids-test-v1.4-4.1.txt
  3. Delete the file on one or more pillars.
      1. bash bin/bitmag.sh delete -c integrationtest2 -i file-ids-test-v1.4-4.1.txt -p kbpillar2 -C 598c634a8d589b44339cdbffcad1ad44
  4. Request listing of all files.
    1. Verify that the pillar count for the file reflects the number of deletions, and that the original set of files is still listed.
      1. bash bin/bitmag.sh get-file-ids -c integrationtest2 -i file-ids-test-v1.4-4.1.txt
  5. Delete the new file on the remaining pillars.
    1. Verify that the all the pillars only list the original files.
      1. bash bin/bitmag.sh delete -c integrationtest2 -i file-ids-test-v1.4-4.1.txt -p checksum2 -C 598c634a8d589b44339cdbffcad1ad44
      2. bash bin/bitmag.sh delete -c integrationtest2 -i file-ids-test-v1.4-4.1.txt -p reference2 -C 598c634a8d589b44339cdbffcad1ad44
      3. bash bin/bitmag.sh delete -c integrationtest2 -i file-ids-test-v1.4-4.1.txt -p sbtape2-C 598c634a8d589b44339cdbffcad1ad44
      4. bash bin/bitmag.sh delete -c integrationtest2 -i file-ids-test-v1.4-4.1.txt -p sbdisk1 -C 598c634a8d589b44339cdbffcad1ad44
      5. bash bin/bitmag.sh get-file-ids -c integrationtest2 -i file-ids-test-v1.4-4.1.txt
Bad arguments
  1. Try getting all file ids from a non-existing collection
    1. Should fail with an error telling the existing collections.
      1. bash bin/bitmag.sh get-file-ids -c integrationtest3
  2. Try getting the file ids from a non-existing pillar
    1. Should fail with an appropriate error containing the existing pillars
      1. bash bin/bitmag.sh get-file-ids -c integrationtest2 -p I_Am_Not_A_Pillar
  3. Try getting a file from a pillar in a different collection
    1. Should fail with an appropriate error containing the existing pillars for the collection
      1. bash bin/bitmag.sh get-file-ids -c netarkiv -p reference2

Open issues

Key P Summary T Created
Loading...
Refresh

  • No labels