No bean found during integration testing

Hi,

I'm working on a new plugin and I'd like to use both unit and integration testing from the start. Getting the basics right worked just fine, but I am now trying to test a custom content type and the integration tests fail due to not being able to find a bean. The plugin loads perfectly fine otherwise and I have no idea as to why it refuses to run the tests.

This is the error I get upon running atlas-integration-test on my plugin:

[INFO] [talledLocalContainer] org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'de.cyclonit.confluence.plugin.content.ContentType': Unsatisfied dependency expressed through constructor argument with index 0 of type [com.atlassian.confluence.core.ContentPermissionManager]: No qualifying bean of type [com.atlassian.confluence.core.ContentPermissionManager] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}; nested exception is org.springframework.beans.factory
.NoSuchBeanDefinitionException: No qualifying bean of type [com.atlassian.confluence.core.ContentPermissionManager] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}
[INFO] [talledLocalContainer]   at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:749)
[INFO] [talledLocalContainer]   at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:185)
[INFO] [talledLocalContainer]   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1143)
[INFO] [talledLocalContainer]   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1046)
[INFO] [talledLocalContainer]   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510)
[INFO] [talledLocalContainer]   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
[INFO] [talledLocalContainer]   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:342)
[INFO] [talledLocalContainer]   at sun.reflect.GeneratedMethodAccessor171.invoke(Unknown Source)
[INFO] [talledLocalContainer]   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[INFO] [talledLocalContainer]   at java.lang.reflect.Method.invoke(Method.java:497)
[INFO] [talledLocalContainer]   at com.atlassian.plugin.osgi.spring.DefaultSpringContainerAccessor.createBean(DefaultSpringContainerAccessor.java:97)
[INFO] [talledLocalContainer]   at com.atlassian.confluence.plugin.ConfluencePluginUtils.instantiatePluginModule(ConfluencePluginUtils.java:150)
[INFO] [talledLocalContainer]   at com.atlassian.confluence.content.ContentTypeModuleDescriptor.createModule(ContentTypeModuleDescriptor.java:61)
[INFO] [talledLocalContainer]   at com.atlassian.confluence.content.ContentTypeModuleDescriptor.createModule(ContentTypeModuleDescriptor.java:21)
[INFO] [talledLocalContainer]   at com.atlassian.confluence.plugin.module.PluginModuleHolder.createModule(PluginModuleHolder.java:70)
[INFO] [talledLocalContainer]   at com.atlassian.confluence.plugin.module.PluginModuleHolder.getModule(PluginModuleHolder.java:93)
[...]

 All resources regarding integration testing in Confluence I could find are entirely out of date and haven't been of any help thus far.

0 answers

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Mar 12, 2019 in Confluence

Confluence Admin Certification now $150 for Community Members

More and more people are building their careers with Atlassian, and we want you to be at the front of this wave! Important Dates Start the Certification Prep Course by 2 April 2019 Take your e...

1,479 views 4 13
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you