summaryrefslogtreecommitdiff
path: root/test/mock_pkg_resource.erl
diff options
context:
space:
mode:
Diffstat (limited to 'test/mock_pkg_resource.erl')
-rw-r--r--test/mock_pkg_resource.erl6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/mock_pkg_resource.erl b/test/mock_pkg_resource.erl
index 9a31461..a169efd 100644
--- a/test/mock_pkg_resource.erl
+++ b/test/mock_pkg_resource.erl
@@ -171,7 +171,7 @@ to_index(AllDeps, Dict, Repos) ->
DKB <- [ec_cnv:to_binary(DK)],
DVB <- [ec_cnv:to_binary(DV)]],
Repo = rebar_test_utils:random_element(Repos),
- ets:insert(?PACKAGE_TABLE, #package{key={N, V, Repo},
+ ets:insert(?PACKAGE_TABLE, #package{key={N, ec_semver:parse(V), Repo},
dependencies=parse_deps(DepsList),
retired=false,
checksum = <<"checksum">>})
@@ -179,11 +179,11 @@ to_index(AllDeps, Dict, Repos) ->
lists:foreach(fun({{Name, Vsn}, _}) ->
case lists:any(fun(R) ->
- ets:member(?PACKAGE_TABLE, {ec_cnv:to_binary(Name), Vsn, R})
+ ets:member(?PACKAGE_TABLE, {ec_cnv:to_binary(Name), ec_semver:parse(Vsn), R})
end, Repos) of
false ->
Repo = rebar_test_utils:random_element(Repos),
- ets:insert(?PACKAGE_TABLE, #package{key={ec_cnv:to_binary(Name), Vsn, Repo},
+ ets:insert(?PACKAGE_TABLE, #package{key={ec_cnv:to_binary(Name), ec_semver:parse(Vsn), Repo},
dependencies=[],
retired=false,
checksum = <<"checksum">>});