Skip to content

Commit

Permalink
[MINVOKER-335] Use selector script for preparing test with symlinks
Browse files Browse the repository at this point in the history
  • Loading branch information
slawekjaranowski committed May 5, 2024
1 parent a741ea0 commit 697dab3
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/

import java.nio.file.Files
import java.nio.file.Paths

Expand All @@ -28,7 +27,12 @@ def testFile = projectPath.resolve('test.txt')
Files.createDirectory(testDir)
Files.createFile(testFile)

Files.createSymbolicLink(projectPath.resolve('testDirLink'), Paths.get('testDir'))
Files.createSymbolicLink(projectPath.resolve('testLink.txt'), Paths.get('test.txt'))
// if FS not support symlinks - we should skip test
try {
Files.createSymbolicLink(projectPath.resolve('testDirLink'), Paths.get('testDir'))
Files.createSymbolicLink(projectPath.resolve('testLink.txt'), Paths.get('test.txt'))
} catch (IOException e) {
return false
}

true
return true

0 comments on commit 697dab3

Please sign in to comment.