Versions Compared

Key

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

...

  1. Put a file to all pillars
    •  

      Run put command on a file which is not present in the collection. One can ensure that the file does not exist in the collection by running "bash bin/bitmag.sh get-file -c integrationtest2 -i logback.xml".This command should return a response similar to :

      Code Block
      Failure: c2432066: GET_FILE for file logback.xml: FAILED: , Unable to continue operation, contributors unavailable.


      1. bash bin/bitmag.sh put-file -c integrationtest2 -f conf/logback.xml
    •   Verify that it is now present at all pillars, and that it has the same checksum at all pillars
      1. bash bin/bitmag.sh get-file-ids -c integrationtest2 -i logback.xml
      2. bash bin/bitmag.sh get-checksums -c integrationtest2 -i logback.xml
  2. Put a file with a different file-id to all pillars
    •  Run put command on a file and use the file-id parameter (-i)
      1. bash bin/bitmag.sh put-file -c integrationtest2 -f conf/logback.xml -i putFileTest_2022_03_09
    •  Verify that it is now present at all pillars, and that it has the same checksum at all pillars
      1. bash bin/bitmag.sh get-file-ids -c integrationtest2 -i putFileTest_2022_03_09
      2. bash bin/bitmag.sh get-checksums -c integrationtest2 -i putFileTest_2022_03_09
  3. Put a file by using an URL
    •  Use the URL and Checksum to put a file, already on the webdav server.
      1. bash bin/bitmag.sh put-file -c integrationtest2 -u http://sandkasse-01.kb.dk/dav/test.txt -i putFileTest_2_2022_03_09.txt -C d41d8cd98f00b204e9800998ecf8427e
    •  Verify that it is now present at all pillars, with the requested checksum
      1. bash bin/bitmag.sh get-file-ids -c integrationtest2 -i putFileTest_2_2022_03_09.txt
      2. bash bin/bitmag.sh get-checksums -c integrationtest2 -i putFileTest_2_2022_03_09.txt

Idempotent test

  1. Attempt to put a file with an fileID that is already present in the collection suppling the same checksum
    •  The putFile request should succeed.
      1. bash bin/bitmag.sh put-file -c integrationtest2 -f conf/logback.xml

Put with returned checksums

  1. Put a file including a request of a salted checksum calculated on the pillar, which should be returned.
    •  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_2022_03_09.txt -C d41d8cd98f00b204e9800998ecf8427e -S salt -R HMAC_SHA1
    •  Verify that the checksumpillar does not reply with a checksum.
    •  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_2022_03_09.txt
  2. Put a file including a request for checksum, but using both a salt and a non-salt algorithm.
    •  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_2022_03_09.txt -C d41d8cd98f00b204e9800998ecf8427e -S salt -R SHA1
    •  Verify that all the data pillars return the same checksum, and that it is identical to the previous test (where '-R HMAC_SHA1')
  3. Put a file including a request for checksum, but using a salt algorithm but not giving a salt.
    •  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_4_2022_03_09.txt -C d41d8cd98f00b204e9800998ecf8427e -R SHA1
    •  Verify that the data pillars all deliver the same checksum, which must be different from the checksum in the previous 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)
    •  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_2022_03_09.txt

      2. The response should be something similar to "Failure: d6ef5b26: PUT_FILE for file putFileTest_2_2022_03_09.txt: FAILED: , Can not put file putFileTest_2_2022_03_09.txt, as an different file already exists on pillar ..."

  2. Attempt to put a file which does not exist
    •  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
    •  Client should fail immediately
      1. bash bin/bitmag.sh put-file -c integrationtest3 -i putFileTest_5_2022_03_09.txt

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


Children Display
excerpttrue
excerptTypesimple

...