forked from loafle/openapi-generator-original
Fix test on Windows (#19980)
* comment out broken tests * fixed test for windows
This commit is contained in:
parent
32fdd7c4d8
commit
891698784d
@ -740,14 +740,22 @@ public class DefaultCodegenTest {
|
|||||||
Future<Boolean> call2 = executor.submit(new Callable<Boolean>() {
|
Future<Boolean> call2 = executor.submit(new Callable<Boolean>() {
|
||||||
@Override
|
@Override
|
||||||
public Boolean call() throws Exception {
|
public Boolean call() throws Exception {
|
||||||
return codegen.executePostProcessor(new String[] { "echo Hello" });
|
String os = System.getProperty("os.name");
|
||||||
|
String postProcessor = os.contains("Windows")
|
||||||
|
? "cmd.exe /c echo hello"
|
||||||
|
: "echo Hello";
|
||||||
|
return codegen.executePostProcessor(new String[] { postProcessor });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Future<Boolean> call3 = executor.submit(new Callable<Boolean>() {
|
Future<Boolean> call3 = executor.submit(new Callable<Boolean>() {
|
||||||
@Override
|
@Override
|
||||||
public Boolean call() throws Exception {
|
public Boolean call() throws Exception {
|
||||||
return codegen.executePostProcessor(new String[] { "echo", "Hello" });
|
String os = System.getProperty("os.name");
|
||||||
|
String[] postProcessor = os.contains("Windows")
|
||||||
|
? new String[] { "cmd.exe", "/c", "echo", "hello" }
|
||||||
|
: new String[] { "echo", "Hello" };
|
||||||
|
return codegen.executePostProcessor(postProcessor);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user