Skip to content

Commit 82dd663

Browse files
authored
Fix functional tests for MacOS users (#321)
Update `AbstractGraalVMMavenFunctionalTest` web server setup to use real paths. Prior to this commit, when running the functional tests on MacOS the web server would not serve the `target/repo.zip` file. This is due to the fact that the temp folder on MacOS can be a symlink which by default Jetty will not serve. Switching the resource base to the real folder fixes the problem.
1 parent 2a270be commit 82dd663

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

native-maven-plugin/src/testFixtures/groovy/org/graalvm/buildtools/maven/AbstractGraalVMMavenFunctionalTest.groovy

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ package org.graalvm.buildtools.maven
4343

4444
import org.eclipse.jetty.server.Server
4545
import org.eclipse.jetty.server.ServerConnector
46+
import org.eclipse.jetty.server.SymlinkAllowedResourceAliasChecker
4647
import org.eclipse.jetty.server.handler.ContextHandler
4748
import org.eclipse.jetty.server.handler.ResourceHandler
4849
import spock.lang.Specification
@@ -109,7 +110,7 @@ abstract class AbstractGraalVMMavenFunctionalTest extends Specification {
109110
connector = new ServerConnector(server)
110111
server.addConnector(connector)
111112
def handler = new ResourceHandler()
112-
handler.resourceBase = testDirectory.toString()
113+
handler.resourceBase = testDirectory.toRealPath().toString()
113114
handler.directoriesListed = true
114115
def ctx = new ContextHandler("/")
115116
ctx.handler = handler

0 commit comments

Comments
 (0)