use of org.finra.herd.model.dto.DataBridgeBaseManifestDto in project herd by FINRAOS.
the class UploaderWebClientTest method testGetBusinessObjectDataUploadCredential2.
@Test
public void testGetBusinessObjectDataUploadCredential2() throws Exception {
DataBridgeBaseManifestDto manifest = new DataBridgeBaseManifestDto();
manifest.setNamespace("test1");
manifest.setBusinessObjectDefinitionName("test2");
manifest.setBusinessObjectFormatUsage("test3");
manifest.setBusinessObjectFormatFileType("test4");
manifest.setBusinessObjectFormatVersion("test5");
manifest.setPartitionValue("test6");
String storageName = "test8";
Integer businessObjectDataVersion = 1234;
Boolean createNewVersion = null;
uploaderWebClient.getRegServerAccessParamsDto().setUseSsl(true);
BusinessObjectDataUploadCredential businessObjectDataUploadCredential = uploaderWebClient.getBusinessObjectDataUploadCredential(manifest, storageName, businessObjectDataVersion, createNewVersion);
Assert.assertNotNull(businessObjectDataUploadCredential);
AwsCredential awsCredential = businessObjectDataUploadCredential.getAwsCredential();
Assert.assertNotNull(awsCredential);
Assert.assertEquals("https://testWebServiceHostname:1234/herd-app/rest/businessObjectData/upload/credential/namespaces/test1" + "/businessObjectDefinitionNames/test2/businessObjectFormatUsages/test3/businessObjectFormatFileTypes/test4/businessObjectFormatVersions/test5" + "/partitionValues/test6?storageName=test8&businessObjectDataVersion=1234", awsCredential.getAwsAccessKey());
}
use of org.finra.herd.model.dto.DataBridgeBaseManifestDto in project herd by FINRAOS.
the class UploaderWebClientTest method testGetBusinessObjectDataUploadCredential3.
@Test
public void testGetBusinessObjectDataUploadCredential3() throws Exception {
DataBridgeBaseManifestDto manifest = new DataBridgeBaseManifestDto();
manifest.setNamespace("test1");
manifest.setBusinessObjectDefinitionName("test2");
manifest.setBusinessObjectFormatUsage("test3");
manifest.setBusinessObjectFormatFileType("test4");
manifest.setBusinessObjectFormatVersion("test5");
manifest.setPartitionValue("test6");
manifest.setSubPartitionValues(Arrays.asList("test7", "test8"));
String storageName = "test8";
Integer businessObjectDataVersion = null;
Boolean createNewVersion = true;
uploaderWebClient.getRegServerAccessParamsDto().setUseSsl(true);
BusinessObjectDataUploadCredential businessObjectDataUploadCredential = uploaderWebClient.getBusinessObjectDataUploadCredential(manifest, storageName, businessObjectDataVersion, createNewVersion);
Assert.assertNotNull(businessObjectDataUploadCredential);
AwsCredential awsCredential = businessObjectDataUploadCredential.getAwsCredential();
Assert.assertNotNull(awsCredential);
Assert.assertEquals("https://testWebServiceHostname:1234/herd-app/rest/businessObjectData/upload/credential/namespaces/test1" + "/businessObjectDefinitionNames/test2/businessObjectFormatUsages/test3/businessObjectFormatFileTypes/test4/businessObjectFormatVersions/test5" + "/partitionValues/test6?storageName=test8&subPartitionValues=test7%7Ctest8&createNewVersion=true", awsCredential.getAwsAccessKey());
}
use of org.finra.herd.model.dto.DataBridgeBaseManifestDto in project herd by FINRAOS.
the class DataBridgeControllerTest method testGetStorageNameFromManifestAssertReturnDefaultWhenStorageNull.
/**
* When manifest does not specify storage name Assert return StorageEntity.MANAGED_STORAGE
*/
@Test
public void testGetStorageNameFromManifestAssertReturnDefaultWhenStorageNull() {
DataBridgeController dataBridgeController = new BasicDataBridgeController();
DataBridgeBaseManifestDto manifest = new DataBridgeBaseManifestDto();
String value = dataBridgeController.getStorageNameFromManifest(manifest);
assertEquals(StorageEntity.MANAGED_STORAGE, value);
}
use of org.finra.herd.model.dto.DataBridgeBaseManifestDto in project herd by FINRAOS.
the class DataBridgeControllerTest method testGetStorageNameFromManifestAssertReturnDefaultWhenStorageNameBlank.
/**
* When manifest specifies blank text storage name Assert return StorageEntity.MANAGED_STORAGE
*/
@Test
public void testGetStorageNameFromManifestAssertReturnDefaultWhenStorageNameBlank() {
DataBridgeController dataBridgeController = new BasicDataBridgeController();
DataBridgeBaseManifestDto manifest = new DataBridgeBaseManifestDto();
manifest.setStorageName(BLANK_TEXT);
String value = dataBridgeController.getStorageNameFromManifest(manifest);
assertEquals(StorageEntity.MANAGED_STORAGE, value);
}
use of org.finra.herd.model.dto.DataBridgeBaseManifestDto in project herd by FINRAOS.
the class DataBridgeControllerTest method testGetStorageNameFromManifestAssertReturnDefaultWhenStorageNameNull.
/**
* When manifest specifies null storage name Assert return StorageEntity.MANAGED_STORAGE
*/
@Test
public void testGetStorageNameFromManifestAssertReturnDefaultWhenStorageNameNull() {
DataBridgeController dataBridgeController = new BasicDataBridgeController();
DataBridgeBaseManifestDto manifest = new DataBridgeBaseManifestDto();
manifest.setStorageName(null);
String value = dataBridgeController.getStorageNameFromManifest(manifest);
assertEquals(StorageEntity.MANAGED_STORAGE, value);
}
Aggregations