[ovirt-devel] failed to run JsonRpcIntegrationTest independecy

Piotr Kliczewski piotr.kliczewski at gmail.com
Thu Sep 7 07:53:23 UTC 2017


Tests are not meant to talk to vdsm. You can try this [1]. I wrote it
some time ago but I think that it should work for you.
It is able to use engine's or vdsm's certificates.

Thanks,
Piotr

[1] https://github.com/pkliczewski/vdsm-smoke

On Thu, Sep 7, 2017 at 8:54 AM, pengyixiang <yxpengi386 at 163.com> wrote:
> hello, everyone!
>     I try to run JsonRpcClient to call "Host.getCapabilities" without a
> running ovirt engine but with a running vdsm, so I write a case to run this
> file:
> backend/manager/modules/vdsbroker/src/test/java/org/ovirt/engine/core/vdsbroker/jsonrpc/JsonRpcIntegrationTest.java
>
>  but it's seems failed, logs follows:
>
> [main] INFO org.ovirt.engine.core.uutils.config.ShellLikeConfd - Loaded file
> '/home/pencc/eclipse-workspace/engine_rpc_test/src/main/resources/engine.conf.defaults'.
> [main] INFO org.ovirt.engine.core.uutils.config.ShellLikeConfd - The file
> '/etc/ovirt-engine/engine.conf' doesn't exist or isn't readable. Will return
> an empty set of properties.
> [main] INFO org.ovirt.engine.core.uutils.config.ShellLikeConfd - The file
> '/etc/ovirt-engine/engine.conf.d/10-setup-database.conf' doesn't exist or
> isn't readable. Will return an empty set of properties.
> [main] INFO org.ovirt.engine.core.uutils.config.ShellLikeConfd - Loaded file
> '/etc/ovirt-engine/engine.conf.d/10-setup-java.conf'.
> [main] INFO org.ovirt.engine.core.uutils.config.ShellLikeConfd - Loaded file
> '/etc/ovirt-engine/engine.conf.d/10-setup-jboss.conf'.
> [main] INFO org.ovirt.engine.core.uutils.config.ShellLikeConfd - The file
> '/etc/ovirt-engine/engine.conf.d/10-setup-pki.conf' doesn't exist or isn't
> readable. Will return an empty set of properties.
> [main] INFO org.ovirt.engine.core.uutils.config.ShellLikeConfd - Loaded file
> '/etc/ovirt-engine/engine.conf.d/10-setup-protocols.conf'.
> [main] INFO org.ovirt.engine.core.uutils.config.ShellLikeConfd - The file
> '/etc/ovirt-engine/engine.conf.d/11-setup-sso.conf' doesn't exist or isn't
> readable. Will return an empty set of properties.
> [main] INFO org.ovirt.engine.core.uutils.config.ShellLikeConfd - Loaded file
> '/etc/ovirt-engine/engine.conf.d/20-setup-jboss-overlay.conf'.
> [main] INFO org.ovirt.engine.core.uutils.config.ShellLikeConfd - Value of
> property 'ENGINE_AJP_ENABLED' is 'false'.
> [main] INFO org.ovirt.engine.core.uutils.config.ShellLikeConfd - Value of
> property 'ENGINE_AJP_PORT' is 'None'.
> [main] INFO org.ovirt.engine.core.uutils.config.ShellLikeConfd - Value of
> property 'ENGINE_DB_CHECK_INTERVAL' is '0'.
> [main] INFO org.ovirt.engine.core.uutils.config.ShellLikeConfd - Value of
> property 'ENGINE_DB_CONNECTION_TIMEOUT' is '0'.
> [main] INFO org.ovirt.engine.core.uutils.config.ShellLikeConfd - Value of
> property 'ENGINE_DEBUG_ADDRESS' is '127.0.0.1:8787'.
> [main] INFO org.ovirt.engine.core.uutils.config.ShellLikeConfd - Value of
> property 'ENGINE_DEPLOYMENT_SCANNER' is 'true'.
> [main] INFO org.ovirt.engine.core.uutils.config.ShellLikeConfd - Value of
> property 'ENGINE_ETC' is './'.
> [main] INFO org.ovirt.engine.core.uutils.config.ShellLikeConfd - Value of
> property 'ENGINE_FQDN' is 'ovirt.linx.com'.
> [main] INFO org.ovirt.engine.core.uutils.config.ShellLikeConfd - Value of
> property 'ENGINE_HEAP_MAX' is '3979M'.
> [main] INFO org.ovirt.engine.core.uutils.config.ShellLikeConfd - Value of
> property 'ENGINE_HEAP_MIN' is '3979M'.
> [main] INFO org.ovirt.engine.core.uutils.config.ShellLikeConfd - Value of
> property 'ENGINE_HTTPS_ENABLED' is 'true'.
> [main] INFO org.ovirt.engine.core.uutils.config.ShellLikeConfd - Value of
> property 'ENGINE_HTTPS_PORT' is '8443'.
> [main] INFO org.ovirt.engine.core.uutils.config.ShellLikeConfd - Value of
> property 'ENGINE_HTTP_ENABLED' is 'true'.
> [main] INFO org.ovirt.engine.core.uutils.config.ShellLikeConfd - Value of
> property 'ENGINE_HTTP_PORT' is '8080'.
> [main] INFO org.ovirt.engine.core.uutils.config.ShellLikeConfd - Value of
> property 'ENGINE_JAVA_MODULEPATH' is
> '/usr/share/ovirt-engine-wildfly-overlay/modules:'.
> [main] INFO org.ovirt.engine.core.uutils.config.ShellLikeConfd - Value of
> property 'ENGINE_LOG_TO_CONSOLE' is 'true'.
> [main] INFO org.ovirt.engine.core.uutils.config.ShellLikeConfd - Value of
> property 'ENGINE_PKI_ENGINE_STORE' is 'src/main/resources/key.p12'.
> [main] INFO org.ovirt.engine.core.uutils.config.ShellLikeConfd - Value of
> property 'ENGINE_PKI_ENGINE_STORE_ALIAS' is '1'.
> [main] INFO org.ovirt.engine.core.uutils.config.ShellLikeConfd - Value of
> property 'ENGINE_PKI_ENGINE_STORE_PASSWORD' is 'NoSoup4U'.
> [main] INFO org.ovirt.engine.core.uutils.config.ShellLikeConfd - Value of
> property 'ENGINE_PKI_ENGINE_STORE_TYPE' is 'PKCS12'.
> [main] INFO org.ovirt.engine.core.uutils.config.ShellLikeConfd - Value of
> property 'ENGINE_PKI_TRUST_STORE' is 'src/main/resources/truststore'.
> [main] INFO org.ovirt.engine.core.uutils.config.ShellLikeConfd - Value of
> property 'ENGINE_PKI_TRUST_STORE_PASSWORD' is ''.
> [main] INFO org.ovirt.engine.core.uutils.config.ShellLikeConfd - Value of
> property 'ENGINE_PKI_TRUST_STORE_TYPE' is 'JKS'.
> [main] INFO org.ovirt.engine.core.uutils.config.ShellLikeConfd - Value of
> property 'ENGINE_PROXY_ENABLED' is 'false'.
> [main] INFO org.ovirt.engine.core.uutils.config.ShellLikeConfd - Value of
> property 'ENGINE_PROXY_HTTPS_PORT' is '443'.
> [main] INFO org.ovirt.engine.core.uutils.config.ShellLikeConfd - Value of
> property 'ENGINE_PROXY_HTTP_PORT' is '80'.
> [main] INFO org.ovirt.engine.core.uutils.config.ShellLikeConfd - Value of
> property 'ENGINE_USR' is './'.
> [main] INFO org.ovirt.engine.core.uutils.config.ShellLikeConfd - Value of
> property 'JBOSS_HOME' is '/usr/share/ovirt-engine-wildfly'.
> Exception:java.lang.RuntimeException: Failed to local keystore
> '/home/pencc/eclipse-workspace/engine_rpc_test/src/main/resources/truststore'
>
> but but i coped /etc/pki/ovirt-engine/.truststore to there, so this file is
> exist:
> $ ls
> /home/pencc/eclipse-workspace/engine_rpc_test/src/main/resources/truststore
> -l
> -rw-rw-r-- 1 pencc pencc 1003 9月   7 13:26
> /home/pencc/eclipse-workspace/engine_rpc_test/src/main/resources/truststore
>
> maybe ENGINE_PKI_TRUST_STORE is not .truststore or truststore is not right?
>
> I use this in test to set property:
>     static {
>         try {
>             System.setProperty("ovirt-engine.config.defaults",
> "src/main/resources/engine.conf.defaults");
>             //System.setProperty("ovirt-engine.conf",
> "src/main/resources/ovirt-engine.conf");
>         }
>         catch (Exception e) {
>             throw new RuntimeException(e);
>         }
>     }
>
> then in engine.conf.defaults:
> ENGINE_PKI_TRUST_STORE_TYPE=JKS
> ENGINE_PKI_TRUST_STORE=src/main/resources/truststore
>
>
>
>
>
>
>
>
> _______________________________________________
> Devel mailing list
> Devel at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/devel


More information about the Devel mailing list