Tests: Unify core test resources across JUnit and ScalaTest

Fixes a test failure running the ScalaTests under Ant
This commit is contained in:
str4d
2019-08-10 17:19:21 +00:00
parent 8586c28b5f
commit 459eb7fdcd
12 changed files with 7 additions and 19 deletions

View File

@ -10,10 +10,7 @@ import org.scalatest.Matchers
class CertUtilSpec extends FunSpec with Matchers {
describe("CertUtil") {
// For some stupid gradle issues, it don't copies reosurces. So hacky way.
// When added to junit directory, it get copied. Until a better way is found,
// this is the non-optimal solution.
val certFileUrl = getClass.getResource("/resources/meeh_at_mail.i2p.crt")
val certFileUrl = getClass.getResource("/meeh_at_mail.i2p.crt")
val certFile = new File(certFileUrl.toURI)
it("should be able to read a certificate") {

View File

@ -17,10 +17,10 @@ class SU3FileSpec extends FunSpec with Matchers {
}
describe("SU3File") {
val certFileUrl = getClass.getResource("/resources/meeh_at_mail.i2p.crt")
val certFileUrl = getClass.getResource("/meeh_at_mail.i2p.crt")
val certFile = new File(certFileUrl.toURI)
val seedFileUrl = getClass.getResource("/resources/i2pseeds.su3")
val seedFileUrl = getClass.getResource("/i2pseeds.su3")
val seedFile = new File(seedFileUrl.toURI)
it("should be able to verify a valid file") {