mirror of https://github.com/apache/archiva.git
[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) Merged /archiva/trunk:r909454-909456 git-svn-id: https://svn.apache.org/repos/asf/archiva/branches/archiva-1.3.x@909461 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
5f77fddbfb
commit
888eb009b7
|
@ -106,3 +106,8 @@ NETWORKPROXY_PASSWORD=admin123
|
||||||
# Browse - MRM-1278 test
|
# Browse - MRM-1278 test
|
||||||
SNAPSHOTS_REPOSITORY=snapshots
|
SNAPSHOTS_REPOSITORY=snapshots
|
||||||
RELEASES_REPOSITORY=releases
|
RELEASES_REPOSITORY=releases
|
||||||
|
|
||||||
|
# Audit Log Report - MRM-1304
|
||||||
|
AUDITLOG_GROUPID=group.id
|
||||||
|
AUDITLOG_EXPECTED_ARTIFACT=group/id/test/1.0/test-1.0.jar
|
||||||
|
|
||||||
|
|
|
@ -164,4 +164,27 @@ public class AuditLogsReportTest
|
||||||
clickLinkWithText( "Logout" );
|
clickLinkWithText( "Logout" );
|
||||||
login( getProperty( "ADMIN_USERNAME" ), getProperty( "ADMIN_PASSWORD" ) );
|
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 );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -160,7 +160,8 @@ public class ViewAuditLogReportAction
|
||||||
|
|
||||||
if ( groupId != null && !"".equals( groupId.trim() ) )
|
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
|
else
|
||||||
{
|
{
|
||||||
|
|
2
pom.xml
2
pom.xml
|
@ -28,7 +28,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.apache.archiva</groupId>
|
<groupId>org.apache.archiva</groupId>
|
||||||
<artifactId>archiva-parent</artifactId>
|
<artifactId>archiva-parent</artifactId>
|
||||||
<version>5</version>
|
<version>6-SNAPSHOT</version>
|
||||||
<relativePath>../parent/pom.xml</relativePath>
|
<relativePath>../parent/pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<name>Archiva</name>
|
<name>Archiva</name>
|
||||||
|
|
Loading…
Reference in New Issue