[Libosinfo] [PATCH 1/4] test: Adjust test database directory layout

Christophe Fergeau cfergeau at redhat.com
Fri Jun 3 09:23:29 UTC 2016


Since the database reorganization, the files must follow a directory
layout matching their id, otherwise a warning is emitted.
---
 .../example.com/libosinfo-test-datamap.xml}        |  9 -------
 .../example.com/libosinfo-test-datamap2.xml        | 10 ++++++++
 .../example.com/libosinfo-test-install-script.xml} |  0
 .../fedoraproject.org/fedora-16.xml}               | 28 ----------------------
 test/dbdata/os/libosinfo.org/test-os-test1.xml     | 11 +++++++++
 test/dbdata/os/libosinfo.org/test-os-test2.xml     |  7 ++++++
 test/dbdata/os/libosinfo.org/test-os-test3.xml     |  7 ++++++
 test/dbdata/os/libosinfo.org/test-os-test4.xml     |  7 ++++++
 test/dbdata/os/libosinfo.org/test-os-test5.xml     |  7 ++++++
 9 files changed, 49 insertions(+), 37 deletions(-)
 rename test/dbdata/{datamaps/test-datamap.xml => datamap/example.com/libosinfo-test-datamap.xml} (56%)
 create mode 100644 test/dbdata/datamap/example.com/libosinfo-test-datamap2.xml
 rename test/dbdata/{install-scripts/test-install-script.xml => install-script/example.com/libosinfo-test-install-script.xml} (100%)
 rename test/dbdata/{oses/test-os-data.xml => os/fedoraproject.org/fedora-16.xml} (50%)
 create mode 100644 test/dbdata/os/libosinfo.org/test-os-test1.xml
 create mode 100644 test/dbdata/os/libosinfo.org/test-os-test2.xml
 create mode 100644 test/dbdata/os/libosinfo.org/test-os-test3.xml
 create mode 100644 test/dbdata/os/libosinfo.org/test-os-test4.xml
 create mode 100644 test/dbdata/os/libosinfo.org/test-os-test5.xml

diff --git a/test/dbdata/datamaps/test-datamap.xml b/test/dbdata/datamap/example.com/libosinfo-test-datamap.xml
similarity index 56%
rename from test/dbdata/datamaps/test-datamap.xml
rename to test/dbdata/datamap/example.com/libosinfo-test-datamap.xml
index 16c5116..234bc46 100644
--- a/test/dbdata/datamaps/test-datamap.xml
+++ b/test/dbdata/datamap/example.com/libosinfo-test-datamap.xml
@@ -1,6 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <libosinfo version="0.0.1">
-
   <datamap id="http://example.com/libosinfo/test-datamap">
     <!-- default value for keyboard, mandatory -->
     <entry inval="us" outval="us"/>
@@ -9,12 +8,4 @@
     <entry inval="val3" outval="baz"/>
     <entry inval="VAL1" outval="FOOBAR"/>
   </datamap>
-
-  <datamap id="http://example.com/libosinfo/test-datamap2">
-    <!-- default value for language, mandatory -->
-    <entry inval="en_EN.UTF-8" outval="English"/>
-    <entry inval="en_EN" outval="English"/>
-    <entry inval="fr_FR" outval="French"/>
-    <entry inval="fi_FI" outval="Finnish"/>
-  </datamap>
 </libosinfo>
diff --git a/test/dbdata/datamap/example.com/libosinfo-test-datamap2.xml b/test/dbdata/datamap/example.com/libosinfo-test-datamap2.xml
new file mode 100644
index 0000000..e6d5f92
--- /dev/null
+++ b/test/dbdata/datamap/example.com/libosinfo-test-datamap2.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<libosinfo version="0.0.1">
+  <datamap id="http://example.com/libosinfo/test-datamap2">
+    <!-- default value for language, mandatory -->
+    <entry inval="en_EN.UTF-8" outval="English"/>
+    <entry inval="en_EN" outval="English"/>
+    <entry inval="fr_FR" outval="French"/>
+    <entry inval="fi_FI" outval="Finnish"/>
+  </datamap>
+</libosinfo>
diff --git a/test/dbdata/install-scripts/test-install-script.xml b/test/dbdata/install-script/example.com/libosinfo-test-install-script.xml
similarity index 100%
rename from test/dbdata/install-scripts/test-install-script.xml
rename to test/dbdata/install-script/example.com/libosinfo-test-install-script.xml
diff --git a/test/dbdata/oses/test-os-data.xml b/test/dbdata/os/fedoraproject.org/fedora-16.xml
similarity index 50%
rename from test/dbdata/oses/test-os-data.xml
rename to test/dbdata/os/fedoraproject.org/fedora-16.xml
index 1e6494e..88ef431 100644
--- a/test/dbdata/oses/test-os-data.xml
+++ b/test/dbdata/os/fedoraproject.org/fedora-16.xml
@@ -20,32 +20,4 @@
       <initrd>isolinux/initrd.img</initrd>
     </media>
   </os>
-
-  <os id="http://libosinfo.org/test/os/test1">
-    <short-id>test1</short-id>
-    <name>Test 1</name>
-    <version>unknown</version>
-    <vendor>libosinfo.org</vendor>
-    <family>test</family>
-    <release-status>prerelease</release-status>
-  </os>
-
-  <os id="http://libosinfo.org/test/os/test2">
-    <short-id>test2</short-id>
-    <release-status>released</release-status>
-  </os>
-
-  <os id="http://libosinfo.org/test/os/test3">
-    <short-id>test3</short-id>
-  </os>
-
-  <os id="http://libosinfo.org/test/os/test4">
-    <short-id>test4</short-id>
-    <release-status>snapshot</release-status>
-  </os>
-
-  <os id="http://libosinfo.org/test/os/test5">
-    <short-id>test5</short-id>
-    <release-status>invalid-value</release-status>
-  </os>
 </libosinfo>
diff --git a/test/dbdata/os/libosinfo.org/test-os-test1.xml b/test/dbdata/os/libosinfo.org/test-os-test1.xml
new file mode 100644
index 0000000..8253459
--- /dev/null
+++ b/test/dbdata/os/libosinfo.org/test-os-test1.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<libosinfo version="0.0.1">
+  <os id="http://libosinfo.org/test/os/test1">
+    <short-id>test1</short-id>
+    <name>Test 1</name>
+    <version>unknown</version>
+    <vendor>libosinfo.org</vendor>
+    <family>test</family>
+    <release-status>prerelease</release-status>
+  </os>
+</libosinfo>
diff --git a/test/dbdata/os/libosinfo.org/test-os-test2.xml b/test/dbdata/os/libosinfo.org/test-os-test2.xml
new file mode 100644
index 0000000..5db0f84
--- /dev/null
+++ b/test/dbdata/os/libosinfo.org/test-os-test2.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<libosinfo version="0.0.1">
+  <os id="http://libosinfo.org/test/os/test2">
+    <short-id>test2</short-id>
+    <release-status>released</release-status>
+  </os>
+</libosinfo>
diff --git a/test/dbdata/os/libosinfo.org/test-os-test3.xml b/test/dbdata/os/libosinfo.org/test-os-test3.xml
new file mode 100644
index 0000000..8edad24
--- /dev/null
+++ b/test/dbdata/os/libosinfo.org/test-os-test3.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<libosinfo version="0.0.1">
+  <os id="http://libosinfo.org/test/os/test3">
+    <short-id>test3</short-id>
+  </os>
+</libosinfo>
+
diff --git a/test/dbdata/os/libosinfo.org/test-os-test4.xml b/test/dbdata/os/libosinfo.org/test-os-test4.xml
new file mode 100644
index 0000000..bac7365
--- /dev/null
+++ b/test/dbdata/os/libosinfo.org/test-os-test4.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<libosinfo version="0.0.1">
+  <os id="http://libosinfo.org/test/os/test4">
+    <short-id>test4</short-id>
+    <release-status>snapshot</release-status>
+  </os>
+</libosinfo>
diff --git a/test/dbdata/os/libosinfo.org/test-os-test5.xml b/test/dbdata/os/libosinfo.org/test-os-test5.xml
new file mode 100644
index 0000000..65dc54a
--- /dev/null
+++ b/test/dbdata/os/libosinfo.org/test-os-test5.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<libosinfo version="0.0.1">
+  <os id="http://libosinfo.org/test/os/test5">
+    <short-id>test5</short-id>
+    <release-status>invalid-value</release-status>
+  </os>
+</libosinfo>
-- 
2.7.4




More information about the Libosinfo mailing list