Delete tests

Describes the tests needed to validate the Delete functionality.

Basic delete

  • Attempt to delete a existing file on a pillar, supplying a correct checksum.
    • The file should have been removed from the collection. Use the getFileIDs and getChecksums operation to verify the deletion.
bin/bitmag.sh get-file -c integrationtest1 -i abcdefg
bin/bitmag.sh delete-file -c integrationtest1 -p reference2 -i abcdefg -C $(md5sum abcdefg)
bin/bitmag.sh get-file-ids -c integrationtest1 -p reference2 -i abcdefg
  • Attempt to delete the file again.
    • The operation should still return succesfully because of the deleteFile idempotent behavior.
bin/bitmag.sh delete-file -c integrationtest1 -p reference2 -i abcdefg -C $(md5sum abcdefg)
  • Attempt to delete a file in a different collection.
    • The file should have been removed from the collection. Use the getFileIDs and getChecksums operation to verify the deletion.
bin/bitmag.sh delete-file -c integrationtest1 -p sbtape2 -i abcdefg -C $(md5sum abcdefg)
bin/bitmag.sh get-file-ids -c integrationtest1 -p sbtape2 -i abcdefg
bin/bitmag.sh get-checksums -c integrationtest1 -p sbtape2 -i abcdefg

Delete with returned checksum

  • Attempt to delete a existing file on a pillar, requesting the return of a pillar-calculated salted checksum.
    • The file should have been removed from the collection and a checksum should have been returned.
bin/bitmag.sh get-file -c integrationtest1 -i another-one
bin/bitmag.sh delete-file -c integrationtest1 -p kbpillar2 -i another-one -C $(md5sum another-one) -R SHA1 -S 0123abcd
bin/bitmag.sh get-file-ids -c integrationtest1 -p kbpillar2 -i another-one
  • Delete the file on a different pillar, requesting the return of a pillar-calculated salted checksum.
    • Verify that the returned checksums are the same.
bin/bitmag.sh delete-file -c integrationtest1 -p sbdisk1 -i another-one -C $(md5sum another-one) -R SHA1 -S 0123abcd

Bad checksum delete

  • Attempt to delete a existing file on a pillar, supplying an incorrect checksum.
    • The file should have been not have been removed from the collection and the pillar should inform the user that the cause was the incorrect checksum. Use the getFileIDs and getChecksums operation to verify the deletion.
bin/bitmag.sh delete-file -c integrationtest1 -p sbdisk1 -i another-test.yo -C b77a078765e8ea49809e5d7abe5f5d3a
bin/bitmag.sh get-file-ids -c integrationtest1 -p sbdisk1 -i another-test.yo
bin/bitmag.sh get-checksums -c integrationtest1 -p sbdisk1 -i another-test.yo

Open issues

key priority summary type created
Loading...
Refresh