[Libosinfo] [libosinfo PATCH 11/11] test-os: Add basic test for resources

Fabiano Fidêncio fidencio at redhat.com
Thu Jan 24 13:46:38 UTC 2019


On Thu, 2019-01-24 at 13:29 +0000, Daniel P. Berrangé wrote:
> On Tue, Jan 22, 2019 at 08:28:20PM +0100, Fabiano Fidêncio wrote:
> > This test only ensures that libosinfo is able to properly load the
> > resource info from an OS entry.
> > 
> > Signed-off-by: Fabiano Fidêncio <fabiano at fidencio.org>
> > ---
> >  tests/test-os.c | 53
> > +++++++++++++++++++++++++++++++++++++++++++++++++++++
> >  1 file changed, 53 insertions(+)
> 
> Reviewed-by: Daniel P. Berrangé <berrange at redhat.com>

Ouch, I've just noticed that I forgot to add the new xml for this test
when I sent the patch.

diff --git a/tests/dbdata/os/libosinfo.org/test-os-resources-basic.xml
b/tests/dbdata/os/libosinfo.org/test-os-resources-basic.xml
new file mode 100644
index 0000000..65f6fb2
--- /dev/null
+++ b/tests/dbdata/os/libosinfo.org/test-os-resources-basic.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<libosinfo version="0.0.1">
+  <os id="http://libosinfo.org/test/os/resources/basic">
+    <short-id>resourcesbasic</short-id>
+    <name>Resources Basic</name>
+    <vendor>libosinfo.org</vendor>
+    <family>test</family>
+
+    <resources arch="all">
+      <minimum>
+        <n-cpus>1</n-cpus>
+        <cpu>1</cpu>
+        <ram>1</ram>
+        <storage>1</storage>
+      </minimum>
+      <recommended>
+        <n-cpus>2</n-cpus>
+        <cpu>2</cpu>
+        <ram>2</ram>
+        <storage>2</storage>
+      </recommended>
+      <maximum>
+        <n-cpus>3</n-cpus>
+        <cpu>3</cpu>
+        <ram>3</ram>
+        <storage>3</storage>
+      </maximum>
+      <network-install>
+        <n-cpus>4</n-cpus>
+        <cpu>4</cpu>
+        <ram>4</ram>
+        <storage>4</storage>
+      </network-install>
+    </resources>
+
+  </os>
+</libosinfo>

It's going to be pushed as part of this commit as well.




More information about the Libosinfo mailing list