Skip to content

Commit 756a0b0

Browse files
committed
test: Enable GCP blob store conformance tests testDownloadWithKmsKey, testUploadWithKmsKey_happyPath, testUploadWithKmsKey_emptyKmsKeyId, testUploadWithKmsKey_nullKmsKeyId, testRangedReadWithKmsKey, testVersionedCopyFrom
1 parent abe66c5 commit 756a0b0

File tree

79 files changed

+2309
-18
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+2309
-18
lines changed

blob/blob-client/src/test/java/com/salesforce/multicloudj/blob/client/AbstractBlobStoreIT.java

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
import org.junit.jupiter.api.BeforeEach;
3636
import org.junit.jupiter.api.Test;
3737
import org.junit.jupiter.api.TestInstance;
38-
import org.opentest4j.AssertionFailedError;
3938
import org.slf4j.Logger;
4039
import org.slf4j.LoggerFactory;
4140

@@ -166,8 +165,8 @@ public void testNonexistentBucket() {
166165
// And run the tests given the non-existent bucket
167166
runOperationsThatShouldFail("testNonexistentBucket", bucketClient);
168167
if (!GCP_PROVIDER_ID.equals(harness.getProviderId())) {
169-
runOperationsThatShouldNotFail("testNonexistentBucket", bucketClient);
170-
}
168+
runOperationsThatShouldNotFail("testNonexistentBucket", bucketClient);
169+
}
171170
}
172171

173172
@Test
@@ -180,8 +179,8 @@ public void testInvalidCredentials() {
180179
// And run the tests given the invalid credentialsOverrider
181180
runOperationsThatShouldFail("testInvalidCredentials", bucketClient);
182181
if (!GCP_PROVIDER_ID.equals(harness.getProviderId())) {
183-
runOperationsThatShouldNotFail("testInvalidCredentials", bucketClient);
184-
}
182+
runOperationsThatShouldNotFail("testInvalidCredentials", bucketClient);
183+
}
185184
}
186185

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

892891
@Test
893892
public void testVersionedDelete_fileDoesNotExist() throws IOException {
894-
895893
// Create the BucketClient
896894
AbstractBlobStore blobStore = harness.createBlobStore(true, true, true);
897895
BucketClient bucketClient = new BucketClient(blobStore);
@@ -1376,8 +1374,6 @@ public void testCopyFrom() throws IOException {
13761374

13771375
@Test
13781376
public void testVersionedCopyFrom() throws IOException {
1379-
Assumptions.assumeFalse(GCP_PROVIDER_ID.equals(harness.getProviderId()));
1380-
13811377
String key = "conformance-tests/versionedCopyFrom/blob";
13821378
String destKeyV1 = "conformance-tests/versionedCopyFrom/copied-from-blob-v1";
13831379
String destKeyV2 = "conformance-tests/versionedCopyFrom/copied-from-blob-v2";
@@ -2757,22 +2753,19 @@ private void safeDeleteBlobs(BucketClient bucketClient, String... keys){
27572753

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

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

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

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

28542846
@Test
28552847
public void testRangedReadWithKmsKey() throws IOException {
2856-
Assumptions.assumeFalse(GCP_PROVIDER_ID.equals(harness.getProviderId()));
28572848
String key = "conformance-tests/kms/ranged-read";
28582849
String kmsKeyId = harness.getKmsKeyId();
28592850
runRangedReadWithKmsKeyTest(key, kmsKeyId);

blob/blob-gcp/src/test/resources/mappings/delete-zvqgfnjuqs.json renamed to blob/blob-gcp/src/test/resources/mappings/delete-0osydaxiaz.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"id" : "36e520d9-fdd5-4fe4-b04a-413f48446f06",
2+
"id" : "487a9983-921c-4619-87f2-c8a8fa751ead",
33
"name" : "storage_v1_b_substrate-sdk-gcp-poc1-test-bucket-versioned_o_versioned-blob-that-doesnt-exist",
44
"request" : {
55
"url" : "/storage/v1/b/substrate-sdk-gcp-poc1-test-bucket-versioned/o/versioned-blob-that-doesnt-exist",
@@ -12,15 +12,15 @@
1212
"Alt-Svc" : "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000",
1313
"Server" : "UploadServer",
1414
"Cache-Control" : "no-cache, no-store, max-age=0, must-revalidate",
15-
"X-GUploader-UploadID" : "AHVrFxO7GEA4d8Btm3WLp1WeWoDizXKfF1MdFs5M7piZYLzlIbAHHe96IhAbggtm2ieWWLykaECrZdw",
15+
"X-GUploader-UploadID" : "AHVrFxNpny-e3MHGHE0Ok-j1YSnGfW30FsEUvmXxdHuXd6QxmkVY8u0xfcIaSrbfwhSBdZp2",
1616
"Vary" : [ "Origin", "X-Origin" ],
1717
"Pragma" : "no-cache",
1818
"Expires" : "Mon, 01 Jan 1990 00:00:00 GMT",
19-
"Date" : "Fri, 19 Dec 2025 20:37:33 GMT",
19+
"Date" : "Fri, 09 Jan 2026 19:17:52 GMT",
2020
"Content-Type" : "application/json; charset=UTF-8"
2121
}
2222
},
23-
"uuid" : "36e520d9-fdd5-4fe4-b04a-413f48446f06",
23+
"uuid" : "487a9983-921c-4619-87f2-c8a8fa751ead",
2424
"persistent" : true,
25-
"insertionIndex" : 358
25+
"insertionIndex" : 938
2626
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"id" : "60844984-a8b9-4cd4-b418-45c1586b26bd",
3+
"name" : "storage_v1_b_substrate-sdk-gcp-poc1-test-bucket_o_conformance-tests_kms_upload-null-key",
4+
"request" : {
5+
"url" : "/storage/v1/b/substrate-sdk-gcp-poc1-test-bucket/o/conformance-tests%2Fkms%2Fupload-null-key",
6+
"method" : "DELETE"
7+
},
8+
"response" : {
9+
"status" : 204,
10+
"headers" : {
11+
"Alt-Svc" : "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000",
12+
"Server" : "UploadServer",
13+
"Cache-Control" : "no-cache, no-store, max-age=0, must-revalidate",
14+
"X-GUploader-UploadID" : "AJRbA5XDGRbsVADVmgfZ3LX79tR5merQ4YeK7o0juDNjaBe6nwqTJP5SIO_HfUpiC7Tj0xaq0i481isJTCw1Lg",
15+
"Vary" : [ "Origin", "X-Origin" ],
16+
"Pragma" : "no-cache",
17+
"Expires" : "Mon, 01 Jan 1990 00:00:00 GMT",
18+
"Date" : "Fri, 09 Jan 2026 19:04:11 GMT",
19+
"Content-Type" : "application/json"
20+
}
21+
},
22+
"uuid" : "60844984-a8b9-4cd4-b418-45c1586b26bd",
23+
"persistent" : true,
24+
"insertionIndex" : 883
25+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"id" : "5a815df1-7f73-4f51-8333-357ddd5e79fd",
3+
"name" : "storage_v1_b_substrate-sdk-gcp-poc1-test-bucket_o_conformance-tests_kms_download-happy-path",
4+
"request" : {
5+
"url" : "/storage/v1/b/substrate-sdk-gcp-poc1-test-bucket/o/conformance-tests%2Fkms%2Fdownload-happy-path",
6+
"method" : "DELETE"
7+
},
8+
"response" : {
9+
"status" : 204,
10+
"headers" : {
11+
"Alt-Svc" : "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000",
12+
"Server" : "UploadServer",
13+
"Cache-Control" : "no-cache, no-store, max-age=0, must-revalidate",
14+
"X-GUploader-UploadID" : "AJRbA5VZdhBqKz2ZskADIK4a3yifJaLI2OmjFZd3vUpz-vocp5uWk9Lue3exUm4ZqRI6n0fCotkujr6XGUX5BQ",
15+
"Vary" : [ "Origin", "X-Origin" ],
16+
"Pragma" : "no-cache",
17+
"Expires" : "Mon, 01 Jan 1990 00:00:00 GMT",
18+
"Date" : "Fri, 09 Jan 2026 19:03:33 GMT",
19+
"Content-Type" : "application/json"
20+
}
21+
},
22+
"uuid" : "5a815df1-7f73-4f51-8333-357ddd5e79fd",
23+
"persistent" : true,
24+
"insertionIndex" : 862
25+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"id" : "8428bc86-256f-4221-a089-2d0d144bf523",
3+
"name" : "storage_v1_b_substrate-sdk-gcp-poc1-test-bucket-versioned_o_conformance-tests_versionedcopyfrom_copied-from-blob-latest",
4+
"request" : {
5+
"url" : "/storage/v1/b/substrate-sdk-gcp-poc1-test-bucket-versioned/o/conformance-tests%2FversionedCopyFrom%2Fcopied-from-blob-latest",
6+
"method" : "DELETE"
7+
},
8+
"response" : {
9+
"status" : 204,
10+
"headers" : {
11+
"Alt-Svc" : "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000",
12+
"Server" : "UploadServer",
13+
"Cache-Control" : "no-cache, no-store, max-age=0, must-revalidate",
14+
"X-GUploader-UploadID" : "AJRbA5XPfu7yGZ6KjqyD7U82MBa-b5Cu-iAaEpagYlKBLrvpa0vlkSucsEYn_lMEbfLs0Fh6_z1oLQEJl1RocQ",
15+
"Vary" : [ "Origin", "X-Origin" ],
16+
"Pragma" : "no-cache",
17+
"Expires" : "Mon, 01 Jan 1990 00:00:00 GMT",
18+
"Date" : "Fri, 09 Jan 2026 19:04:44 GMT",
19+
"Content-Type" : "application/json"
20+
}
21+
},
22+
"uuid" : "8428bc86-256f-4221-a089-2d0d144bf523",
23+
"persistent" : true,
24+
"insertionIndex" : 903
25+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"id" : "3d03e1e3-6e02-4d8e-aa5e-8621e48c12cf",
3+
"name" : "storage_v1_b_substrate-sdk-gcp-poc1-test-bucket_o_conformance-tests_kms_upload-empty-key",
4+
"request" : {
5+
"url" : "/storage/v1/b/substrate-sdk-gcp-poc1-test-bucket/o/conformance-tests%2Fkms%2Fupload-empty-key",
6+
"method" : "DELETE"
7+
},
8+
"response" : {
9+
"status" : 204,
10+
"headers" : {
11+
"Alt-Svc" : "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000",
12+
"Server" : "UploadServer",
13+
"Cache-Control" : "no-cache, no-store, max-age=0, must-revalidate",
14+
"X-GUploader-UploadID" : "AJRbA5W0aUjdlHaaLeivQH5wc9vQJHUmZ170AZIcVsveK_2H75VS6dTOp_1WUmVkS0v6UmjYEPlgOOx0WO2JxA",
15+
"Vary" : [ "Origin", "X-Origin" ],
16+
"Pragma" : "no-cache",
17+
"Expires" : "Mon, 01 Jan 1990 00:00:00 GMT",
18+
"Date" : "Fri, 09 Jan 2026 19:03:58 GMT",
19+
"Content-Type" : "application/json"
20+
}
21+
},
22+
"uuid" : "3d03e1e3-6e02-4d8e-aa5e-8621e48c12cf",
23+
"persistent" : true,
24+
"insertionIndex" : 876
25+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"id" : "b6ce25a4-e32f-49a2-92c5-cc2d1c942583",
3+
"name" : "storage_v1_b_substrate-sdk-gcp-poc1-test-bucket-versioned_o_conformance-tests_versionedcopyfrom_blob",
4+
"request" : {
5+
"url" : "/storage/v1/b/substrate-sdk-gcp-poc1-test-bucket-versioned/o/conformance-tests%2FversionedCopyFrom%2Fblob",
6+
"method" : "DELETE"
7+
},
8+
"response" : {
9+
"status" : 204,
10+
"headers" : {
11+
"Alt-Svc" : "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000",
12+
"Server" : "UploadServer",
13+
"Cache-Control" : "no-cache, no-store, max-age=0, must-revalidate",
14+
"X-GUploader-UploadID" : "AJRbA5V8f5ofBq1TrurQk7HXZOvA30derlkCbuOBBp32Ps_Azepsnct1SjhHKX30QVavWX3kJ4HG9FL-rSV8xw",
15+
"Vary" : [ "Origin", "X-Origin" ],
16+
"Pragma" : "no-cache",
17+
"Expires" : "Mon, 01 Jan 1990 00:00:00 GMT",
18+
"Date" : "Fri, 09 Jan 2026 19:04:42 GMT",
19+
"Content-Type" : "application/json"
20+
}
21+
},
22+
"uuid" : "b6ce25a4-e32f-49a2-92c5-cc2d1c942583",
23+
"persistent" : true,
24+
"insertionIndex" : 909
25+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"id" : "8a518ad3-a57d-4845-b5d7-f70358c77ef4",
3+
"name" : "storage_v1_b_substrate-sdk-gcp-poc1-test-bucket_o_conformance-tests_kms_ranged-read",
4+
"request" : {
5+
"url" : "/storage/v1/b/substrate-sdk-gcp-poc1-test-bucket/o/conformance-tests%2Fkms%2Franged-read",
6+
"method" : "DELETE"
7+
},
8+
"response" : {
9+
"status" : 204,
10+
"headers" : {
11+
"Alt-Svc" : "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000",
12+
"Server" : "UploadServer",
13+
"Cache-Control" : "no-cache, no-store, max-age=0, must-revalidate",
14+
"X-GUploader-UploadID" : "AJRbA5XGxixGwDKKvDYbFMAXDbop1ZFB1pW7PfUSUi3dfaoFku1uO7WVWht-z671VWXcl0rgluRUHZ2cqoe7ng",
15+
"Vary" : [ "Origin", "X-Origin" ],
16+
"Pragma" : "no-cache",
17+
"Expires" : "Mon, 01 Jan 1990 00:00:00 GMT",
18+
"Date" : "Fri, 09 Jan 2026 19:04:25 GMT",
19+
"Content-Type" : "application/json"
20+
}
21+
},
22+
"uuid" : "8a518ad3-a57d-4845-b5d7-f70358c77ef4",
23+
"persistent" : true,
24+
"insertionIndex" : 890
25+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"id" : "435ba288-36a7-4dbc-8532-5058753522ad",
3+
"name" : "storage_v1_b_substrate-sdk-gcp-poc1-test-bucket-versioned_o_conformance-tests_versionedcopyfrom_copied-from-blob-v2",
4+
"request" : {
5+
"url" : "/storage/v1/b/substrate-sdk-gcp-poc1-test-bucket-versioned/o/conformance-tests%2FversionedCopyFrom%2Fcopied-from-blob-v2",
6+
"method" : "DELETE"
7+
},
8+
"response" : {
9+
"status" : 204,
10+
"headers" : {
11+
"Alt-Svc" : "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000",
12+
"Server" : "UploadServer",
13+
"Cache-Control" : "no-cache, no-store, max-age=0, must-revalidate",
14+
"X-GUploader-UploadID" : "AJRbA5U9_ApqWN_OL8E7M92Q9gI5mQh5DmUU6Vy9W1yErEAGrDGuh1NfVN8Ml-n1OhaOfXOLFuEn7LdJ9qWBZQ",
15+
"Vary" : [ "Origin", "X-Origin" ],
16+
"Pragma" : "no-cache",
17+
"Expires" : "Mon, 01 Jan 1990 00:00:00 GMT",
18+
"Date" : "Fri, 09 Jan 2026 19:04:44 GMT",
19+
"Content-Type" : "application/json"
20+
}
21+
},
22+
"uuid" : "435ba288-36a7-4dbc-8532-5058753522ad",
23+
"persistent" : true,
24+
"insertionIndex" : 905
25+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"id" : "af2a76de-9dab-4d0c-8505-893aa1d218b7",
3+
"name" : "storage_v1_b_substrate-sdk-gcp-poc1-test-bucket-versioned_o_conformance-tests_versionedcopyfrom_copied-from-blob-v1",
4+
"request" : {
5+
"url" : "/storage/v1/b/substrate-sdk-gcp-poc1-test-bucket-versioned/o/conformance-tests%2FversionedCopyFrom%2Fcopied-from-blob-v1",
6+
"method" : "DELETE"
7+
},
8+
"response" : {
9+
"status" : 204,
10+
"headers" : {
11+
"Alt-Svc" : "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000",
12+
"Server" : "UploadServer",
13+
"Cache-Control" : "no-cache, no-store, max-age=0, must-revalidate",
14+
"X-GUploader-UploadID" : "AJRbA5V-gcsPwikL4YSS1MFJYVW0ZuusXdhYgWs2EFzBmE7tv5pSs9LIlO7gKVja4DyLDUqSKsoBbveq6saCsg",
15+
"Vary" : [ "Origin", "X-Origin" ],
16+
"Pragma" : "no-cache",
17+
"Expires" : "Mon, 01 Jan 1990 00:00:00 GMT",
18+
"Date" : "Fri, 09 Jan 2026 19:04:43 GMT",
19+
"Content-Type" : "application/json"
20+
}
21+
},
22+
"uuid" : "af2a76de-9dab-4d0c-8505-893aa1d218b7",
23+
"persistent" : true,
24+
"insertionIndex" : 907
25+
}

0 commit comments

Comments
 (0)