aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-server/src/test
diff options
context:
space:
mode:
authorEvgeny Mandrikov <mandrikov@gmail.com>2011-02-01 04:33:28 +0300
committerEvgeny Mandrikov <mandrikov@gmail.com>2011-02-01 14:59:49 +0300
commit56e588b0e5be949fbd7c64b7e170d5947d7727af (patch)
treec7149f3ccb4dd943294c0e1f64007ca0a498c9d6 /sonar-server/src/test
parent936f7f5f75e4acd3a58e12f67e69d9e24290c91c (diff)
downloadsonarqube-56e588b0e5be949fbd7c64b7e170d5947d7727af.tar.gz
sonarqube-56e588b0e5be949fbd7c64b7e170d5947d7727af.zip
Disable downloading for certain files from BatchResourcesServlet
Diffstat (limited to 'sonar-server/src/test')
-rw-r--r--sonar-server/src/test/java/org/sonar/server/plugins/BatchResourcesServletTest.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/sonar-server/src/test/java/org/sonar/server/plugins/BatchResourcesServletTest.java b/sonar-server/src/test/java/org/sonar/server/plugins/BatchResourcesServletTest.java
index d5bf6699540..192854a08d5 100644
--- a/sonar-server/src/test/java/org/sonar/server/plugins/BatchResourcesServletTest.java
+++ b/sonar-server/src/test/java/org/sonar/server/plugins/BatchResourcesServletTest.java
@@ -75,4 +75,20 @@ public class BatchResourcesServletTest {
assertThat(servlet.getLibs().size(), is(1));
assertThat(servlet.getLibs().get(0), is("sonar-core-2.6.jar"));
}
+
+ @Test
+ public void shouldIgnore() {
+ assertThat(BatchResourcesServlet.isIgnored("sonar-batch-2.6-SNAPSHOT.jar"), is(false));
+ assertThat(BatchResourcesServlet.isIgnored("derby-10.6.1.0.jar"), is(true));
+ assertThat(BatchResourcesServlet.isIgnored("derbyclient-10.6.1.0.jar"), is(true));
+ assertThat(BatchResourcesServlet.isIgnored("derbynet-10.6.1.0.jar"), is(true));
+ assertThat(BatchResourcesServlet.isIgnored("mysql-connector-java-5.1.13.jar"), is(true));
+ assertThat(BatchResourcesServlet.isIgnored("postgresql-9.0-801.jdbc3.jar"), is(true));
+ assertThat(BatchResourcesServlet.isIgnored("jtds-1.2.4.jar"), is(true));
+ assertThat(BatchResourcesServlet.isIgnored("jfreechart-1.0.9.jar"), is(true));
+ assertThat(BatchResourcesServlet.isIgnored("eastwood-1.1.0.jar"), is(true));
+ assertThat(BatchResourcesServlet.isIgnored("jetty-util-6.1.24.jar"), is(true));
+ assertThat(BatchResourcesServlet.isIgnored("jruby-complete-1.5.6.jar"), is(true));
+ assertThat(BatchResourcesServlet.isIgnored("jruby-rack-1.0.5.jar"), is(true));
+ }
}