Skip to content

Commit 0a00227

Browse files
author
Topher Anderson
committed
make conda dir for test
1 parent e77fd90 commit 0a00227

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

core/src/test/scala/org/apache/spark/api/conda/CondaEnvironmentManagerTest.scala

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,18 +51,20 @@ class CondaEnvironmentManagerTest extends org.apache.spark.SparkFunSuite with Te
5151
"https://myuser:[email protected]/whatever/else/linux-64/package-0.0.1-py_0.tar.bz2"
5252
val userInfo = "anotheruser:theirpassword"
5353

54-
val path = tempDir.toPath.resolve("dummy-conda.bin")
55-
Files.createFile(path)
54+
val binaryPath = tempDir.toPath.resolve("dummy-conda.bin")
55+
val condaEnvDir = tempDir.toPath.resolve("test-conda-env")
56+
Files.createFile(binaryPath)
57+
Files.createDirectory(condaEnvDir)
5658

5759
val conf = new SparkConf()
58-
conf.set(CONDA_BINARY_PATH, path.toString)
60+
conf.set(CONDA_BINARY_PATH, binaryPath.toString)
5961
conf.set(CONDA_BOOTSTRAP_MODE, "File")
6062
conf.set(CONDA_BOOTSTRAP_PACKAGE_URLS, Seq(packageUrl))
6163
conf.set(CONDA_BOOTSTRAP_PACKAGE_URLS_USER_INFO, userInfo)
6264

6365
val thrown = intercept[IllegalArgumentException] {
6466
CondaEnvironmentManager.fromConf(conf)
65-
.createWithFile("test-conda-env", Seq(packageUrl), Some(userInfo))
67+
.createWithFile(condaEnvDir.toString, Seq(packageUrl), Some(userInfo))
6668
}
6769

6870
assert(thrown.getMessage ===

0 commit comments

Comments
 (0)