addontest.zip (503.0 KB)
I have attached a completely clean project with the connected dependencies jmix security and a newly created jmix add-on. When attempting to run an empty test, the following error occurs:
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘core_UserSubstitutionManager’: Unsatisfied dependency expressed through field ‘authenticationManager’: Error creating bean with name ‘io.jmix.security.SecurityConfiguration’: Unsatisfied dependency expressed through field ‘userRepository’: No qualifying bean of type ‘io.jmix.core.security.UserRepository’ available: expected at least 1 bean which qualifies as an autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
I tried copying it from the same default application where it is created, but that didn’t work, and it is not being picked up in the tests.
An even bigger problem arises in a situation where:
Addon “B” depends on Addon “A”, which in turn depends on jmix security. As a result, it also does not allow the test to run, even though Addon “B” itself does not have a direct dependency on jmix security.
This can be bypassed by creating a stub UserRepository, but even after that, many issues still arise with the initialization of DataManager and similar problems.
Because of this, I ask knowledgeable people for help in solving the issue and advising on how to run integration tests.
Thank you!