Skip to content

Commit

Permalink
undoing mistaken temp-for-mock working-dir logic from prev commit #1480
Browse files Browse the repository at this point in the history
  • Loading branch information
ptrthomas committed Mar 3, 2021
1 parent fbfbcf3 commit c9c2619
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
11 changes: 1 addition & 10 deletions karate-core/src/main/java/com/intuit/karate/Suite.java
Original file line number Diff line number Diff line change
Expand Up @@ -117,15 +117,6 @@ public static Suite forTempUse() {
return new Suite(Runner.builder().forTempUse());
}

public static Suite forMockUse(Feature feature) {
Runner.Builder builder = Runner.builder().forTempUse();
File featureDir = feature.getResource().getFile();
if (featureDir != null) {
builder.workingDir(featureDir.getAbsoluteFile().getParentFile());
}
return new Suite(builder);
}

public Suite() {
this(Runner.builder());
}
Expand All @@ -150,7 +141,7 @@ public Suite(Runner.Builder rb) {
featuresFound = -1;
futures = null;
featureResultFiles = null;
workingDir = rb.workingDir == null ? FileUtils.WORKING_DIR : rb.workingDir;
workingDir = FileUtils.WORKING_DIR;
buildDir = FileUtils.getBuildDir();
reportDir = null;
karateBase = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public MockHandler(Feature feature) {

public MockHandler(Feature feature, Map<String, Object> args) {
this.feature = feature;
FeatureRuntime featureRuntime = FeatureRuntime.of(Suite.forMockUse(feature), feature, args);
FeatureRuntime featureRuntime = FeatureRuntime.of(Suite.forTempUse(), feature, args);
FeatureSection section = new FeatureSection();
section.setIndex(-1); // TODO util for creating dummy scenario
Scenario dummy = new Scenario(feature, section, -1);
Expand Down

0 comments on commit c9c2619

Please sign in to comment.