Return-Path: X-Original-To: apmail-couchdb-commits-archive@www.apache.org Delivered-To: apmail-couchdb-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DD4DD116E2 for ; Thu, 28 Aug 2014 17:30:09 +0000 (UTC) Received: (qmail 15142 invoked by uid 500); 28 Aug 2014 17:30:03 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 15022 invoked by uid 500); 28 Aug 2014 17:30:03 -0000 Mailing-List: contact commits-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list commits@couchdb.apache.org Received: (qmail 13499 invoked by uid 99); 28 Aug 2014 17:30:02 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Aug 2014 17:30:02 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id ADC2AA04B2B; Thu, 28 Aug 2014 17:30:02 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: chewbranca@apache.org To: commits@couchdb.apache.org Date: Thu, 28 Aug 2014 17:30:40 -0000 Message-Id: <0af04f2fae3c45259e374223620917f6@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [40/50] [abbrv] couch-replicator commit: updated refs/heads/1963-eunit-bigcouch to 3cf0b13 Port couch_replicator/01-load.t etap test suite to eunit Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/commit/86aba61e Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/tree/86aba61e Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/diff/86aba61e Branch: refs/heads/1963-eunit-bigcouch Commit: 86aba61edd46e19239207969fe430fa1d9b9261f Parents: aafb5f9 Author: Alexander Shorin Authored: Thu Jun 12 02:47:15 2014 +0400 Committer: Russell Branca Committed: Thu Aug 28 10:29:40 2014 -0700 ---------------------------------------------------------------------- .../couch_replicator_modules_load_tests.erl | 40 ++++++++++++++++++++ test/01-load.t | 37 ------------------ 2 files changed, 40 insertions(+), 37 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/blob/86aba61e/src/couch_replicator/test/couch_replicator_modules_load_tests.erl ---------------------------------------------------------------------- diff --git a/src/couch_replicator/test/couch_replicator_modules_load_tests.erl b/src/couch_replicator/test/couch_replicator_modules_load_tests.erl new file mode 100644 index 0000000..cea4cc2 --- /dev/null +++ b/src/couch_replicator/test/couch_replicator_modules_load_tests.erl @@ -0,0 +1,40 @@ +% Licensed under the Apache License, Version 2.0 (the "License"); you may not +% use this file except in compliance with the License. You may obtain a copy of +% the License at +% +% http://www.apache.org/licenses/LICENSE-2.0 +% +% Unless required by applicable law or agreed to in writing, software +% distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +% WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +% License for the specific language governing permissions and limitations under +% the License. + +-module(couch_replicator_modules_load_tests). + +-include("../../../test/couchdb/couch_eunit.hrl"). + + +modules_load_test_() -> + { + "Verify that all modules loads", + should_load_modules() + }. + + +should_load_modules() -> + Modules = [ + couch_replicator_api_wrap, + couch_replicator_httpc, + couch_replicator_httpd, + couch_replicator_manager, + couch_replicator_notifier, + couch_replicator, + couch_replicator_worker, + couch_replicator_utils, + couch_replicator_job_sup + ], + [should_load_module(Mod) || Mod <- Modules]. + +should_load_module(Mod) -> + {atom_to_list(Mod), ?_assertMatch({module, _}, code:load_file(Mod))}. http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/blob/86aba61e/test/01-load.t ---------------------------------------------------------------------- diff --git a/test/01-load.t b/test/01-load.t deleted file mode 100644 index 8bd82dd..0000000 --- a/test/01-load.t +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env escript -%% -*- erlang -*- - -% Licensed under the Apache License, Version 2.0 (the "License"); you may not -% use this file except in compliance with the License. You may obtain a copy of -% the License at -% -% http://www.apache.org/licenses/LICENSE-2.0 -% -% Unless required by applicable law or agreed to in writing, software -% distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -% WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -% License for the specific language governing permissions and limitations under -% the License. - -% Test that we can load each module. - -main(_) -> - test_util:init_code_path(), - Modules = [ - couch_replicator_api_wrap, - couch_replicator_httpc, - couch_replicator_httpd, - couch_replicator_manager, - couch_replicator_notifier, - couch_replicator, - couch_replicator_worker, - couch_replicator_utils, - couch_replicator_job_sup - ], - - etap:plan(length(Modules)), - lists:foreach( - fun(Module) -> - etap:loaded_ok(Module, lists:concat(["Loaded: ", Module])) - end, Modules), - etap:end_tests().