Add test cases for metadata:database and metadata:storage SQL targets
@@ -945,6 +945,31 @@ public class OSelectStatementExecutionTest {
result.close();
}
+
+ @Test
+ public void testQueryMetadataDatabase() {
+ OResultSet result = db.query("select from metadata:database");
+ printExecutionPlan(result);
+
+ Assert.assertTrue(result.hasNext());
+ OResult item = result.next();
+ Assert.assertEquals(OSelectStatementExecutionTest.class.getSimpleName(), item.getProperty("name"));
+ Assert.assertFalse(result.hasNext());
+ result.close();
+ }
+
+ @Test
+ public void testQueryMetadataStorage() {
+ OResultSet result = db.query("select from metadata:storage");
+ printExecutionPlan(result);
+
+ Assert.assertTrue(result.hasNext());
+ OResult item = result.next();
+ Assert.assertEquals(OSelectStatementExecutionTest.class.getSimpleName(), item.getProperty("name"));
+ Assert.assertFalse(result.hasNext());
+ result.close();
+ }
+
@Test
public void testNonExistingRids() {
OResultSet result = db.query("select from #0:100000000");
