@@ -1046,10 +1046,7 @@ public void createSymbolicLink_localFileArtifact() throws Exception {
1046
1046
// assert
1047
1047
assertThat (symlinkActionFs .getFileSystem ()).isSameInstanceAs (actionFs );
1048
1048
assertThat (symlinkActionFs .readSymbolicLink ()).isEqualTo (targetPath );
1049
- assertThat (getLocalFileSystem (actionFs ).getPath (linkPath ).readSymbolicLink ())
1050
- .isEqualTo (targetPath );
1051
- assertThat (getLocalFileSystem (actionFs ).getPath (linkPath ).readSymbolicLink ())
1052
- .isEqualTo (targetPath );
1049
+ assertThat (getLocalFileSystem (actionFs ).getPath (linkPath ).exists (Symlinks .NOFOLLOW )).isFalse ();
1053
1050
}
1054
1051
1055
1052
@ Test
@@ -1070,11 +1067,8 @@ public void createSymbolicLink_remoteFileArtifact() throws Exception {
1070
1067
// assert
1071
1068
assertThat (symlinkActionFs .getFileSystem ()).isSameInstanceAs (actionFs );
1072
1069
assertThat (symlinkActionFs .readSymbolicLink ()).isEqualTo (targetPath );
1073
- assertThat (outputArtifact .getPath ().readSymbolicLink ()).isEqualTo (targetPath );
1074
- assertThat (getLocalFileSystem (actionFs ).getPath (linkPath ).readSymbolicLink ())
1075
- .isEqualTo (targetPath );
1076
- assertThat (getLocalFileSystem (actionFs ).getPath (linkPath ).readSymbolicLink ())
1077
- .isEqualTo (targetPath );
1070
+ assertThat (outputArtifact .getPath ().exists (Symlinks .NOFOLLOW )).isFalse ();
1071
+ assertThat (getLocalFileSystem (actionFs ).getPath (linkPath ).exists (Symlinks .NOFOLLOW )).isFalse ();
1078
1072
}
1079
1073
1080
1074
@ Test
@@ -1098,10 +1092,7 @@ public void createSymbolicLink_localTreeArtifact() throws Exception {
1098
1092
// assert
1099
1093
assertThat (symlinkActionFs .getFileSystem ()).isSameInstanceAs (actionFs );
1100
1094
assertThat (symlinkActionFs .readSymbolicLink ()).isEqualTo (targetPath );
1101
- assertThat (getLocalFileSystem (actionFs ).getPath (linkPath ).readSymbolicLink ())
1102
- .isEqualTo (targetPath );
1103
- assertThat (getLocalFileSystem (actionFs ).getPath (linkPath ).readSymbolicLink ())
1104
- .isEqualTo (targetPath );
1095
+ assertThat (getLocalFileSystem (actionFs ).getPath (linkPath ).exists (Symlinks .NOFOLLOW )).isFalse ();
1105
1096
}
1106
1097
1107
1098
@ Test
@@ -1125,10 +1116,7 @@ public void createSymbolicLink_remoteTreeArtifact() throws Exception {
1125
1116
// assert
1126
1117
assertThat (symlinkActionFs .getFileSystem ()).isSameInstanceAs (actionFs );
1127
1118
assertThat (symlinkActionFs .readSymbolicLink ()).isEqualTo (targetPath );
1128
- assertThat (getLocalFileSystem (actionFs ).getPath (linkPath ).readSymbolicLink ())
1129
- .isEqualTo (targetPath );
1130
- assertThat (getLocalFileSystem (actionFs ).getPath (linkPath ).readSymbolicLink ())
1131
- .isEqualTo (targetPath );
1119
+ assertThat (getLocalFileSystem (actionFs ).getPath (linkPath ).exists (Symlinks .NOFOLLOW )).isFalse ();
1132
1120
}
1133
1121
1134
1122
@ Test
@@ -1149,10 +1137,7 @@ public void createSymbolicLink_unresolvedSymlink() throws Exception {
1149
1137
// assert
1150
1138
assertThat (symlinkActionFs .getFileSystem ()).isSameInstanceAs (actionFs );
1151
1139
assertThat (symlinkActionFs .readSymbolicLink ()).isEqualTo (targetPath );
1152
- assertThat (getLocalFileSystem (actionFs ).getPath (linkPath ).readSymbolicLink ())
1153
- .isEqualTo (targetPath );
1154
- assertThat (getLocalFileSystem (actionFs ).getPath (linkPath ).readSymbolicLink ())
1155
- .isEqualTo (targetPath );
1140
+ assertThat (getLocalFileSystem (actionFs ).getPath (linkPath ).exists (Symlinks .NOFOLLOW )).isFalse ();
1156
1141
}
1157
1142
1158
1143
@ Test
0 commit comments