Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.TestInstance;
import org.opentest4j.AssertionFailedError;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down Expand Up @@ -166,8 +165,8 @@ public void testNonexistentBucket() {
// And run the tests given the non-existent bucket
runOperationsThatShouldFail("testNonexistentBucket", bucketClient);
if (!GCP_PROVIDER_ID.equals(harness.getProviderId())) {
runOperationsThatShouldNotFail("testNonexistentBucket", bucketClient);
}
runOperationsThatShouldNotFail("testNonexistentBucket", bucketClient);
}
}

@Test
Expand All @@ -180,8 +179,8 @@ public void testInvalidCredentials() {
// And run the tests given the invalid credentialsOverrider
runOperationsThatShouldFail("testInvalidCredentials", bucketClient);
if (!GCP_PROVIDER_ID.equals(harness.getProviderId())) {
runOperationsThatShouldNotFail("testInvalidCredentials", bucketClient);
}
runOperationsThatShouldNotFail("testInvalidCredentials", bucketClient);
}
Comment on lines +182 to +183
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit:tabs added by AI?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The initial spacing was misplaced. The alignment is correct now.

}

private void runOperationsThatShouldFail(String testName, BucketClient bucketClient) {
Expand Down Expand Up @@ -891,7 +890,6 @@ public TestConfig(String testName, Collection<String> keysToCreate, Collection<S

@Test
public void testVersionedDelete_fileDoesNotExist() throws IOException {

// Create the BucketClient
AbstractBlobStore blobStore = harness.createBlobStore(true, true, true);
BucketClient bucketClient = new BucketClient(blobStore);
Expand Down Expand Up @@ -1376,8 +1374,6 @@ public void testCopyFrom() throws IOException {

@Test
public void testVersionedCopyFrom() throws IOException {
Assumptions.assumeFalse(GCP_PROVIDER_ID.equals(harness.getProviderId()));

String key = "conformance-tests/versionedCopyFrom/blob";
String destKeyV1 = "conformance-tests/versionedCopyFrom/copied-from-blob-v1";
String destKeyV2 = "conformance-tests/versionedCopyFrom/copied-from-blob-v2";
Expand Down Expand Up @@ -2757,22 +2753,19 @@ private void safeDeleteBlobs(BucketClient bucketClient, String... keys){

@Test
public void testUploadWithKmsKey_happyPath() {
Assumptions.assumeFalse(GCP_PROVIDER_ID.equals(harness.getProviderId()));
String key = "conformance-tests/kms/upload-happy-path";
String kmsKeyId = harness.getKmsKeyId();
runUploadWithKmsKeyTest(key, kmsKeyId, "Test data with KMS encryption".getBytes());
}

@Test
public void testUploadWithKmsKey_nullKmsKeyId() {
Assumptions.assumeFalse(GCP_PROVIDER_ID.equals(harness.getProviderId()));
String key = "conformance-tests/kms/upload-null-key";
runUploadWithKmsKeyTest(key, null, "Test data without KMS".getBytes());
}

@Test
public void testUploadWithKmsKey_emptyKmsKeyId() {
Assumptions.assumeFalse(GCP_PROVIDER_ID.equals(harness.getProviderId()));
String key = "conformance-tests/kms/upload-empty-key";
runUploadWithKmsKeyTest(key, "", "Test data with empty KMS key".getBytes());
}
Expand Down Expand Up @@ -2815,7 +2808,6 @@ private void runUploadWithKmsKeyTest(String key, String kmsKeyId, byte[] content

@Test
public void testDownloadWithKmsKey() throws IOException {
Assumptions.assumeFalse(GCP_PROVIDER_ID.equals(harness.getProviderId()));
String key = "conformance-tests/kms/download-happy-path";
String kmsKeyId = harness.getKmsKeyId();
byte[] content = "Test data for KMS download".getBytes(StandardCharsets.UTF_8);
Expand Down Expand Up @@ -2853,7 +2845,6 @@ public void testDownloadWithKmsKey() throws IOException {

@Test
public void testRangedReadWithKmsKey() throws IOException {
Assumptions.assumeFalse(GCP_PROVIDER_ID.equals(harness.getProviderId()));
String key = "conformance-tests/kms/ranged-read";
String kmsKeyId = harness.getKmsKeyId();
runRangedReadWithKmsKeyTest(key, kmsKeyId);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"id" : "36e520d9-fdd5-4fe4-b04a-413f48446f06",
"id" : "487a9983-921c-4619-87f2-c8a8fa751ead",
"name" : "storage_v1_b_substrate-sdk-gcp-poc1-test-bucket-versioned_o_versioned-blob-that-doesnt-exist",
"request" : {
"url" : "/storage/v1/b/substrate-sdk-gcp-poc1-test-bucket-versioned/o/versioned-blob-that-doesnt-exist",
Expand All @@ -12,15 +12,15 @@
"Alt-Svc" : "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000",
"Server" : "UploadServer",
"Cache-Control" : "no-cache, no-store, max-age=0, must-revalidate",
"X-GUploader-UploadID" : "AHVrFxO7GEA4d8Btm3WLp1WeWoDizXKfF1MdFs5M7piZYLzlIbAHHe96IhAbggtm2ieWWLykaECrZdw",
"X-GUploader-UploadID" : "AHVrFxNpny-e3MHGHE0Ok-j1YSnGfW30FsEUvmXxdHuXd6QxmkVY8u0xfcIaSrbfwhSBdZp2",
"Vary" : [ "Origin", "X-Origin" ],
"Pragma" : "no-cache",
"Expires" : "Mon, 01 Jan 1990 00:00:00 GMT",
"Date" : "Fri, 19 Dec 2025 20:37:33 GMT",
"Date" : "Fri, 09 Jan 2026 19:17:52 GMT",
"Content-Type" : "application/json; charset=UTF-8"
}
},
"uuid" : "36e520d9-fdd5-4fe4-b04a-413f48446f06",
"uuid" : "487a9983-921c-4619-87f2-c8a8fa751ead",
"persistent" : true,
"insertionIndex" : 358
"insertionIndex" : 938
}
25 changes: 25 additions & 0 deletions blob/blob-gcp/src/test/resources/mappings/delete-1ookeamms6.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"id" : "60844984-a8b9-4cd4-b418-45c1586b26bd",
"name" : "storage_v1_b_substrate-sdk-gcp-poc1-test-bucket_o_conformance-tests_kms_upload-null-key",
"request" : {
"url" : "/storage/v1/b/substrate-sdk-gcp-poc1-test-bucket/o/conformance-tests%2Fkms%2Fupload-null-key",
"method" : "DELETE"
},
"response" : {
"status" : 204,
"headers" : {
"Alt-Svc" : "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000",
"Server" : "UploadServer",
"Cache-Control" : "no-cache, no-store, max-age=0, must-revalidate",
"X-GUploader-UploadID" : "AJRbA5XDGRbsVADVmgfZ3LX79tR5merQ4YeK7o0juDNjaBe6nwqTJP5SIO_HfUpiC7Tj0xaq0i481isJTCw1Lg",
"Vary" : [ "Origin", "X-Origin" ],
"Pragma" : "no-cache",
"Expires" : "Mon, 01 Jan 1990 00:00:00 GMT",
"Date" : "Fri, 09 Jan 2026 19:04:11 GMT",
"Content-Type" : "application/json"
}
},
"uuid" : "60844984-a8b9-4cd4-b418-45c1586b26bd",
"persistent" : true,
"insertionIndex" : 883
}
25 changes: 25 additions & 0 deletions blob/blob-gcp/src/test/resources/mappings/delete-dydbks1dx8.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"id" : "5a815df1-7f73-4f51-8333-357ddd5e79fd",
"name" : "storage_v1_b_substrate-sdk-gcp-poc1-test-bucket_o_conformance-tests_kms_download-happy-path",
"request" : {
"url" : "/storage/v1/b/substrate-sdk-gcp-poc1-test-bucket/o/conformance-tests%2Fkms%2Fdownload-happy-path",
"method" : "DELETE"
},
"response" : {
"status" : 204,
"headers" : {
"Alt-Svc" : "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000",
"Server" : "UploadServer",
"Cache-Control" : "no-cache, no-store, max-age=0, must-revalidate",
"X-GUploader-UploadID" : "AJRbA5VZdhBqKz2ZskADIK4a3yifJaLI2OmjFZd3vUpz-vocp5uWk9Lue3exUm4ZqRI6n0fCotkujr6XGUX5BQ",
"Vary" : [ "Origin", "X-Origin" ],
"Pragma" : "no-cache",
"Expires" : "Mon, 01 Jan 1990 00:00:00 GMT",
"Date" : "Fri, 09 Jan 2026 19:03:33 GMT",
"Content-Type" : "application/json"
}
},
"uuid" : "5a815df1-7f73-4f51-8333-357ddd5e79fd",
"persistent" : true,
"insertionIndex" : 862
}
25 changes: 25 additions & 0 deletions blob/blob-gcp/src/test/resources/mappings/delete-ngovkwn7lw.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"id" : "8428bc86-256f-4221-a089-2d0d144bf523",
"name" : "storage_v1_b_substrate-sdk-gcp-poc1-test-bucket-versioned_o_conformance-tests_versionedcopyfrom_copied-from-blob-latest",
"request" : {
"url" : "/storage/v1/b/substrate-sdk-gcp-poc1-test-bucket-versioned/o/conformance-tests%2FversionedCopyFrom%2Fcopied-from-blob-latest",
"method" : "DELETE"
},
"response" : {
"status" : 204,
"headers" : {
"Alt-Svc" : "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000",
"Server" : "UploadServer",
"Cache-Control" : "no-cache, no-store, max-age=0, must-revalidate",
"X-GUploader-UploadID" : "AJRbA5XPfu7yGZ6KjqyD7U82MBa-b5Cu-iAaEpagYlKBLrvpa0vlkSucsEYn_lMEbfLs0Fh6_z1oLQEJl1RocQ",
"Vary" : [ "Origin", "X-Origin" ],
"Pragma" : "no-cache",
"Expires" : "Mon, 01 Jan 1990 00:00:00 GMT",
"Date" : "Fri, 09 Jan 2026 19:04:44 GMT",
"Content-Type" : "application/json"
}
},
"uuid" : "8428bc86-256f-4221-a089-2d0d144bf523",
"persistent" : true,
"insertionIndex" : 903
}
25 changes: 25 additions & 0 deletions blob/blob-gcp/src/test/resources/mappings/delete-plk6u8nyll.json
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already have many recorded files under the GCP conformance tests. Could you please confirm that this PR does not introduce any duplicate record files?

Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"id" : "3d03e1e3-6e02-4d8e-aa5e-8621e48c12cf",
"name" : "storage_v1_b_substrate-sdk-gcp-poc1-test-bucket_o_conformance-tests_kms_upload-empty-key",
"request" : {
"url" : "/storage/v1/b/substrate-sdk-gcp-poc1-test-bucket/o/conformance-tests%2Fkms%2Fupload-empty-key",
"method" : "DELETE"
},
"response" : {
"status" : 204,
"headers" : {
"Alt-Svc" : "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000",
"Server" : "UploadServer",
"Cache-Control" : "no-cache, no-store, max-age=0, must-revalidate",
"X-GUploader-UploadID" : "AJRbA5W0aUjdlHaaLeivQH5wc9vQJHUmZ170AZIcVsveK_2H75VS6dTOp_1WUmVkS0v6UmjYEPlgOOx0WO2JxA",
"Vary" : [ "Origin", "X-Origin" ],
"Pragma" : "no-cache",
"Expires" : "Mon, 01 Jan 1990 00:00:00 GMT",
"Date" : "Fri, 09 Jan 2026 19:03:58 GMT",
"Content-Type" : "application/json"
}
},
"uuid" : "3d03e1e3-6e02-4d8e-aa5e-8621e48c12cf",
"persistent" : true,
"insertionIndex" : 876
}
25 changes: 25 additions & 0 deletions blob/blob-gcp/src/test/resources/mappings/delete-pv3t8yvtah.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"id" : "b6ce25a4-e32f-49a2-92c5-cc2d1c942583",
"name" : "storage_v1_b_substrate-sdk-gcp-poc1-test-bucket-versioned_o_conformance-tests_versionedcopyfrom_blob",
"request" : {
"url" : "/storage/v1/b/substrate-sdk-gcp-poc1-test-bucket-versioned/o/conformance-tests%2FversionedCopyFrom%2Fblob",
"method" : "DELETE"
},
"response" : {
"status" : 204,
"headers" : {
"Alt-Svc" : "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000",
"Server" : "UploadServer",
"Cache-Control" : "no-cache, no-store, max-age=0, must-revalidate",
"X-GUploader-UploadID" : "AJRbA5V8f5ofBq1TrurQk7HXZOvA30derlkCbuOBBp32Ps_Azepsnct1SjhHKX30QVavWX3kJ4HG9FL-rSV8xw",
"Vary" : [ "Origin", "X-Origin" ],
"Pragma" : "no-cache",
"Expires" : "Mon, 01 Jan 1990 00:00:00 GMT",
"Date" : "Fri, 09 Jan 2026 19:04:42 GMT",
"Content-Type" : "application/json"
}
},
"uuid" : "b6ce25a4-e32f-49a2-92c5-cc2d1c942583",
"persistent" : true,
"insertionIndex" : 909
}
25 changes: 25 additions & 0 deletions blob/blob-gcp/src/test/resources/mappings/delete-ruz2mzvi6f.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"id" : "8a518ad3-a57d-4845-b5d7-f70358c77ef4",
"name" : "storage_v1_b_substrate-sdk-gcp-poc1-test-bucket_o_conformance-tests_kms_ranged-read",
"request" : {
"url" : "/storage/v1/b/substrate-sdk-gcp-poc1-test-bucket/o/conformance-tests%2Fkms%2Franged-read",
"method" : "DELETE"
},
"response" : {
"status" : 204,
"headers" : {
"Alt-Svc" : "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000",
"Server" : "UploadServer",
"Cache-Control" : "no-cache, no-store, max-age=0, must-revalidate",
"X-GUploader-UploadID" : "AJRbA5XGxixGwDKKvDYbFMAXDbop1ZFB1pW7PfUSUi3dfaoFku1uO7WVWht-z671VWXcl0rgluRUHZ2cqoe7ng",
"Vary" : [ "Origin", "X-Origin" ],
"Pragma" : "no-cache",
"Expires" : "Mon, 01 Jan 1990 00:00:00 GMT",
"Date" : "Fri, 09 Jan 2026 19:04:25 GMT",
"Content-Type" : "application/json"
}
},
"uuid" : "8a518ad3-a57d-4845-b5d7-f70358c77ef4",
"persistent" : true,
"insertionIndex" : 890
}
25 changes: 25 additions & 0 deletions blob/blob-gcp/src/test/resources/mappings/delete-ryspouorvf.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"id" : "435ba288-36a7-4dbc-8532-5058753522ad",
"name" : "storage_v1_b_substrate-sdk-gcp-poc1-test-bucket-versioned_o_conformance-tests_versionedcopyfrom_copied-from-blob-v2",
"request" : {
"url" : "/storage/v1/b/substrate-sdk-gcp-poc1-test-bucket-versioned/o/conformance-tests%2FversionedCopyFrom%2Fcopied-from-blob-v2",
"method" : "DELETE"
},
"response" : {
"status" : 204,
"headers" : {
"Alt-Svc" : "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000",
"Server" : "UploadServer",
"Cache-Control" : "no-cache, no-store, max-age=0, must-revalidate",
"X-GUploader-UploadID" : "AJRbA5U9_ApqWN_OL8E7M92Q9gI5mQh5DmUU6Vy9W1yErEAGrDGuh1NfVN8Ml-n1OhaOfXOLFuEn7LdJ9qWBZQ",
"Vary" : [ "Origin", "X-Origin" ],
"Pragma" : "no-cache",
"Expires" : "Mon, 01 Jan 1990 00:00:00 GMT",
"Date" : "Fri, 09 Jan 2026 19:04:44 GMT",
"Content-Type" : "application/json"
}
},
"uuid" : "435ba288-36a7-4dbc-8532-5058753522ad",
"persistent" : true,
"insertionIndex" : 905
}
25 changes: 25 additions & 0 deletions blob/blob-gcp/src/test/resources/mappings/delete-ticxglrao1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"id" : "af2a76de-9dab-4d0c-8505-893aa1d218b7",
"name" : "storage_v1_b_substrate-sdk-gcp-poc1-test-bucket-versioned_o_conformance-tests_versionedcopyfrom_copied-from-blob-v1",
"request" : {
"url" : "/storage/v1/b/substrate-sdk-gcp-poc1-test-bucket-versioned/o/conformance-tests%2FversionedCopyFrom%2Fcopied-from-blob-v1",
"method" : "DELETE"
},
"response" : {
"status" : 204,
"headers" : {
"Alt-Svc" : "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000",
"Server" : "UploadServer",
"Cache-Control" : "no-cache, no-store, max-age=0, must-revalidate",
"X-GUploader-UploadID" : "AJRbA5V-gcsPwikL4YSS1MFJYVW0ZuusXdhYgWs2EFzBmE7tv5pSs9LIlO7gKVja4DyLDUqSKsoBbveq6saCsg",
"Vary" : [ "Origin", "X-Origin" ],
"Pragma" : "no-cache",
"Expires" : "Mon, 01 Jan 1990 00:00:00 GMT",
"Date" : "Fri, 09 Jan 2026 19:04:43 GMT",
"Content-Type" : "application/json"
}
},
"uuid" : "af2a76de-9dab-4d0c-8505-893aa1d218b7",
"persistent" : true,
"insertionIndex" : 907
}
25 changes: 25 additions & 0 deletions blob/blob-gcp/src/test/resources/mappings/delete-yfdfg2waje.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"id" : "b1ea5cfc-67c6-4b38-beef-140532a19b3c",
"name" : "storage_v1_b_substrate-sdk-gcp-poc1-test-bucket_o_conformance-tests_kms_upload-happy-path",
"request" : {
"url" : "/storage/v1/b/substrate-sdk-gcp-poc1-test-bucket/o/conformance-tests%2Fkms%2Fupload-happy-path",
"method" : "DELETE"
},
"response" : {
"status" : 204,
"headers" : {
"Alt-Svc" : "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000",
"Server" : "UploadServer",
"Cache-Control" : "no-cache, no-store, max-age=0, must-revalidate",
"X-GUploader-UploadID" : "AJRbA5Wugfrt--N6yUyq59z-CSYC1DLTxSaI8wKN0guCh9wapsQszGwBUjYwGRhndOv9yfhxpgW8hDzgCA5EIA",
"Vary" : [ "Origin", "X-Origin" ],
"Pragma" : "no-cache",
"Expires" : "Mon, 01 Jan 1990 00:00:00 GMT",
"Date" : "Fri, 09 Jan 2026 19:03:46 GMT",
"Content-Type" : "application/json"
}
},
"uuid" : "b1ea5cfc-67c6-4b38-beef-140532a19b3c",
"persistent" : true,
"insertionIndex" : 869
}
26 changes: 26 additions & 0 deletions blob/blob-gcp/src/test/resources/mappings/get-0phbluaocy.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"id" : "226e4b3c-8aba-4e3a-8857-506a4d948ae0",
"name" : "storage_v1_b_substrate-sdk-gcp-poc1-test-bucket",
"request" : {
"url" : "/storage/v1/b/substrate-sdk-gcp-poc1-test-bucket?projection=full",
"method" : "GET"
},
"response" : {
"status" : 200,
"body" : "{\n \"kind\": \"storage#bucket\",\n \"selfLink\": \"https://www.googleapis.com/storage/v1/b/substrate-sdk-gcp-poc1-test-bucket\",\n \"id\": \"substrate-sdk-gcp-poc1-test-bucket\",\n \"name\": \"substrate-sdk-gcp-poc1-test-bucket\",\n \"projectNumber\": \"599653580068\",\n \"generation\": \"1758831398412595155\",\n \"metageneration\": \"1\",\n \"location\": \"US\",\n \"storageClass\": \"STANDARD\",\n \"etag\": \"CAE=\",\n \"timeCreated\": \"2025-09-25T20:16:38.678Z\",\n \"updated\": \"2025-09-25T20:16:38.678Z\",\n \"softDeletePolicy\": {\n \"retentionDurationSeconds\": \"604800\",\n \"effectiveTime\": \"2025-09-25T20:16:38.678Z\"\n },\n \"iamConfiguration\": {\n \"bucketPolicyOnly\": {\n \"enabled\": true,\n \"lockedTime\": \"2025-12-24T20:16:38.678Z\"\n },\n \"uniformBucketLevelAccess\": {\n \"enabled\": true,\n \"lockedTime\": \"2025-12-24T20:16:38.678Z\"\n },\n \"publicAccessPrevention\": \"inherited\"\n },\n \"locationType\": \"multi-region\",\n \"rpo\": \"DEFAULT\"\n}\n",
"headers" : {
"Alt-Svc" : "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000",
"Server" : "UploadServer",
"Cache-Control" : "private, max-age=0, must-revalidate, no-transform",
"ETag" : "CAE=",
"X-GUploader-UploadID" : "AJRbA5XpkmJTY8vXR06TIeDaP2BYhFhnTkuOe4yR6uInFHMF88afIOyQGuYtN-ZNaAwnFI1YkYsY-lMiMl1mvw",
"Vary" : [ "Origin", "X-Origin" ],
"Expires" : "Fri, 09 Jan 2026 19:03:33 GMT",
"Date" : "Fri, 09 Jan 2026 19:03:33 GMT",
"Content-Type" : "application/json; charset=UTF-8"
}
},
"uuid" : "226e4b3c-8aba-4e3a-8857-506a4d948ae0",
"persistent" : true,
"insertionIndex" : 863
}
Loading
Loading