use of org.talend.components.azurestorage.blob.tazurestoragecontainerlist.TAzureStorageContainerListProperties in project components by Talend.
the class AzureStorageContainerListReaderTest method setUp.
@Before
public void setUp() throws Exception {
runtimeContainer = new RuntimeContainerMock();
AzureStorageSource source = new AzureStorageSource();
TAzureStorageContainerListProperties properties = new TAzureStorageContainerListProperties(PROP_ + "ContainerList");
properties.connection = new TAzureStorageConnectionProperties(PROP_ + "Connection");
properties.connection.protocol.setValue(Protocol.HTTP);
properties.connection.accountName.setValue("fakeAccountName");
properties.connection.accountKey.setValue("fakeAccountKey=ANBHFYRJJFHRIKKJFU");
properties.setupProperties();
source.initialize(runtimeContainer, properties);
reader = (AzureStorageContainerListReader) source.createReader(runtimeContainer);
reader.blobService = blobService;
}
use of org.talend.components.azurestorage.blob.tazurestoragecontainerlist.TAzureStorageContainerListProperties in project components by Talend.
the class TAzureStorageConnectionTestIT method testInvalidConnection.
@SuppressWarnings("rawtypes")
@Test(expected = Exception.class)
public void testInvalidConnection() throws Throwable {
TAzureStorageContainerListProperties properties = new TAzureStorageContainerListProperties("test");
properties.dieOnError.setValue(true);
BoundedReader reader = createBoundedReader(properties);
reader.start();
}
use of org.talend.components.azurestorage.blob.tazurestoragecontainerlist.TAzureStorageContainerListProperties in project components by Talend.
the class AzureStorageBaseBlobTestIT method createContainerListReader.
/**
* createContainerListReader - List containers
*
* @return {@link BoundedReader} bounded reader
* @throws Exception the exception
*/
@SuppressWarnings("rawtypes")
public BoundedReader createContainerListReader() throws Exception {
TAzureStorageContainerListProperties properties = new TAzureStorageContainerListProperties("tests");
setupConnectionProperties(properties);
properties.schema.schema.setValue(schemaForContainerList);
return createBoundedReader(properties);
}
use of org.talend.components.azurestorage.blob.tazurestoragecontainerlist.TAzureStorageContainerListProperties in project components by Talend.
the class AzureStorageComponentsTest method testContainerListSchema.
@Test
public void testContainerListSchema() {
Schema s = // $NON-NLS-3$
SchemaBuilder.record("Main").fields().name("ContainerName").prop(SchemaConstants.TALEND_COLUMN_DB_LENGTH, "50").prop(SchemaConstants.TALEND_IS_LOCKED, "true").type(AvroUtils._string()).noDefault().endRecord();
TAzureStorageContainerListProperties props = new TAzureStorageContainerListProperties("tests");
props.setupProperties();
Schema ps = props.schema.schema.getValue();
assertEquals(s, ps);
}
Aggregations