Skip to content

Commit

Permalink
Merge pull request #2958 from swagger-api/fix-gradle-test
Browse files Browse the repository at this point in the history
fix gradle test
  • Loading branch information
frantuma authored Sep 19, 2018
2 parents 350cdfd + e71743e commit 7090ca2
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,15 @@ public class SwaggerResolveTest {
@Rule
public final TemporaryFolder testProjectDir = new TemporaryFolder();
private File buildFile;
private File settingsFile;
private File openapiInputFile;
private String outputFile;
private String outputDir;

@Before
public void setup() throws IOException {
buildFile = testProjectDir.newFile("build.gradle");
settingsFile = testProjectDir.newFile("settings.gradle");
openapiInputFile = testProjectDir.newFile("openapiinput.yaml");
writeFile(openapiInputFile, "openapi: 3.0.1\n" +
"servers:\n" +
Expand Down Expand Up @@ -101,7 +103,18 @@ public void testSwaggerResolveTask() throws IOException {
"}";


String settingsFileContent = "pluginManagement {\n" +
" repositories {\n" +
" maven {\n" +
" url mavenLocal().url\n" +
" }\n" +
" gradlePluginPortal()\n" +
" }\n" +
"}\n" +
"rootProject.name = 'gradle-test'\n" +
"\n";
writeFile(buildFile, buildFileContent);
writeFile(settingsFile, settingsFileContent);

BuildResult result = GradleRunner.create()
.withPluginClasspath()
Expand Down

0 comments on commit 7090ca2

Please sign in to comment.