mdedetrich commented on code in PR #445: URL: https://github.com/apache/incubator-pekko-http/pull/445#discussion_r1468273582
########## http-tests/src/test/scala/org/apache/pekko/http/scaladsl/server/directives/FileAndResourceDirectivesSymlinkSpec.scala: ########## @@ -0,0 +1,73 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * license agreements; and to You under the Apache License, version 2.0: + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * This file is part of the Apache Pekko project, which was derived from Akka. + */ + +/* + * Copyright (C) 2009-2022 Lightbend Inc. <https://www.lightbend.com> + */ + +package org.apache.pekko.http.scaladsl.server +package directives + +import java.io.File +import java.nio.file.{ Files, Paths } + +import scala.concurrent.duration._ + +import org.apache.pekko +import pekko.http.scaladsl.testkit.RouteTestTimeout +import pekko.testkit._ + +import org.scalatest.{ BeforeAndAfterAll, Inside, Inspectors } + +class FileAndResourceDirectivesSymlinkSpec extends RoutingSpec + with Inspectors with Inside with BeforeAndAfterAll { + + // need to serve from the src directory, when sbt copies the resource directory over to the + // target directory it will resolve symlinks in the process + val testRoot = new File("http-tests/src/test/resources") Review Comment: So TIL that Windows has symlinks but only for [Windows 10/11](https://www.howtogeek.com/16226/complete-guide-to-symbolic-links-symlinks-on-windows-or-linux/). I don't know how this factors into everything, my initial inclination is to disable the test for Windows since this seems to only really be testing behaviour specific to Posix systems. @He-Pin Can you confirm if the test passes on your machine (assuming all of the Windows related path separator issues have been solved)? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
