cancel
Showing results for 
Search instead for 
Did you mean: 

Getting error while running integration test case for custom model

kiranmaik
Champ in-the-making
Champ in-the-making

Below is the sample testcase snippet for custommodel  .While executing ./run.sh build_test I am getting the below error  from the default sample tests .

 com.test.platformsample.CustomContentModelIT: No authentication provider for net.sf.acegisecurity.providers.UsernamePasswordAuthenticationToken

private NodeRef getCompanyHomeNodeRef() {
return getServiceRegistry().getNodeLocatorService().getNode(CompanyHomeNodeLocator.NAME, null, null);
}
NodeRef parentFolderNodeRef = getCompanyHomeNodeRef();
QName associationQName = QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, name);
properties.put(ContentModel.PROP_NAME, name);
ChildAssociationRef parentChildAssocRef = getServiceRegistry().getNodeService().createNode(
parentFolderNodeRef, ContentModel.ASSOC_CONTAINS, associationQName, type, properties);
1 REPLY 1

abhinavmishra14
World-Class Innovator
World-Class Innovator

Interesting, Could you please share the full IT class here?

You would want to compare your code with these samples:

https://github.com/abhinavmishra14/specialize-type-demo/blob/main/specialize-type-demo-integration-t... 

https://github.com/abhinavmishra14/specialize-type-demo/blob/main/specialize-type-demo-integration-t...  

~Abhinav
(ACSCE, AWS SAA, Azure Admin)