Merge changes I487a30fb,I82a01b5f

* changes:
  Ensure all http tests are run and fix broken tests
  buck: run http tests
This commit is contained in:
Shawn Pearce 2016-01-03 18:24:33 -05:00 committed by Gerrit Code Review @ Eclipse.org
commit 8d5d144530
5 changed files with 122 additions and 3 deletions

56
lib/jetty/BUCK Normal file
View File

@ -0,0 +1,56 @@
VERSION = '9.2.13.v20150730'
GROUP = 'org.eclipse.jetty'
maven_jar(
name = 'servlet',
bin_sha1 = '5ad6e38015a97ae9a60b6c2ad744ccfa9cf93a50',
src_sha1 = '78fbec19321150552d91f9e079c2f2ca33222b01',
group = GROUP,
artifact = 'jetty-servlet',
version = VERSION,
)
maven_jar(
name = 'security',
bin_sha1 = 'cc7c7f27ec4cc279253be1675d9e47e58b995943',
src_sha1 = '75632ebdf8bd651faafb97106c92496db59e165d',
group = GROUP,
artifact = 'jetty-security',
version = VERSION,
)
maven_jar(
name = 'server',
bin_sha1 = '5be7d1da0a7abffd142de3091d160717c120b6ab',
src_sha1 = '203e123f83efe2a5b8a9c74854c7897fe3563302',
group = GROUP,
artifact = 'jetty-server',
version = VERSION,
)
maven_jar(
name = 'http',
bin_sha1 = '23a745d9177ef67ef53cc46b9b70c5870082efc2',
src_sha1 = '5f87f7ff2057cd4b0995bc4fffe17b2aff64c130',
group = GROUP,
artifact = 'jetty-http',
version = VERSION,
)
maven_jar(
name = 'io',
bin_sha1 = '7a351e6a1b63dfd56b6632623f7ca2793ffb67ad',
src_sha1 = 'bbd61a84b748fc295456e1c5c3070aaf40a68f62',
group = GROUP,
artifact = 'jetty-io',
version = VERSION,
)
maven_jar(
name = 'util',
bin_sha1 = 'c101476360a7cdd0670462de04053507d5e70c97',
src_sha1 = '15ceecce141971b4e0facb861b3d10120ad6ce03',
group = GROUP,
artifact = 'jetty-util',
version = VERSION,
)

View File

@ -0,0 +1,40 @@
TESTS = glob(['tst/**/*.java'])
for t in TESTS:
n = t[len('tst/'):len(t)-len('.java')].replace('/', '.')
java_test(
name = n,
labels = ['http'],
srcs = [t],
deps = [
':helpers',
'//org.eclipse.jgit:jgit',
'//org.eclipse.jgit.http.apache:http-apache',
'//org.eclipse.jgit.http.server:jgit-servlet',
'//org.eclipse.jgit.junit:junit',
'//org.eclipse.jgit.junit.http:junit-http',
'//lib:hamcrest-core',
'//lib:hamcrest-library',
'//lib:junit',
'//lib:servlet-api',
'//lib/jetty:http',
'//lib/jetty:io',
'//lib/jetty:server',
'//lib/jetty:servlet',
'//lib/jetty:security',
'//lib/jetty:util',
],
source_under_test = ['//org.eclipse.jgit.http.server:jgit-servlet'],
)
java_library(
name = 'helpers',
srcs = glob(['src/**/*.java']),
deps = [
'//org.eclipse.jgit:jgit',
'//org.eclipse.jgit.http.server:jgit-servlet',
'//org.eclipse.jgit.junit:junit',
'//org.eclipse.jgit.junit.http:junit-http',
'//lib:junit',
],
)

View File

@ -134,6 +134,10 @@
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>-Djava.io.tmpdir=${project.build.directory} -Xmx300m</argLine>
<includes>
<include>**/*Test.java</include>
<include>**/*Tests.java</include>
</includes>
</configuration>
</plugin>
</plugins>

View File

@ -303,7 +303,7 @@ public void testListRemote_Dumb_NeedsAuth() throws Exception {
fail("connection opened even info/refs needs auth basic");
} catch (TransportException err) {
String exp = dumbAuthBasicURI + ": "
+ JGitText.get().notAuthorized;
+ JGitText.get().noCredentialsProvider;
assertEquals(exp, err.getMessage());
}
} finally {
@ -347,7 +347,7 @@ public void testListRemote_Smart_UploadPackNeedsAuth() throws Exception {
fail("connection opened even though service disabled");
} catch (TransportException err) {
String exp = smartAuthBasicURI + ": "
+ JGitText.get().notAuthorized;
+ JGitText.get().noCredentialsProvider;
assertEquals(exp, err.getMessage());
}
} finally {
@ -369,7 +369,8 @@ public void testListRemote_Smart_UploadPackDisabled() throws Exception {
t.openFetch();
fail("connection opened even though service disabled");
} catch (TransportException err) {
String exp = smartAuthNoneURI + ": Git access forbidden";
String exp = smartAuthNoneURI + ": "
+ JGitText.get().serviceNotEnabledNoName;
assertEquals(exp, err.getMessage());
}
} finally {

View File

@ -0,0 +1,18 @@
java_library(
name = 'junit-http',
srcs = glob(['src/**']),
resources = glob(['resources/**']),
provided_deps = [
'//org.eclipse.jgit:jgit',
'//org.eclipse.jgit.http.server:jgit-servlet',
'//org.eclipse.jgit.junit:junit',
'//lib:junit',
'//lib:servlet-api',
'//lib/jetty:http',
'//lib/jetty:server',
'//lib/jetty:servlet',
'//lib/jetty:security',
'//lib/jetty:util',
],
visibility = ['PUBLIC'],
)