use of io.confluent.ksql.tools.migrations.MigrationException in project ksql by confluentinc.
the class CommandParserTest method shouldThrowOnInvalidInsertValues.
@Test
public void shouldThrowOnInvalidInsertValues() {
// When:
final MigrationException e = assertThrows(MigrationException.class, () -> parse("insert into foo values (this_should_not_here) ('val');"));
// Then:
assertThat(e.getMessage(), containsString("Failed to parse INSERT VALUES statement"));
}
use of io.confluent.ksql.tools.migrations.MigrationException in project ksql by confluentinc.
the class CommandParserTest method shouldThrowOnMalformedComment.
@Test
public void shouldThrowOnMalformedComment() {
// When:
final MigrationException e = assertThrows(MigrationException.class, () -> CommandParser.splitSql("/* Comment "));
// Then:
assertThat(e.getMessage(), is("Invalid sql - failed to find closing token '*/'"));
}
use of io.confluent.ksql.tools.migrations.MigrationException in project ksql by confluentinc.
the class CommandParserTest method shouldThrowOnShowStatement.
@Test
public void shouldThrowOnShowStatement() {
// When:
final MigrationException e = assertThrows(MigrationException.class, () -> parse("show connectors;"));
// Then:
assertThat(e.getMessage(), is("'SHOW' statements are not supported."));
}
use of io.confluent.ksql.tools.migrations.MigrationException in project ksql by confluentinc.
the class CommandParserTest method shouldThrowOnRunScriptStatement.
@Test
public void shouldThrowOnRunScriptStatement() {
// When:
final MigrationException e = assertThrows(MigrationException.class, () -> parse("RUN SCRIPT 'my_script.sql';"));
// Then:
assertThat(e.getMessage(), is("'RUN SCRIPT' statements are not supported."));
}
Aggregations