Child pages
  • PutFile tests

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Put a file with including the a request of a salted checksum calculated on the pillar, which should be returned.
    1. Use the request-checksum-algorithm and request-checksum-salt arguments (-R and -S):
      1. bash bin/bitmag.sh put-file -c integrationtest2 -u http://sandkasse-01.kb.dk/dav/test.txt -i putFileTest_3_2015_02_20.txt -C 940a51b250e7aa82d8e8ea31217ff267 -S salt -R HMAC_SHA1
    2. Verify that the checksumpillar does not reply with a checksum.
    3. Verify that the checksumpillar and all the other pillars have the file
      1. bash bin/bitmag.sh get-file-ids -c integrationtest2 -i putFileTest_3_2015_02_20.txt
  2. Put a file with including the a request for checksum, but using both a salt and a non-salt algorithm.
    1. Use the request-checksum-algorithm and request-checksum-salt arguments (-R and -S):
      1. bash bin/bitmag.sh put-file -c integrationtest2 -u http://sandkasse-01.kb.dk/dav/test.txt -i putFileTest_4_2015_08_31.txt -C 940a51b250e7aa82d8e8ea31217ff267 -S salt -R SHA1
    2. Verify that the pillar all deliver the same checksum, and that it is identical to the previously test (where '-R HMAC_SHA1')
  3. Put a file with including the a request for checksum, but using a salt algorithm but not giving a salt.
    1. Use the request-checksum-algorithm and request-checksum-salt arguments (-R and no -S):
      1. bash bin/bitmag.sh put-file -c integrationtest2 -u http://sandkasse-01.kb.dk/dav/test.txt -i putFileTest_5_2015_08_31.txt -C 940a51b250e7aa82d8e8ea31217ff267 -R SHA1
    2. Verify that the pillar all deliver the same checksum, which must be different from the previously two tests.

Error scenarios

  1. Attempt to put a file with an fileID that is already present in the collection (ensure that the file has a different checksum from the already archived)
    1. The putFile request should fail informing the user that a file with the given file ID already exists in the collection.
      1. bash bin/bitmag.sh put-file -c integrationtest2 -f conf/RepositorySettings.xml -i putFileTest_2_2015_02_20.txt

  2. Attempt to put a file which does not exist
    1. Client should fail immediately
      1. bash bin/bitmag.sh put-file -c integrationtest2 -f ThisFileDoesNotExist
  3. Attempt to put a file to a non-existing collection
    1. Client should fail immediately
      1. bash bin/bitmag.sh get-checksums -c integrationtest3 -i putFileTest_5_2015_02_20.txt

  4. Attempt to put a file to a non-existing pillar
    1. Client should fail immediately
      1. bash bin/bitmag.sh get-checksums -c integrationtest1 -i putFileTest_5_2015_02_20.txt -p non-existing-pillar

...