Skip to content

Commit

Permalink
Decouple run summary properties from specific file types
Browse files Browse the repository at this point in the history
This lets us display runs on the home page and results detail page
properly when there is only a results.zip file and no standalone
results.json file.

Fixes #11

This also moves us closer to a fix for #12, since the properties that are
relative to the current wall clock time are no longer being cached.
  • Loading branch information
michaelhixson committed Apr 18, 2019
1 parent 828b059 commit 21f3b3f
Show file tree
Hide file tree
Showing 6 changed files with 566 additions and 514 deletions.
12 changes: 6 additions & 6 deletions src/main/java/tfb/status/handler/UploadResultsHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -187,13 +187,13 @@ private Path destinationForIncomingFile(Path incomingFile)
if (results == null)
return newResultsFile();

if (results.json != null
&& results.json.fileName.endsWith("." + fileExtension))
return fileStore.resultsDirectory().resolve(results.json.fileName);
if (results.jsonFileName != null
&& results.jsonFileName.endsWith("." + fileExtension))
return fileStore.resultsDirectory().resolve(results.jsonFileName);

if (results.zip != null
&& results.zip.fileName.endsWith("." + fileExtension))
return fileStore.resultsDirectory().resolve(results.zip.fileName);
if (results.zipFileName != null
&& results.zipFileName.endsWith("." + fileExtension))
return fileStore.resultsDirectory().resolve(results.zipFileName);

return newResultsFile();
}
Expand Down
Loading

0 comments on commit 21f3b3f

Please sign in to comment.