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
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Friday in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

301 views 11 10
Join discussion

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