Re-enable and fix test result for ASTERIXDB-1211

Change-Id: I67c6cc748bf49b3de44b2ca84a3a53f9c941170c
Reviewed-on: https://asterix-gerrit.ics.uci.edu/734
Reviewed-by: Till Westmann <tillw@apache.org>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
diff --git a/asterix-app/src/test/resources/metadata/queries/basic/meta24/meta24.1.ddl.aql b/asterix-app/src/test/resources/metadata/queries/basic/meta24/meta24.1.ddl.aql
new file mode 100644
index 0000000..7ae4adb
--- /dev/null
+++ b/asterix-app/src/test/resources/metadata/queries/basic/meta24/meta24.1.ddl.aql
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Description  : Create primary index & secondary index on open union field & query Metadata dataset to verify.
+ * Expected Res : Success
+ * Date         : 30 Sep 2013
+ */
+
+drop dataverse testdv if exists;
+create dataverse testdv;
+
+create type testdv.testtype as open {
+id : int32
+}
+
+create dataset testdv.t1(testtype) primary key id;
+
+create index idx1 on testdv.t1(name: string) type btree enforced;
diff --git a/asterix-app/src/test/resources/metadata/queries/basic/meta24/meta24.2.update.aql b/asterix-app/src/test/resources/metadata/queries/basic/meta24/meta24.2.update.aql
new file mode 100644
index 0000000..042f3ce
--- /dev/null
+++ b/asterix-app/src/test/resources/metadata/queries/basic/meta24/meta24.2.update.aql
@@ -0,0 +1,18 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
diff --git a/asterix-app/src/test/resources/metadata/queries/basic/meta24/meta24.3.query.aql b/asterix-app/src/test/resources/metadata/queries/basic/meta24/meta24.3.query.aql
new file mode 100644
index 0000000..e8ca427
--- /dev/null
+++ b/asterix-app/src/test/resources/metadata/queries/basic/meta24/meta24.3.query.aql
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Description  : Create primary index & secondary index on open union field & query Metadata dataset to verify.
+ * Expected Res : Success
+ * Date         : 30 Sep 2013
+ */
+
+for $l in dataset('Metadata.Index')
+where $l.DataverseName='testdv'
+return $l.SearchKeyType
+
diff --git a/asterix-app/src/test/resources/metadata/queries/basic/meta24/meta24.4.query.aql b/asterix-app/src/test/resources/metadata/queries/basic/meta24/meta24.4.query.aql
new file mode 100644
index 0000000..774ff28
--- /dev/null
+++ b/asterix-app/src/test/resources/metadata/queries/basic/meta24/meta24.4.query.aql
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Description  : Create primary index & secondary index on open union field & query Metadata dataset to verify.
+ * Expected Res : Success
+ * Date         : 30 Sep 2013
+ */
+
+for $l in dataset('Metadata.Index')
+where $l.DataverseName='testdv'
+return $l.IsEnforced
+
diff --git a/asterix-app/src/test/resources/metadata/results/basic/meta24/meta24.1.adm b/asterix-app/src/test/resources/metadata/results/basic/meta24/meta24.1.adm
new file mode 100644
index 0000000..aa76d8e
--- /dev/null
+++ b/asterix-app/src/test/resources/metadata/results/basic/meta24/meta24.1.adm
@@ -0,0 +1,2 @@
+[ "string" ]
+null
diff --git a/asterix-app/src/test/resources/metadata/results/basic/meta24/meta24.2.adm b/asterix-app/src/test/resources/metadata/results/basic/meta24/meta24.2.adm
new file mode 100644
index 0000000..4f07108
--- /dev/null
+++ b/asterix-app/src/test/resources/metadata/results/basic/meta24/meta24.2.adm
@@ -0,0 +1,2 @@
+true
+null
diff --git a/asterix-app/src/test/resources/metadata/testsuite.xml b/asterix-app/src/test/resources/metadata/testsuite.xml
index 595eb84..cb838cc 100644
--- a/asterix-app/src/test/resources/metadata/testsuite.xml
+++ b/asterix-app/src/test/resources/metadata/testsuite.xml
@@ -209,6 +209,11 @@
       </compilation-unit>
     </test-case>
     <test-case FilePath="basic">
+      <compilation-unit name="meta24">
+        <output-dir compare="Text">meta24</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="basic">
       <compilation-unit name="metadata_compaction_policy">
         <output-dir compare="Text">metadata_compaction_policy</output-dir>
       </compilation-unit>