1
0

checksums.feature 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. # SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
  2. # SPDX-FileCopyrightText: 2016 ownCloud, Inc.
  3. # SPDX-License-Identifier: AGPL-3.0-only
  4. Feature: checksums
  5. Scenario: Uploading a file with checksum should work
  6. Given user "user0" exists
  7. When user "user0" uploads file "data/textfile.txt" to "/myChecksumFile.txt" with checksum "MD5:d70b40f177b14b470d1756a3c12b963a"
  8. Then The webdav response should have a status code "201"
  9. Scenario: Uploading a file with checksum should return the checksum in the propfind
  10. Given user "user0" exists
  11. And user "user0" uploads file "data/textfile.txt" to "/myChecksumFile.txt" with checksum "MD5:d70b40f177b14b470d1756a3c12b963a"
  12. When user "user0" request the checksum of "/myChecksumFile.txt" via propfind
  13. Then The webdav checksum should match "MD5:d70b40f177b14b470d1756a3c12b963a"
  14. Scenario: Uploading a file with checksum should return the checksum in the download header
  15. Given user "user0" exists
  16. And user "user0" uploads file "data/textfile.txt" to "/myChecksumFile.txt" with checksum "MD5:d70b40f177b14b470d1756a3c12b963a"
  17. When user "user0" downloads the file "/myChecksumFile.txt"
  18. Then The header checksum should match "MD5:d70b40f177b14b470d1756a3c12b963a"
  19. Scenario: Moving a file with checksum should return the checksum in the propfind
  20. Given user "user0" exists
  21. And user "user0" uploads file "data/textfile.txt" to "/myChecksumFile.txt" with checksum "MD5:d70b40f177b14b470d1756a3c12b963a"
  22. When User "user0" moved file "/myChecksumFile.txt" to "/myMovedChecksumFile.txt"
  23. And user "user0" request the checksum of "/myMovedChecksumFile.txt" via propfind
  24. Then The webdav checksum should match "MD5:d70b40f177b14b470d1756a3c12b963a"
  25. Scenario: Moving file with checksum should return the checksum in the download header
  26. Given user "user0" exists
  27. And user "user0" uploads file "data/textfile.txt" to "/myChecksumFile.txt" with checksum "MD5:d70b40f177b14b470d1756a3c12b963a"
  28. When User "user0" moved file "/myChecksumFile.txt" to "/myMovedChecksumFile.txt"
  29. And user "user0" downloads the file "/myMovedChecksumFile.txt"
  30. Then The header checksum should match "MD5:d70b40f177b14b470d1756a3c12b963a"
  31. Scenario: Copying a file with checksum should return the checksum in the propfind
  32. Given user "user0" exists
  33. And user "user0" uploads file "data/textfile.txt" to "/myChecksumFile.txt" with checksum "MD5:d70b40f177b14b470d1756a3c12b963a"
  34. When User "user0" copied file "/myChecksumFile.txt" to "/myChecksumFileCopy.txt"
  35. And user "user0" request the checksum of "/myChecksumFileCopy.txt" via propfind
  36. Then The webdav checksum should match "MD5:d70b40f177b14b470d1756a3c12b963a"
  37. Scenario: Copying file with checksum should return the checksum in the download header
  38. Given user "user0" exists
  39. And user "user0" uploads file "data/textfile.txt" to "/myChecksumFile.txt" with checksum "MD5:d70b40f177b14b470d1756a3c12b963a"
  40. When User "user0" copied file "/myChecksumFile.txt" to "/myChecksumFileCopy.txt"
  41. And user "user0" downloads the file "/myChecksumFileCopy.txt"
  42. Then The header checksum should match "MD5:d70b40f177b14b470d1756a3c12b963a"
  43. Scenario: Overwriting a file with checksum should remove the checksum and not return it in the propfind
  44. Given user "user0" exists
  45. And user "user0" uploads file "data/textfile.txt" to "/myChecksumFile.txt" with checksum "MD5:d70b40f177b14b470d1756a3c12b963a"
  46. When user "user0" uploads file "data/textfile.txt" to "/myChecksumFile.txt"
  47. And user "user0" request the checksum of "/myChecksumFile.txt" via propfind
  48. Then The webdav checksum should be empty
  49. Scenario: Overwriting a file with checksum should remove the checksum and not return it in the download header
  50. Given user "user0" exists
  51. And user "user0" uploads file "data/textfile.txt" to "/myChecksumFile.txt" with checksum "MD5:d70b40f177b14b470d1756a3c12b963a"
  52. When user "user0" uploads file "data/textfile.txt" to "/myChecksumFile.txt"
  53. And user "user0" downloads the file "/myChecksumFile.txt"
  54. Then The OC-Checksum header should not be there