Search in sources :

Example 6 with DataBridgeBaseManifestDto

use of org.finra.herd.model.dto.DataBridgeBaseManifestDto in project herd by FINRAOS.

the class DataBridgeManifestReaderTest method testReadJsonManifestNoFileType.

@Test
public void testReadJsonManifestNoFileType() throws Exception {
    DataBridgeBaseManifestDto dataBridgeBaseManifestDto = getDataBridgeBaseManifestDto();
    dataBridgeBaseManifestDto.setBusinessObjectFormatFileType(null);
    testReadJsonManifest(dataBridgeBaseManifestDto, "Manifest business object format file type must be specified.");
}
Also used : DataBridgeBaseManifestDto(org.finra.herd.model.dto.DataBridgeBaseManifestDto) Test(org.junit.Test)

Example 7 with DataBridgeBaseManifestDto

use of org.finra.herd.model.dto.DataBridgeBaseManifestDto in project herd by FINRAOS.

the class UploaderWebClientTest method testGetBusinessObjectDataUploadCredential1.

@Test
public void testGetBusinessObjectDataUploadCredential1() 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 = 1234;
    Boolean createNewVersion = false;
    uploaderWebClient.getRegServerAccessParamsDto().setUseSsl(false);
    BusinessObjectDataUploadCredential businessObjectDataUploadCredential = uploaderWebClient.getBusinessObjectDataUploadCredential(manifest, storageName, businessObjectDataVersion, createNewVersion);
    Assert.assertNotNull(businessObjectDataUploadCredential);
    AwsCredential awsCredential = businessObjectDataUploadCredential.getAwsCredential();
    Assert.assertNotNull(awsCredential);
    Assert.assertEquals("http://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&businessObjectDataVersion=1234&createNewVersion=false", awsCredential.getAwsAccessKey());
}
Also used : BusinessObjectDataUploadCredential(org.finra.herd.model.api.xml.BusinessObjectDataUploadCredential) DataBridgeBaseManifestDto(org.finra.herd.model.dto.DataBridgeBaseManifestDto) AwsCredential(org.finra.herd.model.api.xml.AwsCredential) Test(org.junit.Test)

Example 8 with DataBridgeBaseManifestDto

use of org.finra.herd.model.dto.DataBridgeBaseManifestDto in project herd by FINRAOS.

the class DataBridgeManifestReaderTest method testReadJsonManifestNoFormatUsage.

@Test
public void testReadJsonManifestNoFormatUsage() throws Exception {
    DataBridgeBaseManifestDto dataBridgeBaseManifestDto = getDataBridgeBaseManifestDto();
    dataBridgeBaseManifestDto.setBusinessObjectFormatUsage(null);
    testReadJsonManifest(dataBridgeBaseManifestDto, "Manifest business object format usage must be specified.");
}
Also used : DataBridgeBaseManifestDto(org.finra.herd.model.dto.DataBridgeBaseManifestDto) Test(org.junit.Test)

Example 9 with DataBridgeBaseManifestDto

use of org.finra.herd.model.dto.DataBridgeBaseManifestDto in project herd by FINRAOS.

the class DataBridgeManifestReaderTest method getDataBridgeBaseManifestDto.

private DataBridgeBaseManifestDto getDataBridgeBaseManifestDto() {
    DataBridgeBaseManifestDto dataBridgeBaseManifestDto = new DataBridgeBaseManifestDto();
    dataBridgeBaseManifestDto.setNamespace("testNamespace");
    dataBridgeBaseManifestDto.setBusinessObjectDefinitionName("testBusinessObjectDefinitionName");
    dataBridgeBaseManifestDto.setBusinessObjectFormatUsage("testBusinessObjectFormatUsage");
    dataBridgeBaseManifestDto.setBusinessObjectFormatFileType("testBusinessObjectFormatFileType");
    dataBridgeBaseManifestDto.setBusinessObjectFormatVersion("testBusinessObjectFormatVersion");
    dataBridgeBaseManifestDto.setPartitionKey("testPartitionKey");
    dataBridgeBaseManifestDto.setPartitionValue("testPartitionValue");
    dataBridgeBaseManifestDto.setSubPartitionValues(Arrays.asList("testSubPartitionValue1", "testSubPartitionValue2"));
    return dataBridgeBaseManifestDto;
}
Also used : DataBridgeBaseManifestDto(org.finra.herd.model.dto.DataBridgeBaseManifestDto)

Example 10 with DataBridgeBaseManifestDto

use of org.finra.herd.model.dto.DataBridgeBaseManifestDto in project herd by FINRAOS.

the class DataBridgeManifestReaderTest method testReadJsonManifestNoPartitionValue.

@Test
public void testReadJsonManifestNoPartitionValue() throws Exception {
    DataBridgeBaseManifestDto dataBridgeBaseManifestDto = getDataBridgeBaseManifestDto();
    dataBridgeBaseManifestDto.setPartitionValue(null);
    testReadJsonManifest(dataBridgeBaseManifestDto, "Manifest business object data partition value must be specified.");
}
Also used : DataBridgeBaseManifestDto(org.finra.herd.model.dto.DataBridgeBaseManifestDto) Test(org.junit.Test)

Aggregations

DataBridgeBaseManifestDto (org.finra.herd.model.dto.DataBridgeBaseManifestDto)16 Test (org.junit.Test)13 AbstractCoreTest (org.finra.herd.core.AbstractCoreTest)4 AwsCredential (org.finra.herd.model.api.xml.AwsCredential)3 BusinessObjectDataUploadCredential (org.finra.herd.model.api.xml.BusinessObjectDataUploadCredential)3 JsonProcessingException (com.fasterxml.jackson.core.JsonProcessingException)1 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)1 File (java.io.File)1 IOException (java.io.IOException)1 S3KeyPrefixInformation (org.finra.herd.model.api.xml.S3KeyPrefixInformation)1