diff options
| author | Magnus Ahltorp <map@kth.se> | 2014-11-19 01:01:29 +0100 |
|---|---|---|
| committer | Magnus Ahltorp <map@kth.se> | 2014-11-19 01:01:29 +0100 |
| commit | 2f95bca94f7c52c5b7d03f5fb63f2001af61613f (patch) | |
| tree | c71eb4c7365e41ab657c66e5379c2608bacd0347 /test/src | |
| parent | 6f94f976570318f792e473b4d569cbcfcf787659 (diff) | |
Dummy db for testing.
Diffstat (limited to 'test/src')
| -rw-r--r-- | test/src/db.erl | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/src/db.erl b/test/src/db.erl new file mode 100644 index 0000000..8c90842 --- /dev/null +++ b/test/src/db.erl @@ -0,0 +1,18 @@ +%%% Copyright (c) 2014, NORDUnet A/S. +%%% See LICENSE for licensing information. + +-module(db). +-export([get_by_indices/3]). + +get_by_indices(Start, _End, _Options) when Start < 0 -> + []; +get_by_indices(Start, End, _Options) -> + case Start =< End of + true -> + B = crypto:hash(sha256, <<"bar">>), + lists:map(fun (Index) -> + {Index, B, notfetched} + end, lists:seq(Start, End)); + false -> + [] + end. |
