Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: reproduce stored backend truncation bug
When a chunk is filled to exactly chunk_size-1 bytes, another write will ignore the remaining byte and will write to the next chunk. However, the buffer written in this way will lose its last byte. The new test sd.droplet_write_read will provoke this situation and check that data can be re-read correctly.
- Loading branch information
Showing
5 changed files
with
209 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
droplet.profile | ||
bareos-sd.d/device/droplet.conf |
13 changes: 13 additions & 0 deletions
13
core/src/tests/configs/sd_backend/bareos-sd.d/device/droplet.conf.in
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
Device { | ||
Name = droplet | ||
Media Type = S3 | ||
Device Type = droplet | ||
Device Options = "profile=@CMAKE_CURRENT_SOURCE_DIR@/src/tests/configs/sd_backend/droplet.profile,bucket=bareos-test,chunksize=10M" | ||
Maximum Concurrent Jobs = 1 | ||
Archive Device = "Cloud Storage" | ||
LabelMedia = yes | ||
Random Access = yes | ||
Automatic Mount = yes | ||
AlwaysOpen = no | ||
RemovableMedia = no | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
host = localhost:9000 | ||
use_https = false | ||
access_key = minioadmin | ||
secret_key = minioadmin | ||
pricing_dir = "" | ||
aws_auth_sign_version = 4 # Currently, AWS S3 uses version 4. The Ceph S3 gateway uses version 2. | ||
aws_region = eu-central-1 | ||
backend = posix | ||
base_path = @CMAKE_CURRENT_BINARY_DIR@/src/tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters