summaryrefslogtreecommitdiffstats
path: root/src/test
diff options
context:
space:
mode:
authorManuel Bentele2021-05-25 09:06:24 +0200
committerManuel Bentele2021-05-25 09:06:24 +0200
commit4f4ff072689e6d780d7ba0cc9a3ae19f2ec9db73 (patch)
treeb17d90986d73c4e03364d7816936c77f765691ce /src/test
parentBuild and package tests and their resources as external *.jar file (diff)
downloadmaster-sync-shared-4f4ff072689e6d780d7ba0cc9a3ae19f2ec9db73.tar.gz
master-sync-shared-4f4ff072689e6d780d7ba0cc9a3ae19f2ec9db73.tar.xz
master-sync-shared-4f4ff072689e6d780d7ba0cc9a3ae19f2ec9db73.zip
Add API method to obtain Libvirt test resource from test *.jar filedmsd-v3.10
Diffstat (limited to 'src/test')
-rw-r--r--src/test/java/org/openslx/libvirt/xml/LibvirtXmlTestResources.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/test/java/org/openslx/libvirt/xml/LibvirtXmlTestResources.java b/src/test/java/org/openslx/libvirt/xml/LibvirtXmlTestResources.java
index 6cc0360..693a442 100644
--- a/src/test/java/org/openslx/libvirt/xml/LibvirtXmlTestResources.java
+++ b/src/test/java/org/openslx/libvirt/xml/LibvirtXmlTestResources.java
@@ -2,6 +2,7 @@ package org.openslx.libvirt.xml;
import java.io.File;
import java.io.IOException;
+import java.io.InputStream;
import java.net.URL;
public final class LibvirtXmlTestResources
@@ -19,6 +20,12 @@ public final class LibvirtXmlTestResources
return new File( libvirtXml.getFile() );
}
+ public static InputStream getLibvirtXmlStream( String libvirtXmlFileName )
+ {
+ String libvirtXmlPath = LibvirtXmlTestResources.LIBVIRT_PREFIX_PATH_XML + File.separator + libvirtXmlFileName;
+ return LibvirtXmlTestResources.class.getResourceAsStream( libvirtXmlPath );
+ }
+
public static File createLibvirtXmlTempFile() throws IOException
{
File tempFile = File.createTempFile( LibvirtXmlTestResources.LIBVIRT_TEMP_PREFIX,