Search in sources :

Example 6 with SnowflakeTableProperties

use of org.talend.components.snowflake.SnowflakeTableProperties in project components by Talend.

the class SnowflakeWritersTestIT method testOutputBadTable.

@Test
public void testOutputBadTable() throws Throwable {
    TSnowflakeOutputProperties outputProps = (TSnowflakeOutputProperties) getComponentService().getComponentProperties(TSnowflakeOutputDefinition.COMPONENT_NAME);
    setupProps(outputProps.connection);
    setupTableWithStaticValues(outputProps);
    SnowflakeTableProperties tableProps = outputProps.table;
    Form f = tableProps.getForm(Form.REFERENCE);
    tableProps.tableName.setValue("BADONE");
    tableProps = (SnowflakeTableProperties) PropertiesTestUtils.checkAndAfter(getComponentService(), f, tableProps.tableName.getName(), tableProps);
    LOGGER.info(String.valueOf(tableProps.getValidationResult()));
    assertEquals(ValidationResult.Result.ERROR, tableProps.getValidationResult().getStatus());
    assertThat(tableProps.getValidationResult().getMessage(), containsString("BADONE"));
}
Also used : TSnowflakeOutputProperties(org.talend.components.snowflake.tsnowflakeoutput.TSnowflakeOutputProperties) Form(org.talend.daikon.properties.presentation.Form) SnowflakeTableProperties(org.talend.components.snowflake.SnowflakeTableProperties) Test(org.junit.Test)

Aggregations

SnowflakeTableProperties (org.talend.components.snowflake.SnowflakeTableProperties)6 Form (org.talend.daikon.properties.presentation.Form)6 Test (org.junit.Test)4 Schema (org.apache.avro.Schema)3 TSnowflakeOutputProperties (org.talend.components.snowflake.tsnowflakeoutput.TSnowflakeOutputProperties)2 Property (org.talend.daikon.properties.property.Property)2 ArrayList (java.util.ArrayList)1 List (java.util.List)1 SpringBootTest (org.springframework.boot.test.context.SpringBootTest)1 ComponentWizard (org.talend.components.api.wizard.ComponentWizard)1 ComponentWizardDefinition (org.talend.components.api.wizard.ComponentWizardDefinition)1 SnowflakeConnectionProperties (org.talend.components.snowflake.SnowflakeConnectionProperties)1 SnowflakeConnectionWizardDefinition (org.talend.components.snowflake.SnowflakeConnectionWizardDefinition)1 SnowflakeTableListProperties (org.talend.components.snowflake.SnowflakeTableListProperties)1 TSnowflakeInputProperties (org.talend.components.snowflake.tsnowflakeinput.TSnowflakeInputProperties)1 NamedThing (org.talend.daikon.NamedThing)1 PresentationItem (org.talend.daikon.properties.PresentationItem)1 Repository (org.talend.daikon.properties.service.Repository)1