Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
tanujgirdhar committed Feb 29, 2024
1 parent 9693791 commit 49ea90b
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import org.finos.legend.engine.shared.core.ObjectMapperFactory;
import org.finos.legend.engine.shared.core.deployment.DeploymentMode;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;

import javax.ws.rs.core.Response;
Expand All @@ -42,23 +43,24 @@ public void testProperPlan()
{
String val =
"Class a::Person {name : String[1];}\n" +
"function a::f():a::Person[*]{a::Person.all()->from(a::m, ^meta::core::runtime::Runtime(connectionStores=^meta::core::runtime::ConnectionStore(element=a::db, connection=^meta::external::store::relational::runtime::TestDatabaseConnection(type=meta::relational::runtime::DatabaseType.H2))))}\n" +
"function a::f():a::TabularDataSet[1]{a::Person.all()->project([p|$p.name], ['name'])->from(a::m, ^meta::core::runtime::Runtime(connectionStores=^meta::core::runtime::ConnectionStore(element=a::db, connection=^meta::external::store::relational::runtime::TestDatabaseConnection(type=meta::relational::runtime::DatabaseType.H2))))}\n" +
"###Mapping\n" +
"Mapping a::m(a::Person:Relational{name : [a::db]tb.name})\n" +
"###Relational\n" +
"Database a::db(Table tb(name VARCHAR(100)))\n" +
"Database a::db(Table tb(name VARCHAR(100) PRIMARY KEY))\n" +
"###Snowflake\n" +
"SnowflakeApp a::myApp{" +
" applicationName: 'name';" +
" description: 'ee';" +
" ownership : Deployment { identifier: 'ownership' };" +
" function: a::f():Person[*];" +
" function: a::f():TabularDataSet[1];" +
"}";
Response response = api.validate(new FunctionActivatorInput("vX_X_X", "a::myApp", PureGrammarParser.newInstance().parseModel(val)), null);
Assert.assertEquals("[]", response.getEntity().toString());
}

@Test
@Ignore
public void testImproperPlan()
{
String val =
Expand Down

0 comments on commit 49ea90b

Please sign in to comment.