[MRM-1304] Query using Group ID field in audit log report uses '/' as a separator instead of '.'

Submitted by: Adelita L. Padilla (applied with modifications to test)


git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@909454 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Porter 2010-02-12 15:20:38 +00:00
parent be5981bf16
commit 20c60cb1c1
3 changed files with 30 additions and 1 deletions

View File

@ -106,3 +106,8 @@ NETWORKPROXY_PASSWORD=admin123
# Browse - MRM-1278 test
SNAPSHOTS_REPOSITORY=snapshots
RELEASES_REPOSITORY=releases
# Audit Log Report - MRM-1304
AUDITLOG_GROUPID=group.id
AUDITLOG_EXPECTED_ARTIFACT=group/id/test/1.0/test-1.0.jar

View File

@ -161,4 +161,27 @@ public class AuditLogsReportTest
clickLinkWithText( "Logout" );
login( getProperty( "ADMIN_USERNAME" ), getProperty( "ADMIN_PASSWORD" ) );
}
@Test (dependsOnMethods = { "testAddArtifactValidValues" }, groups = "requiresUpload")
public void testViewAuditLogsReportForGroupId()
{
String groupId = getProperty("AUDITLOG_GROUPID");
String artifactId = getProperty("ARTIFACTID");
String version = getProperty("VERSION");
String packaging = getProperty("PACKAGING");
String repositoryId = getProperty("REPOSITORYID");
String expectedArtifact = getProperty("AUDITLOG_EXPECTED_ARTIFACT");
addArtifact( groupId, artifactId, version, packaging, getProperty( "SNAPSHOT_ARTIFACTFILEPATH" ), repositoryId );
goToAuditLogReports();
selectValue( "repository", repositoryId );
setFieldValue( "groupId", groupId );
submit();
assertAuditLogsReportPage();
assertTextPresent( expectedArtifact );
assertTextPresent( repositoryId );
}
}

View File

@ -160,7 +160,8 @@ public class ViewAuditLogReportAction
if ( groupId != null && !"".equals( groupId.trim() ) )
{
artifact = groupId + ( ( artifactId != null && !"".equals( artifactId.trim() ) ) ? ( "/" + artifactId + "/%" ) : "%" );
String modifiedGroupId = groupId.replace( ".", "/" );
artifact = modifiedGroupId + ( ( artifactId != null && !"".equals( artifactId.trim() ) ) ? ( "/" + artifactId + "/%" ) : "%" );
}
else
{