Skip to content

Commit

Permalink
TEIID-2476 adding a test for properties as well
Browse files Browse the repository at this point in the history
  • Loading branch information
shawkins committed Mar 28, 2016
1 parent 1ec468c commit 6609e77
Showing 1 changed file with 7 additions and 3 deletions.
Expand Up @@ -125,8 +125,8 @@ public VDBRepository getVDBRepository() {
es.deployVDB(new ByteArrayInputStream(new String("<vdb name=\"role-1\" version=\"1\">"
+ "<model name=\"s1\" type=\"virtual\">"
+ "<metadata type = \"DDL\"><![CDATA["
+ "CREATE VIEW t2 (col string primary key) as select 'a' as col;\n"
+ "CREATE VIEW t1 (col string, col_hidden string, foreign key (col) references t2) as select col, 'b' as col_hidden from t2;\n"
+ "CREATE VIEW t2 (col string primary key) options (x 'y') as select 'a' as col;\n"
+ "CREATE VIEW t1 (col string, col_hidden string, foreign key (col) references t2) options (x 'y1') as select col, 'b' as col_hidden from t2;\n"
+ "CREATE virtual procedure proc1 (param1 string) returns table (proc_col string) as begin end;\n"
+ "]]></metadata></model>"
+ "<model name=\"s2\" type=\"virtual\">"
Expand Down Expand Up @@ -178,14 +178,18 @@ public VDBRepository getVDBRepository() {
assertEquals("proc_col", rs.getString("name"));
assertFalse(rs.next());

rs = s.executeQuery("select * from sys.keys where tablename like 't_'");
rs = s.executeQuery("select * from sys.keys where name = 'x'");
//nothing should be visible
assertFalse(rs.next());

rs = s.executeQuery("select * from sysadmin.usage where schemaname like 's_'");
//nothing should be visible
assertFalse(rs.next());

rs = s.executeQuery("select * from sys.properties where name = 'x'");
assertTrue(rs.next());
assertEquals("y1", rs.getString("Value"));
assertFalse(rs.next());
}

}

0 comments on commit 6609e77

Please sign in to comment.