Skip to content

Commit

Permalink
Issue #3753: add test cases to check that 0 size files aren't taken f…
Browse files Browse the repository at this point in the history
…or transit
  • Loading branch information
SilinPavel committed Oct 25, 2024
1 parent c43d314 commit f1d5fa3
Show file tree
Hide file tree
Showing 2 changed files with 135 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"cloud": {
"storages": [
{
"storageProvider": "S3",
"storage": "cp-lifecycle-storage-policy-test-storage",
"files": [
{"key": "data/file1.txt", "creationDateShift": 11, "storageClass": "STANDARD", "size": 0}
]
}
]
},
"platform": {
"storages": [
{
"id": 1,
"storageProvider": "S3",
"storage": "cp-lifecycle-storage-policy-test-storage",
"rules": [
{
"id": 1,
"datastorageId": 1,
"pathGlob": "/data",
"objectGlob": "*.txt",
"transitionMethod": "LATEST_FILE",
"transitionCriterion": {
"type": "DEFAULT"
},
"transitions": [
{
"transitionDate": 10,
"storageClass": "GLACIER"
}
]
}
]
}
]
},
"result": {
"cloud": {
"storages": [
{
"storage": "cp-lifecycle-storage-policy-test-storage",
"storageProvider": "S3",
"files": [
{"key": "data/file1.txt"}
]
}
]
},
"platform": {
"storages": []
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
{
"cloud": {
"storages": [
{
"storageProvider": "S3",
"storage": "cp-lifecycle-storage-policy-test-storage",
"files": [
{"key": "data/file1.txt", "creationDateShift": 11, "storageClass": "STANDARD", "size": 0},
{"key": "data/file2.txt", "creationDateShift": 11, "storageClass": "GLACIER", "size": 262144}
]
}
]
},
"platform": {
"storages": [
{
"id": 1,
"storageProvider": "S3",
"storage": "cp-lifecycle-storage-policy-test-storage",
"rules": [
{
"id": 1,
"datastorageId": 1,
"pathGlob": "/data",
"objectGlob": "*.txt",
"transitionMethod": "LATEST_FILE",
"transitionCriterion": {
"type": "DEFAULT"
},
"transitions": [
{
"transitionDate": 10,
"storageClass": "GLACIER"
}
]
}
],
"executions": [
{
"ruleId": 1,
"path": "/data",
"status": "RUNNING",
"storageClass": "GLACIER"
}
]
}
]
},
"result": {
"cloud": {
"storages": [
{
"storage": "cp-lifecycle-storage-policy-test-storage",
"storageProvider": "S3",
"files": [
{"key": "data/file1.txt"},
{"key": "data/file2.txt"}
]
}
]
},
"platform": {
"storages": [
{
"id": 1,
"storage": "cp-lifecycle-storage-policy-test-storage",
"executions": [
{
"ruleId": 1,
"path": "/data",
"status": "SUCCESS",
"storageClass": "GLACIER"
}
]
}
]
}
}
}

0 comments on commit f1d5fa3

Please sign in to comment.