Run atlas-integration-test using https

Ricardo Herrera November 7, 2019

Hi community, I've developed an integration test for a plugin I'm doing and both works well using http. Problem is that if I use <useHttps>true</useHttps> in the <configuration> of the jira plugin, I got this error while running the test with atlas-integration-test command (atlas-run has no issues using https):

 

Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.605 sec <<< FAILURE!
it.XTest Time elapsed: 0.604 sec <<< ERROR!
org.apache.wink.client.ClientRuntimeException: java.lang.RuntimeException: java.net.ConnectException: Connection refused (Connection refused)
at org.apache.wink.client.internal.ResourceImpl.invoke(ResourceImpl.java:240)
at org.apache.wink.client.internal.ResourceImpl.invoke(ResourceImpl.java:189)
at org.apache.wink.client.internal.ResourceImpl.invokeNoException(ResourceImpl.java:181)
at org.apache.wink.client.internal.ResourceImpl.get(ResourceImpl.java:310)
at com.atlassian.plugins.osgi.test.AtlassianPluginsTestRunner.runViaRestCall(AtlassianPluginsTestRunner.java:103)
at com.atlassian.plugins.osgi.test.AtlassianPluginsTestRunner.run(AtlassianPluginsTestRunner.java:75)

 

System properties printed on console before executing the test are:

<systemPropertyVariables>
<http.port>8442</http.port>
<jira.context>/jira</jira.context>
<reportsDirectory>...</reportsDirectory>
<baseurl.jira>http://hv5khx1:2990/jira</baseurl.jira>
<jira.protocol>https</jira.protocol>
<http.jira.port>8442</http.jira.port>
<jira.xml.data.location>.../src/test/xml</jira.xml.data.location>
<product.jira.id>jira</product.jira.id>
<homedir>...target/jira/home</homedir>
<homedir.jira>...target/jira/home</homedir.jira>
<baseurl>http://hv5khx1:2990/jira</baseurl>
<testGroup>__no_test_group__</testGroup>
<context.path>/jira</context.path>
<product.7.13.3.version>7.13.3</product.7.13.3.version>
<jira.port>2990</jira.port>
<context.jira.path>/jira</context.jira.path>
<http.jira.url>http://hv5khx1:2990/jira</http.jira.url>
<plugin.jar>.../target/jira.server-2.1.0.jar</plugin.jar>
<http.jira.protocol>https</http.jira.protocol>
<jira.host>hv5khx1</jira.host>
</systemPropertyVariables>

 

from them, I can see the baseurl is still http://hv5khx1:2990/jira whereas it should be https://hv5khx1:8442/jira, any idea on how to change this property or in how instruct atlas-integration-test to run tests using https (a.k.a being aware of <useHttps>true</useHttps>)?

1 answer

0 votes
Ricardo Herrera November 7, 2019

I found the way to change this properties and it is done by invoking maven directly with:

mvn integration-test -gs /usr/share/atlassian-plugin-sdk-6.3.10/apache-maven-3.2.1/conf/settings.xml -Dhttp.port='8442' -Dbaseurl.jira='https://hv5khx1:8442/jira' -Dbaseurl='https://hv5khx1:8442/jira' -Dhttp.jira.url='https://hv5khx1:8442/jira'

but on this case I got:

 

Results :

Tests in error:
it.XTest: java.lang.RuntimeException: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Tests run: 1, Failures: 0, Errors: 1, Skipped: 0

 

Could it be the case that integration-test is meant to run only with http?

Suggest an answer

Log in or Sign up to answer