silentsignal / DirBustErl

DirBuster successor in Erlang
MIT License
37 stars 13 forks source link

Unit test failed #3

Closed szeghybarna closed 10 years ago

szeghybarna commented 10 years ago

First problem was with missing hamcrest.

==> meck (eunit)
Compiled test/meck_performance_test.erl
Compiled test/meck_args_matcher_tests.erl
Compiled test/meck_expect_tests.erl
Compiled test/meck_matcher_tests.erl
Compiled test/meck_test_module.erl
Compiled test/meck_ret_spec_tests.erl
Compiled src/meck_ret_spec.erl
Compiled src/meck_history.erl
Compiled src/meck_code.erl
Compiled src/meck_code_gen.erl
Compiled src/meck_cover.erl
Compiled test/meck_history_tests.erl
/root/bin/DirBustErl/deps/meck/test/meck_tests.erl:22: can't find include lib "hamcrest/include/hamcrest.hrl"
/root/bin/DirBustErl/deps/meck/test/meck_tests.erl:454: function equal_to/1 undefined
/root/bin/DirBustErl/deps/meck/test/meck_tests.erl:455: function equal_to/1 undefined
/root/bin/DirBustErl/deps/meck/test/meck_tests.erl:776: function less_than/1 undefined
ERROR: eunit failed while processing /root/bin/DirBustErl/deps/meck: rebar_abort
make: *** [test] Error 1

I added to rebar.config the hamcrest dependency, so this solved.

The next problem occurs in webmachine unit test:

==> webmachine (eunit)
Compiled test/etag_test.erl
Compiled test/wm_integration_test_util.erl
Compiled src/webmachine_logger_watcher.erl
Compiled src/webmachine_app.erl
Compiled src/webmachine.erl
Compiled src/webmachine_router.erl
Compiled src/webmachine_resource.erl
Compiled src/webmachine_perf_log_handler.erl
Compiled src/wrq.erl
Compiled src/webmachine_access_log_handler.erl
Compiled src/webmachine_error.erl
Compiled src/webmachine_log.erl
Compiled src/webmachine_sup.erl
Compiled test/decision_core_test.erl
Compiled src/webmachine_decision_core.erl
Compiled src/webmachine_logger_watcher_sup.erl
Compiled src/webmachine_multipart.erl
Compiled src/webmachine_util.erl
Compiled src/webmachine_deps.erl
Compiled src/webmachine_mochiweb.erl
Compiled src/wmtrace_resource.erl
Compiled src/webmachine_error_handler.erl
Compiled src/webmachine_error_log_handler.erl
Compiled src/webmachine_dispatcher.erl
Compiled src/webmachine_request.erl
decision_core_test: core_tests...*failed*
::{assertMatch_failed,[{module,decision_core_test},
                     {line,883},
                     {expression,"Result"},
                     {pattern,"{ { \"HTTP/1.1\" , 304 , \"Not Modified\" } , _ , _ }"},
                     {value,{{"HTTP/1.1",200,"OK"},
                             [{"date","Fri, 23 May 2014 13:01:10 GMT"},
                              {"server",
                               "MochiWeb/1.1 WebMachine/1.10.6 (no drinks)"},
                              {"content-length","29"},
                              {"content-type","text/html"},
                              {"expires","Wed, 01 Jan 2014 12:00:00 GMT"},
                              {"last-modified",[...]}],
                             "<html><body>Foo</body></html>"}}]}

=======================================================
  Failed: 1.  Skipped: 0.  Passed: 125.
Cover analysis: /root/bin/DirBustErl/deps/webmachine/.eunit/index.html
ERROR: One or more eunit tests failed.
ERROR: eunit failed while processing /root/bin/DirBustErl/deps/webmachine: rebar_abort
make: *** [test] Error 1
dnet commented 10 years ago

This is a problem w.r.t meck and webmachine, the only unit tests relevant to DirBustErl are within the src directory.