@@ -878,10 +878,7 @@ public void createSymbolicLink_localFileArtifact() throws Exception {
878
878
// assert
879
879
assertThat (symlinkActionFs .getFileSystem ()).isSameInstanceAs (actionFs );
880
880
assertThat (symlinkActionFs .readSymbolicLink ()).isEqualTo (targetPath );
881
- assertThat (getLocalFileSystem (actionFs ).getPath (linkPath ).readSymbolicLink ())
882
- .isEqualTo (targetPath );
883
- assertThat (getLocalFileSystem (actionFs ).getPath (linkPath ).readSymbolicLink ())
884
- .isEqualTo (targetPath );
881
+ assertThat (getLocalFileSystem (actionFs ).getPath (linkPath ).exists (Symlinks .NOFOLLOW )).isFalse ();
885
882
}
886
883
887
884
@ Test
@@ -901,11 +898,8 @@ public void createSymbolicLink_remoteFileArtifact() throws Exception {
901
898
// assert
902
899
assertThat (symlinkActionFs .getFileSystem ()).isSameInstanceAs (actionFs );
903
900
assertThat (symlinkActionFs .readSymbolicLink ()).isEqualTo (targetPath );
904
- assertThat (outputArtifact .getPath ().readSymbolicLink ()).isEqualTo (targetPath );
905
- assertThat (getLocalFileSystem (actionFs ).getPath (linkPath ).readSymbolicLink ())
906
- .isEqualTo (targetPath );
907
- assertThat (getLocalFileSystem (actionFs ).getPath (linkPath ).readSymbolicLink ())
908
- .isEqualTo (targetPath );
901
+ assertThat (outputArtifact .getPath ().exists (Symlinks .NOFOLLOW )).isFalse ();
902
+ assertThat (getLocalFileSystem (actionFs ).getPath (linkPath ).exists (Symlinks .NOFOLLOW )).isFalse ();
909
903
}
910
904
911
905
@ Test
@@ -928,10 +922,7 @@ public void createSymbolicLink_localTreeArtifact() throws Exception {
928
922
// assert
929
923
assertThat (symlinkActionFs .getFileSystem ()).isSameInstanceAs (actionFs );
930
924
assertThat (symlinkActionFs .readSymbolicLink ()).isEqualTo (targetPath );
931
- assertThat (getLocalFileSystem (actionFs ).getPath (linkPath ).readSymbolicLink ())
932
- .isEqualTo (targetPath );
933
- assertThat (getLocalFileSystem (actionFs ).getPath (linkPath ).readSymbolicLink ())
934
- .isEqualTo (targetPath );
925
+ assertThat (getLocalFileSystem (actionFs ).getPath (linkPath ).exists (Symlinks .NOFOLLOW )).isFalse ();
935
926
}
936
927
937
928
@ Test
@@ -954,10 +945,7 @@ public void createSymbolicLink_remoteTreeArtifact() throws Exception {
954
945
// assert
955
946
assertThat (symlinkActionFs .getFileSystem ()).isSameInstanceAs (actionFs );
956
947
assertThat (symlinkActionFs .readSymbolicLink ()).isEqualTo (targetPath );
957
- assertThat (getLocalFileSystem (actionFs ).getPath (linkPath ).readSymbolicLink ())
958
- .isEqualTo (targetPath );
959
- assertThat (getLocalFileSystem (actionFs ).getPath (linkPath ).readSymbolicLink ())
960
- .isEqualTo (targetPath );
948
+ assertThat (getLocalFileSystem (actionFs ).getPath (linkPath ).exists (Symlinks .NOFOLLOW )).isFalse ();
961
949
}
962
950
963
951
@ Test
@@ -977,10 +965,7 @@ public void createSymbolicLink_unresolvedSymlink() throws Exception {
977
965
// assert
978
966
assertThat (symlinkActionFs .getFileSystem ()).isSameInstanceAs (actionFs );
979
967
assertThat (symlinkActionFs .readSymbolicLink ()).isEqualTo (targetPath );
980
- assertThat (getLocalFileSystem (actionFs ).getPath (linkPath ).readSymbolicLink ())
981
- .isEqualTo (targetPath );
982
- assertThat (getLocalFileSystem (actionFs ).getPath (linkPath ).readSymbolicLink ())
983
- .isEqualTo (targetPath );
968
+ assertThat (getLocalFileSystem (actionFs ).getPath (linkPath ).exists (Symlinks .NOFOLLOW )).isFalse ();
984
969
}
985
970
986
971
@ Test
0 commit comments