Reputation: 5430
We can access HMC in JUnit tenant by hitting the below URL
https://localhost:9002/hmc_junit/hybris
which is defined in tenant_junit.properties
like this hmc.webroot=/hmc_junit
But I havn't seen anywhere URL to access Backoffice in JUnit Tenant.
Can anybody help me please to access Backoffice in JUnit Tenant ?
Upvotes: 3
Views: 1529
Reputation: 782
Config values inside the junit local properties that worked for me:
backoffice.library.home=${data.home}/junit
backoffice.webroot=/junit_backoffice
For more info see: https://help.sap.com/viewer/5c9ea0c629214e42b727bf08800d8dfa/1811/en-US/c7e1bf2832414c8ea15c001d5cf1defd.html
Upvotes: 0
Reputation: 11
For Hybris 6.7, to me the following steps were sufficient:
in config/local_tenant_junit.properties , add
backoffice.webroot=/backoffice_junit
ant server
this puts the endpoint into ${tomcat.webapps} in server.xml template resulting in:
<Context path="/backoffice_junit"...
being added to your bin/platform/tomcat/conf/server.xml
Then when you open https://localhost:9002/backoffice_junit , the DataSourceSwitchingFilter gets current tenant from a ThreadLocal and activates its dataSource.
Upvotes: 1
Reputation: 2989
I was looking for it everywhere as well, couldn't find any documentation in the wiki... It doesn't seem to be officially supported but here is what I found.
Under Hybris 6.3 there is no junit context path for the backoffice application. Here is how you could add one :
Create a file named : local_tenant_junit.properties under your configuration folder, it should contain :
backoffice.webroot=/backoffice_junit
Create a file for customization inside your config folder customize/ext-backoffice/backoffice/web/webroot/WEB-INF/backoffice-spring-filter.xml. Copy the content of the original file and update the backofficeFilterChain bean. We want to use the dynamicTenantActivationFilter instead of the tenantActivationFilter) :
<bean id="backofficeFilterChain" class="de.hybris.platform.servicelayer.web.PlatformFilterChain">
<constructor-arg>
<list>
<ref bean="log4jFilter"/>
<ref bean="dynamicTenantActivationFilter"/>
<ref bean="backofficeRedirectFilter"/>
<ref bean="sessionFilter"/>
<ref bean="backofficeDataSourceSwitchingFilter"/>
<ref bean="backofficeCatalogVersionActivationFilter"/>
<ref bean="backofficeContextClassloaderFilter"/>
<ref bean="backofficeSecureMediaFilter" />
</list>
</constructor-arg>
Execute ant clean all customize
Check that in bin/platform/tomcat/conf/server.xml you now have a new context backoffice_junit
Start your server, you can now access the backoffice application for master and junit tenant
Upvotes: 3