repoConfig.setBlockRedeployments( false );
content.setRepository( repoConfig );
archivaConfigControl.expectAndReturn( archivaConfig.getConfiguration(), config );
repoFactoryControl.expectAndReturn( repoFactory.getManagedRepositoryContent( REPOSITORY_ID ), content );
auditLogsDaoControl.expectAndReturn( auditLogsDao.saveAuditLogs( new ArchivaAuditLogs() ), null );
archivaConfigControl.replay();
repoFactoryControl.replay();
auditLogsDaoControl.replay();
String returnString = uploadAction.doUpload();
assertEquals( Action.SUCCESS, returnString );
archivaConfigControl.verify();
repoFactoryControl.verify();
auditLogsDaoControl.verify();
archivaConfigControl.reset();
repoFactoryControl.reset();
auditLogsDaoControl.reset();
auditLogsDaoControl.setDefaultMatcher( MockControl.ALWAYS_MATCHER );
String repoLocation = config.findManagedRepositoryById( REPOSITORY_ID ).getLocation();
assertAllArtifactsIncludingSupportArtifactsArePresent( repoLocation );
verifyChecksums( repoLocation );
// RE-upload artifact
setUploadParameters( "1.0", null,
new File( getBasedir(),
"target/test-classes/upload-artifact-test/artifact-to-be-reuploaded.jar" ),
null, true );
archivaConfigControl.expectAndReturn( archivaConfig.getConfiguration(), config );
repoFactoryControl.expectAndReturn( repoFactory.getManagedRepositoryContent( REPOSITORY_ID ), content );
auditLogsDaoControl.expectAndReturn( auditLogsDao.saveAuditLogs( new ArchivaAuditLogs() ), null );
archivaConfigControl.replay();
repoFactoryControl.replay();
auditLogsDaoControl.replay();