diff options
author | Matthias Sohn <matthias.sohn@sap.com> | 2018-11-28 20:16:23 +0100 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2018-11-28 20:18:04 +0100 |
commit | 2532fa74c21166971ba05437e14786d93615bc82 (patch) | |
tree | c4d82d6829d050b2336f4ef2552aed9b0d25e975 | |
parent | 4b3c87f6392a7c514ee8552b722070472d9590e9 (diff) | |
download | jgit-2532fa74c21166971ba05437e14786d93615bc82.tar.gz jgit-2532fa74c21166971ba05437e14786d93615bc82.zip |
Fix running tests from bazel
The new dependency to mockito for JDKHttpConnectionTest wasn't added for
bazel test run.
Change-Id: Ie967b7152340a0b3e05cced7eadfd40af78d9995
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
-rw-r--r-- | WORKSPACE | 26 | ||||
-rw-r--r-- | lib/BUILD | 12 | ||||
-rw-r--r-- | org.eclipse.jgit.test/BUILD | 1 | ||||
-rw-r--r-- | org.eclipse.jgit.test/tests.bzl | 4 |
4 files changed, 43 insertions, 0 deletions
@@ -131,6 +131,32 @@ maven_jar( ) maven_jar( + name = "mockito", + artifact = "org.mockito:mockito-core:2.13.0", + sha1 = "8e372943974e4a121fb8617baced8ebfe46d54f0", +) + +BYTE_BUDDY_VERSION = "1.7.9" + +maven_jar( + name = "byte_buddy", + artifact = "net.bytebuddy:byte-buddy:" + BYTE_BUDDY_VERSION, + sha1 = "51218a01a882c04d0aba8c028179cce488bbcb58", +) + +maven_jar( + name = "byte_buddy_agent", + artifact = "net.bytebuddy:byte-buddy-agent:" + BYTE_BUDDY_VERSION, + sha1 = "a6c65f9da7f467ee1f02ff2841ffd3155aee2fc9", +) + +maven_jar( + name = "objenesis", + artifact = "org.objenesis:objenesis:2.6", + sha1 = "639033469776fd37c08358c6b92a4761feb2af4b", +) + +maven_jar( name = "gson", artifact = "com.google.code.gson:gson:2.8.2", sha1 = "3edcfe49d2c6053a70a2a47e4e1c2f94998a49cf", @@ -159,6 +159,18 @@ java_library( ) java_library( + name = "mockito", + testonly = 1, + visibility = ["//visibility:public"], + exports = [ + "@mockito//jar", + "@byte_buddy//jar", + "@byte_buddy_agent//jar", + "@objenesis//jar", + ], +) + +java_library( name = "servlet-api", visibility = [ "//org.eclipse.jgit.http.apache:__pkg__", diff --git a/org.eclipse.jgit.test/BUILD b/org.eclipse.jgit.test/BUILD index 37cfa8a24b..0b18e5ef7d 100644 --- a/org.eclipse.jgit.test/BUILD +++ b/org.eclipse.jgit.test/BUILD @@ -50,6 +50,7 @@ java_library( deps = [ "//lib:jsch", "//lib:junit", + "//lib:mockito", "//org.eclipse.jgit:jgit", "//org.eclipse.jgit.junit:junit", ], diff --git a/org.eclipse.jgit.test/tests.bzl b/org.eclipse.jgit.test/tests.bzl index 48c3bc36c8..dc2102964f 100644 --- a/org.eclipse.jgit.test/tests.bzl +++ b/org.eclipse.jgit.test/tests.bzl @@ -49,6 +49,10 @@ def tests(tests): "//lib:sshd-sftp", ":sshd-helpers", ] + if src.endswith("JDKHttpConnectionTest.java"): + additional_deps = [ + "//lib:mockito", + ] heap_size = "-Xmx256m" if src.endswith("HugeCommitMessageTest.java"): heap_size = "-Xmx512m" |