diff options
author | Tristan Sloughter <t@crashfast.com> | 2015-08-01 19:26:15 -0500 |
---|---|---|
committer | Tristan Sloughter <t@crashfast.com> | 2015-08-02 16:42:49 -0500 |
commit | 6d01729c682fa56933753ef70c1e97b4b19042d8 (patch) | |
tree | dbb975cbae03d716c4b910b65abec3a5d115342f /test | |
parent | acb2fcd057f519113cf6d08a2c65c6d0a9e3da9b (diff) |
upgrade depends on the lock provider and lock prv sets state
Diffstat (limited to 'test')
-rw-r--r-- | test/rebar_upgrade_SUITE.erl | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/test/rebar_upgrade_SUITE.erl b/test/rebar_upgrade_SUITE.erl index f2d4133..4ab99c7 100644 --- a/test/rebar_upgrade_SUITE.erl +++ b/test/rebar_upgrade_SUITE.erl @@ -48,7 +48,7 @@ init_per_testcase(novsn_pkg, Config0) -> end}, {mock_update, fun() -> catch mock_pkg_resource:unmock(), - mock_pkg_resource:mock([{pkgdeps, UpDeps}, {upgrade, Upgrades}]) + mock_pkg_resource:mock([{pkgdeps, UpDeps++Deps}, {upgrade, Upgrades}]) end}, {expected, {ok, [{dep, "fakeapp", "1.1.0"}, {lock, "fakeapp", "1.1.0"}]}} | Config]; @@ -430,14 +430,12 @@ mock_deps(pkg, Deps, Upgrades) -> catch mock_pkg_resource:unmock(), mock_pkg_resource:mock([{pkgdeps, rebar_test_utils:flat_pkgdeps(Deps)}, {upgrade, Upgrades}]). -mock_deps(git, _OldDeps, Deps, Upgrades) -> +mock_deps(git, OldDeps, Deps, Upgrades) -> catch mock_git_resource:unmock(), - mock_git_resource:mock([{deps, rebar_test_utils:flat_deps(Deps)}, {upgrade, Upgrades}]); + mock_git_resource:mock([{deps, rebar_test_utils:flat_deps(Deps++OldDeps)}, {upgrade, Upgrades}]); mock_deps(pkg, OldDeps, Deps, Upgrades) -> - Merged = Deps ++ [Dep || Dep <- OldDeps, - not lists:keymember(element(1, Dep), 1, Deps)], catch mock_pkg_resource:unmock(), - mock_pkg_resource:mock([{pkgdeps, rebar_test_utils:flat_pkgdeps(Merged)}, {upgrade, Upgrades}]). + mock_pkg_resource:mock([{pkgdeps, rebar_test_utils:flat_pkgdeps(Deps++OldDeps)}, {upgrade, Upgrades}]). normalize_unlocks({App, Locks}) -> {iolist_to_binary(App), |