From c283dd2c69174586e5964654a5fec8eeb66f6b6c Mon Sep 17 00:00:00 2001 From: Fred Hebert Date: Mon, 23 Feb 2015 22:57:34 +0000 Subject: Add tests and fixes for packages upgrades - Track level of packages properly, they're not level 0 anymore (this could yield an issue where a src dep takes precedence over a pkg dep) - Proper stable sort of vertices in the digraph module - PkgDeps no longer 'see themselves' when fetching and upgrading after locking themselves - Pkg Locks are added to pkg deps rather than source deps - Updating test cases to support pkg mocking on top of src mocking --- test/mock_pkg_resource.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/mock_pkg_resource.erl') diff --git a/test/mock_pkg_resource.erl b/test/mock_pkg_resource.erl index c7276b6..a22d1b0 100644 --- a/test/mock_pkg_resource.erl +++ b/test/mock_pkg_resource.erl @@ -47,11 +47,11 @@ mock_lock(_) -> %% @doc The config passed to the `mock/2' function can specify which apps %% should be updated on a per-name basis: `{update, ["App1", "App3"]}'. mock_update(Opts) -> - ToUpdate = proplists:get_value(update, Opts, []), + ToUpdate = proplists:get_value(upgrade, Opts, []), meck:expect( ?MOD, needs_update, fun(_Dir, {pkg, App, _Vsn}) -> - lists:member(App, ToUpdate) + lists:member(binary_to_list(App), ToUpdate) end). %% @doc Replicated an unsupported call. -- cgit v1.1