Updated Branches: refs/heads/1.3.x 03ff1197c -> aee42c3c9 refs/heads/master 2b8539dbb -> e5478a86c
fix 250*.t Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/aee42c3c Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/aee42c3c Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/aee42c3c Branch: refs/heads/1.3.x Commit: aee42c3c9a8aecde268b930500b4932429f9cc42 Parents: 03ff119 Author: Jan Lehnardt <[email protected]> Authored: Tue Mar 5 14:50:46 2013 +0100 Committer: Jan Lehnardt <[email protected]> Committed: Tue Mar 5 15:43:40 2013 +0100 ---------------------------------------------------------------------- test/etap/250-upgrade-legacy-view-files.t | 13 ++++++++----- 1 files changed, 8 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb/blob/aee42c3c/test/etap/250-upgrade-legacy-view-files.t ---------------------------------------------------------------------- diff --git a/test/etap/250-upgrade-legacy-view-files.t b/test/etap/250-upgrade-legacy-view-files.t index 998264d..49a65a5 100644 --- a/test/etap/250-upgrade-legacy-view-files.t +++ b/test/etap/250-upgrade-legacy-view-files.t @@ -38,7 +38,7 @@ test() -> ok. fixture_path() -> - test_util:srcdir() ++ "/test/etap/fixtures". + test_util:source_file("test/etap/fixtures"). old_db() -> fixture_path() ++ "/" ++ old_db_name(). @@ -51,6 +51,7 @@ old_view() -> old_view_name() -> "3b835456c235b1827e012e25666152f3.view". + new_view_name() -> "a1c5929f912aca32f13446122cc6ce50.view". @@ -113,14 +114,16 @@ test_upgrade() -> % copy old db file into db dir DbDir = couch_config:get("couchdb", "database_dir"), DbTarget = DbDir ++ "/" ++ old_db_name(), - filelib:ensure_dir(DbTarget), - file:copy(old_db(), DbTarget), + filelib:ensure_dir(DbDir), + OldDbName = old_db(), + {ok, _} = file:copy(OldDbName, DbTarget), % copy old view file into view dir - ViewDir = couch_config:get("couchdb", "index_dir"), + ViewDir = couch_config:get("couchdb", "view_index_dir"), ViewTarget = ViewDir ++ "/.test_design/" ++ old_view_name(), filelib:ensure_dir(ViewTarget), - file:copy(old_view(), ViewTarget), + OldViewName = old_view(), + {ok, _} = file:copy(OldViewName, ViewTarget), % ensure old header ensure_header(ViewTarget, fun(#index_header{}) -> true; (_) -> false end, "old"),
