0
0
Fork 0
mirror of https://github.com/nextcloud/server.git synced 2025-02-12 03:59:16 +00:00
nextcloud_server/build/integration/files_features/checksums.feature
Robin Appelman 957a00b9de chore: remove chunking-v1
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-06-19 16:57:42 +02:00

63 lines
4.1 KiB
Gherkin

# SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
# SPDX-FileCopyrightText: 2016 ownCloud, Inc.
# SPDX-License-Identifier: AGPL-3.0-only
Feature: checksums
Scenario: Uploading a file with checksum should work
Given user "user0" exists
When user "user0" uploads file "data/textfile.txt" to "/myChecksumFile.txt" with checksum "MD5:d70b40f177b14b470d1756a3c12b963a"
Then The webdav response should have a status code "201"
Scenario: Uploading a file with checksum should return the checksum in the propfind
Given user "user0" exists
And user "user0" uploads file "data/textfile.txt" to "/myChecksumFile.txt" with checksum "MD5:d70b40f177b14b470d1756a3c12b963a"
When user "user0" request the checksum of "/myChecksumFile.txt" via propfind
Then The webdav checksum should match "MD5:d70b40f177b14b470d1756a3c12b963a"
Scenario: Uploading a file with checksum should return the checksum in the download header
Given user "user0" exists
And user "user0" uploads file "data/textfile.txt" to "/myChecksumFile.txt" with checksum "MD5:d70b40f177b14b470d1756a3c12b963a"
When user "user0" downloads the file "/myChecksumFile.txt"
Then The header checksum should match "MD5:d70b40f177b14b470d1756a3c12b963a"
Scenario: Moving a file with checksum should return the checksum in the propfind
Given user "user0" exists
And user "user0" uploads file "data/textfile.txt" to "/myChecksumFile.txt" with checksum "MD5:d70b40f177b14b470d1756a3c12b963a"
When User "user0" moved file "/myChecksumFile.txt" to "/myMovedChecksumFile.txt"
And user "user0" request the checksum of "/myMovedChecksumFile.txt" via propfind
Then The webdav checksum should match "MD5:d70b40f177b14b470d1756a3c12b963a"
Scenario: Moving file with checksum should return the checksum in the download header
Given user "user0" exists
And user "user0" uploads file "data/textfile.txt" to "/myChecksumFile.txt" with checksum "MD5:d70b40f177b14b470d1756a3c12b963a"
When User "user0" moved file "/myChecksumFile.txt" to "/myMovedChecksumFile.txt"
And user "user0" downloads the file "/myMovedChecksumFile.txt"
Then The header checksum should match "MD5:d70b40f177b14b470d1756a3c12b963a"
Scenario: Copying a file with checksum should return the checksum in the propfind
Given user "user0" exists
And user "user0" uploads file "data/textfile.txt" to "/myChecksumFile.txt" with checksum "MD5:d70b40f177b14b470d1756a3c12b963a"
When User "user0" copied file "/myChecksumFile.txt" to "/myChecksumFileCopy.txt"
And user "user0" request the checksum of "/myChecksumFileCopy.txt" via propfind
Then The webdav checksum should match "MD5:d70b40f177b14b470d1756a3c12b963a"
Scenario: Copying file with checksum should return the checksum in the download header
Given user "user0" exists
And user "user0" uploads file "data/textfile.txt" to "/myChecksumFile.txt" with checksum "MD5:d70b40f177b14b470d1756a3c12b963a"
When User "user0" copied file "/myChecksumFile.txt" to "/myChecksumFileCopy.txt"
And user "user0" downloads the file "/myChecksumFileCopy.txt"
Then The header checksum should match "MD5:d70b40f177b14b470d1756a3c12b963a"
Scenario: Overwriting a file with checksum should remove the checksum and not return it in the propfind
Given user "user0" exists
And user "user0" uploads file "data/textfile.txt" to "/myChecksumFile.txt" with checksum "MD5:d70b40f177b14b470d1756a3c12b963a"
When user "user0" uploads file "data/textfile.txt" to "/myChecksumFile.txt"
And user "user0" request the checksum of "/myChecksumFile.txt" via propfind
Then The webdav checksum should be empty
Scenario: Overwriting a file with checksum should remove the checksum and not return it in the download header
Given user "user0" exists
And user "user0" uploads file "data/textfile.txt" to "/myChecksumFile.txt" with checksum "MD5:d70b40f177b14b470d1756a3c12b963a"
When user "user0" uploads file "data/textfile.txt" to "/myChecksumFile.txt"
And user "user0" downloads the file "/myChecksumFile.txt"
Then The OC-Checksum header should not be there