]> source.dussan.org Git - archiva.git/commitdiff
[MRM-1304] Query using Group ID field in audit log report uses '/' as a separator...
authorBrett Porter <brett@apache.org>
Fri, 12 Feb 2010 15:29:47 +0000 (15:29 +0000)
committerBrett Porter <brett@apache.org>
Fri, 12 Feb 2010 15:29:47 +0000 (15:29 +0000)
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

archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/testng.properties
archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/AuditLogsReportTest.java
archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/reports/ViewAuditLogReportAction.java
pom.xml

index 778d802e51bf9ccc24fd6979f19cae18d3c0f9dc..8cce0ef131534ea17beb3b528cb71a0431e6ad22 100644 (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
+
index 0f3dcc6c45572fd70087a6cbf7749d07f516de2c..dbe3d08ed49f4266835c3ccc9210365a1f0ab87d 100644 (file)
@@ -164,4 +164,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 );
+    }
 }
index 5c0aec7125de135700b28c9db2e4e6e3541194d5..bc121ca1b7baaec993a42686c69ee0b7fe55a4d4 100644 (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
         {               
diff --git a/pom.xml b/pom.xml
index 3c6a2f3a408e152c9f8f8a67b1b88409a3174ad4..3c3089a722fb6e8a064f334392467d20bcee05fa 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -28,7 +28,7 @@
   <parent>
     <groupId>org.apache.archiva</groupId>
     <artifactId>archiva-parent</artifactId>
-    <version>5</version>
+    <version>6-SNAPSHOT</version>
     <relativePath>../parent/pom.xml</relativePath>
   </parent>
   <name>Archiva</name>