Skip to content

Commit cbb07d8

Browse files
committed
Use provided bucket name when available.
1 parent d40fa6b commit cbb07d8

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

hub/src/test/java/cloud/katta/core/AbstractHubSynchronizeTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@
6161
import cloud.katta.client.api.StorageProfileResourceApi;
6262
import cloud.katta.client.api.UsersResourceApi;
6363
import cloud.katta.client.model.ConfigDto;
64-
import cloud.katta.client.model.Protocol;
6564
import cloud.katta.client.model.S3SERVERSIDEENCRYPTION;
6665
import cloud.katta.client.model.S3STORAGECLASSES;
6766
import cloud.katta.client.model.StorageProfileDto;
@@ -234,7 +233,7 @@ public void test03AddVault(final HubTestConfig config) throws Exception {
234233
log.info("Creating vault in {}", hubSession);
235234
final UUID vaultId = UUID.fromString(new UUIDRandomStringService().random());
236235

237-
final Path bucket = new Path(storageProfileWrapper.getProtocol() == Protocol.S3_STS ? storageProfileWrapper.getBucketPrefix() + vaultId : config.vault.bucketName,
236+
final Path bucket = new Path(null == config.vault.bucketName ? storageProfileWrapper.getBucketPrefix() + vaultId : config.vault.bucketName,
238237
EnumSet.of(Path.Type.volume, Path.Type.directory));
239238
final HubStorageLocationService.StorageLocation location = new HubStorageLocationService.StorageLocation(storageProfileWrapper.getId().toString(), storageProfileWrapper.getRegion(),
240239
storageProfileWrapper.getName());

hub/src/test/java/cloud/katta/workflows/AbstractHubWorkflowTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
import cloud.katta.client.api.UsersResourceApi;
2525
import cloud.katta.client.api.VaultResourceApi;
2626
import cloud.katta.client.model.MemberDto;
27-
import cloud.katta.client.model.Protocol;
2827
import cloud.katta.client.model.Role;
2928
import cloud.katta.client.model.StorageProfileDto;
3029
import cloud.katta.client.model.UserDto;
@@ -64,7 +63,7 @@ public void testHubWorkflow(final HubTestConfig config) throws Exception {
6463
.filter(p -> p.getId().toString().equals(config.vault.storageProfileId.toLowerCase())).findFirst().get();
6564

6665
final UUID vaultId = UUID.fromString(new UUIDRandomStringService().random());
67-
final Path bucket = new Path(storageProfileWrapper.getProtocol() == Protocol.S3_STS ? storageProfileWrapper.getBucketPrefix() + vaultId : config.vault.bucketName,
66+
final Path bucket = new Path(null == config.vault.bucketName ? storageProfileWrapper.getBucketPrefix() + vaultId : config.vault.bucketName,
6867
EnumSet.of(Path.Type.volume, Path.Type.directory));
6968
final HubStorageLocationService.StorageLocation location = new HubStorageLocationService.StorageLocation(storageProfileWrapper.getId().toString(), storageProfileWrapper.getRegion(),
7069
storageProfileWrapper.getName());

0 commit comments

Comments
 (0)