Skip to content

Commit

Permalink
enable object lock test
Browse files Browse the repository at this point in the history
  • Loading branch information
avantgardnerio committed Nov 27, 2024
1 parent d841037 commit 547ac73
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/object_store.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ jobs:
echo "LOCALSTACK_CONTAINER=$(docker run -d -p 4566:4566 localstack/localstack:3.8.1)" >> $GITHUB_ENV
echo "EC2_METADATA_CONTAINER=$(docker run -d -p 1338:1338 amazon/amazon-ec2-metadata-mock:v1.9.2 --imdsv2)" >> $GITHUB_ENV
aws --endpoint-url=http://localhost:4566 s3 mb s3://test-bucket
aws --endpoint-url=http://localhost:4566 s3api create-bucket --bucket test-object-lock --object-lock-enabled-for-bucket
aws --endpoint-url=http://localhost:4566 dynamodb create-table --table-name test-table --key-schema AttributeName=path,KeyType=HASH AttributeName=etag,KeyType=RANGE --attribute-definitions AttributeName=path,AttributeType=S AttributeName=etag,AttributeType=S --provisioned-throughput ReadCapacityUnits=5,WriteCapacityUnits=5
KMS_KEY=$(aws --endpoint-url=http://localhost:4566 kms create-key --description "test key")
Expand Down
8 changes: 4 additions & 4 deletions object_store/src/aws/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -509,13 +509,11 @@ mod tests {
}

#[tokio::test]
#[ignore]
async fn write_multipart_file_with_signature_object_lock() {
maybe_skip_integration!();

let bucket = "bg-object-lock-test";
let bucket = "test-object-lock";
let store = AmazonS3Builder::from_env()
.with_region("eu-north-1")
.with_bucket_name(bucket)
.with_checksum_algorithm(Checksum::SHA256)
.build()
Expand All @@ -536,7 +534,9 @@ mod tests {
part.await.unwrap();

let res = upload.complete().await.unwrap();
println!("res={res:?}");
assert!(res.e_tag.is_some(), "Should have valid etag");

store.delete(&path).await.unwrap();
}

#[tokio::test]
Expand Down

0 comments on commit 547ac73

Please sign in to comment.