-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(#102) ContentController: last test groundwork
- Loading branch information
Showing
4 changed files
with
76 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
module Emulsion.TestFramework.TestFileCache | ||
|
||
open System.IO | ||
|
||
open Emulsion.ContentProxy | ||
open Emulsion.Settings | ||
open Emulsion.TestFramework.Logging | ||
|
||
let newCacheDirectory() = | ||
let path = Path.GetTempFileName() | ||
File.Delete path | ||
Directory.CreateDirectory path |> ignore | ||
path | ||
|
||
let setUpFileCache outputHelper sha256 cacheDirectory (totalLimitBytes: uint64) = | ||
let settings = { | ||
Directory = cacheDirectory | ||
FileSizeLimitBytes = 10UL * 1024UL * 1024UL | ||
TotalCacheSizeLimitBytes = totalLimitBytes | ||
} | ||
|
||
new FileCache(xunitLogger outputHelper, settings, SimpleHttpClientFactory(), sha256) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters