From 67443bea6e04ecfca4d8f25c053846ff0ac4aa7a Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Thu, 12 Apr 2012 22:26:54 +0000 Subject: [PATCH] add unit for test purge of -javadoc.zip artifacts git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1325558 13f79535-47bb-0310-9956-ffa450edef68 --- .../repository/RepositoryPurgeConsumerTest.java | 6 ++++++ .../RetentionCountRepositoryPurgeTest.java | 13 +++++++++++++ ...rake-plugin-1.0RC1-20070504.153317-1-javadoc.jar | 0 ...rake-plugin-1.0RC1-20070504.153317-1-javadoc.zip | 0 ...rake-plugin-1.0RC1-20070504.160758-2-javadoc.jar | 0 ...rake-plugin-1.0RC1-20070504.160758-2-javadoc.zip | 0 ...rake-plugin-1.0RC1-20070505.090015-3-javadoc.jar | 0 ...rake-plugin-1.0RC1-20070505.090015-3-javadoc.zip | 0 8 files changed, 19 insertions(+) create mode 100644 archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070504.153317-1-javadoc.jar create mode 100644 archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070504.153317-1-javadoc.zip create mode 100644 archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070504.160758-2-javadoc.jar create mode 100644 archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070504.160758-2-javadoc.zip create mode 100644 archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070505.090015-3-javadoc.jar create mode 100644 archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070505.090015-3-javadoc.zip diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/consumers/core/repository/RepositoryPurgeConsumerTest.java b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/consumers/core/repository/RepositoryPurgeConsumerTest.java index 81c2353db..9d1e33863 100644 --- a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/consumers/core/repository/RepositoryPurgeConsumerTest.java +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/consumers/core/repository/RepositoryPurgeConsumerTest.java @@ -151,6 +151,8 @@ public class RepositoryPurgeConsumerTest // assert if removed from repo assertDeleted( versionRoot + "/jruby-rake-plugin-1.0RC1-20070504.153317-1.jar" ); + assertDeleted( versionRoot + "/jruby-rake-plugin-1.0RC1-20070504.153317-1-javadoc.jar" ); + assertDeleted( versionRoot + "/jruby-rake-plugin-1.0RC1-20070504.153317-1-javadoc.zip" ); assertDeleted( versionRoot + "/jruby-rake-plugin-1.0RC1-20070504.153317-1.jar.md5" ); assertDeleted( versionRoot + "/jruby-rake-plugin-1.0RC1-20070504.153317-1.jar.sha1" ); assertDeleted( versionRoot + "/jruby-rake-plugin-1.0RC1-20070504.153317-1.pom" ); @@ -158,6 +160,8 @@ public class RepositoryPurgeConsumerTest assertDeleted( versionRoot + "/jruby-rake-plugin-1.0RC1-20070504.153317-1.pom.sha1" ); assertDeleted( versionRoot + "/jruby-rake-plugin-1.0RC1-20070504.160758-2.jar" ); + assertDeleted( versionRoot + "/jruby-rake-plugin-1.0RC1-20070504.160758-2-javadoc.jar" ); + assertDeleted( versionRoot + "/jruby-rake-plugin-1.0RC1-20070504.160758-2-javadoc.zip" ); assertDeleted( versionRoot + "/jruby-rake-plugin-1.0RC1-20070504.160758-2.jar.md5" ); assertDeleted( versionRoot + "/jruby-rake-plugin-1.0RC1-20070504.160758-2.jar.sha1" ); assertDeleted( versionRoot + "/jruby-rake-plugin-1.0RC1-20070504.160758-2.pom" ); @@ -166,6 +170,8 @@ public class RepositoryPurgeConsumerTest // assert if not removed from repo assertExists( versionRoot + "/jruby-rake-plugin-1.0RC1-20070505.090015-3.jar" ); + assertExists( versionRoot + "/jruby-rake-plugin-1.0RC1-20070505.090015-3-javadoc.jar" ); + assertExists( versionRoot + "/jruby-rake-plugin-1.0RC1-20070505.090015-3-javadoc.zip" ); assertExists( versionRoot + "/jruby-rake-plugin-1.0RC1-20070505.090015-3.jar.md5" ); assertExists( versionRoot + "/jruby-rake-plugin-1.0RC1-20070505.090015-3.jar.sha1" ); assertExists( versionRoot + "/jruby-rake-plugin-1.0RC1-20070505.090015-3.pom" ); diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/consumers/core/repository/RetentionCountRepositoryPurgeTest.java b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/consumers/core/repository/RetentionCountRepositoryPurgeTest.java index b2cdce460..b161a1bc5 100644 --- a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/consumers/core/repository/RetentionCountRepositoryPurgeTest.java +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/consumers/core/repository/RetentionCountRepositoryPurgeTest.java @@ -67,8 +67,21 @@ public class RetentionCountRepositoryPurgeTest "1.0RC1-20070504.153317-1", "jruby-rake-plugin-1.0RC1-20070504.153317-1.jar" ); listener.deleteArtifact( metadataRepository, getRepository().getId(), "org.jruby.plugins", "jruby-rake-plugin", "1.0RC1-20070504.153317-1", "jruby-rake-plugin-1.0RC1-20070504.153317-1.pom" ); + listener.deleteArtifact( metadataRepository, getRepository().getId(), "org.jruby.plugins", "jruby-rake-plugin", + "1.0RC1-20070504.153317-1", "jruby-rake-plugin-1.0RC1-20070504.153317-1-javadoc.jar" ); + + listener.deleteArtifact( metadataRepository, getRepository().getId(), "org.jruby.plugins", "jruby-rake-plugin", + "1.0RC1-20070504.153317-1", "jruby-rake-plugin-1.0RC1-20070504.153317-1-javadoc.zip" ); + listener.deleteArtifact( metadataRepository, getRepository().getId(), "org.jruby.plugins", "jruby-rake-plugin", "1.0RC1-20070504.160758-2", "jruby-rake-plugin-1.0RC1-20070504.160758-2.jar" ); + + listener.deleteArtifact( metadataRepository, getRepository().getId(), "org.jruby.plugins", "jruby-rake-plugin", + "1.0RC1-20070504.160758-2", "jruby-rake-plugin-1.0RC1-20070504.160758-2-javadoc.jar" ); + + listener.deleteArtifact( metadataRepository, getRepository().getId(), "org.jruby.plugins", "jruby-rake-plugin", + "1.0RC1-20070504.160758-2", "jruby-rake-plugin-1.0RC1-20070504.160758-2-javadoc.zip" ); + listener.deleteArtifact( metadataRepository, getRepository().getId(), "org.jruby.plugins", "jruby-rake-plugin", "1.0RC1-20070504.160758-2", "jruby-rake-plugin-1.0RC1-20070504.160758-2.pom" ); listenerControl.replay(); diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070504.153317-1-javadoc.jar b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070504.153317-1-javadoc.jar new file mode 100644 index 000000000..e69de29bb diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070504.153317-1-javadoc.zip b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070504.153317-1-javadoc.zip new file mode 100644 index 000000000..e69de29bb diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070504.160758-2-javadoc.jar b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070504.160758-2-javadoc.jar new file mode 100644 index 000000000..e69de29bb diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070504.160758-2-javadoc.zip b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070504.160758-2-javadoc.zip new file mode 100644 index 000000000..e69de29bb diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070505.090015-3-javadoc.jar b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070505.090015-3-javadoc.jar new file mode 100644 index 000000000..e69de29bb diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070505.090015-3-javadoc.zip b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070505.090015-3-javadoc.zip new file mode 100644 index 000000000..e69de29bb