You've already forked jenkins-lib
forked from jenkins/jenkins-lib
Исправление readFile в тестах
This commit is contained in:
@@ -34,6 +34,11 @@ public class TestUtils {
|
||||
return FileUtils.readFileToString(new File(file), encoding);
|
||||
});
|
||||
|
||||
when(steps.readFile(anyString())).thenAnswer(invocation -> {
|
||||
String file = invocation.getArgument(0);
|
||||
return FileUtils.readFileToString(new File(file), StandardCharsets.UTF_8);
|
||||
});
|
||||
|
||||
when(steps.fileExists(anyString())).thenAnswer(invocation -> {
|
||||
String file = invocation.getArgument(0);
|
||||
return new File(file).exists();
|
||||
|
Reference in New Issue
Block a user