]> source.dussan.org Git - archiva.git/commitdiff
adjust tests to work even if they are exported from SVN rather than a checkout
authorBrett Porter <brett@apache.org>
Tue, 19 Sep 2006 05:09:52 +0000 (05:09 +0000)
committerBrett Porter <brett@apache.org>
Tue, 19 Sep 2006 05:09:52 +0000 (05:09 +0000)
git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@447735 13f79535-47bb-0310-9956-ffa450edef68

archiva-discoverer/src/test/java/org/apache/maven/archiva/discoverer/DefaultArtifactDiscovererTest.java
archiva-discoverer/src/test/java/org/apache/maven/archiva/discoverer/LegacyArtifactDiscovererTest.java
archiva-discoverer/src/test/legacy-repository/CVS/Root [new file with mode: 0644]
archiva-discoverer/src/test/repository/CVS/Root [new file with mode: 0644]

index 0eb75782639ee0b925fc95242c7b1ba25f769961..5c1529f3d7e0122031a94596da5fd22d2dd5750e 100644 (file)
@@ -63,7 +63,7 @@ public class DefaultArtifactDiscovererTest
 
             String path = dPath.getPath();
 
-            boolean b = path.indexOf( ".svn" ) >= 0;
+            boolean b = path.indexOf( "CVS" ) >= 0;
             if ( b )
             {
                 found = true;
@@ -75,6 +75,7 @@ public class DefaultArtifactDiscovererTest
         for ( Iterator i = artifacts.iterator(); i.hasNext(); )
         {
             Artifact a = (Artifact) i.next();
+            assertFalse( "Check not CVS", a.getFile().getPath().indexOf( "CVS" ) >= 0 );
             assertFalse( "Check not .svn", a.getFile().getPath().indexOf( ".svn" ) >= 0 );
         }
     }
index 9694c87bf259d8065d8566b81265b305f5a72b88..b8b2b98895b1c5c3f2a3284d7962b4b9fe40b241 100644 (file)
@@ -60,7 +60,7 @@ public class LegacyArtifactDiscovererTest
 
             String path = dPath.getPath();
 
-            if ( path.indexOf( ".svn" ) >= 0 )
+            if ( path.indexOf( "CVS" ) >= 0 )
             {
                 found = true;
                 assertEquals( "Check comment", "Artifact was in the specified list of exclusions", dPath.getComment() );
@@ -71,6 +71,7 @@ public class LegacyArtifactDiscovererTest
         for ( Iterator i = artifacts.iterator(); i.hasNext(); )
         {
             Artifact a = (Artifact) i.next();
+            assertFalse( "Check not CVS", a.getFile().getPath().indexOf( "CVS" ) >= 0 );
             assertFalse( "Check not .svn", a.getFile().getPath().indexOf( ".svn" ) >= 0 );
         }
     }
diff --git a/archiva-discoverer/src/test/legacy-repository/CVS/Root b/archiva-discoverer/src/test/legacy-repository/CVS/Root
new file mode 100644 (file)
index 0000000..2e65f24
--- /dev/null
@@ -0,0 +1 @@
+not a real CVS root - for testing exclusions
diff --git a/archiva-discoverer/src/test/repository/CVS/Root b/archiva-discoverer/src/test/repository/CVS/Root
new file mode 100644 (file)
index 0000000..2e65f24
--- /dev/null
@@ -0,0 +1 @@
+not a real CVS root - for testing exclusions