Skip to content

Commit

Permalink
Disable whitelisting in repl and integration tests
Browse files Browse the repository at this point in the history
A few things are not whitelisted anymore after removing the ops
dependency here or there. Whitelisting in these tests will be added back
when decoupling the Ammonite and user-facing Scala versions.
  • Loading branch information
alexarchambault committed Dec 3, 2020
1 parent 50b0e0f commit 68bdbe7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion amm/repl/src/test/scala/ammonite/TestRepl.scala
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class TestRepl {
scriptCodeWrapper = codeWrapper,
alreadyLoadedDependencies = Defaults.alreadyLoadedDependencies("amm-test-dependencies.txt"),
importHooks = ImportHook.defaults,
classPathWhitelist = ammonite.repl.Repl.getClassPathWhitelist(thin = true)
classPathWhitelist = ammonite.repl.Repl.getClassPathWhitelist(thin = false)
)

}catch{ case e: Throwable =>
Expand Down
11 changes: 8 additions & 3 deletions integration/src/test/scala/ammonite/integration/BasicTests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ object BasicTests extends TestSuite{

def execWithJavaOptsSet(name: os.RelPath, home: os.Path) = os.proc(
executable,
"--thin",
"--no-remote-logging",
"-h",
home,
Expand Down Expand Up @@ -113,7 +112,6 @@ object BasicTests extends TestSuite{
// from ivy, and make use of `cd!` and `wd` inside the executed script.
val res = os.proc(
executable,
"--thin",
"--no-home-predef",
"--predef",
exampleBarePredef,
Expand Down Expand Up @@ -168,7 +166,14 @@ object BasicTests extends TestSuite{
}

test("classloaders"){
val evaled = exec(os.rel / 'basic / "Resources.sc")
val evaled = execBase(
os.rel / 'basic / "Resources.sc",
Nil,
ammonite.ops.tmp.dir(),
Nil,
thin = false,
Nil
)
assert(evaled.out.string.contains("1745"))
}
test("testSilentScriptRunning"){
Expand Down

0 comments on commit 68bdbe7

Please sign in to comment.