Github user kxepal commented on the pull request:
https://github.com/apache/couchdb-config/pull/4#issuecomment-113461280
@rnewson you're right, there are problems with running test suite from
couchdb repo with this (and lager) PR applied:
```
==> couchdb (setup_eunit)
ERROR: One or more files already exist on disk and were not generated:
* "tmp/etc/default_eunit.ini"
* "tmp/etc/local_eunit.ini"
* "tmp/etc/eunit.ini"
* "tmp/etc/vm.args"
To force overwriting, specify -f/--force/force=1 on the command line.
==> b64url (eunit)
======================== EUnit ========================
module 'b64url'
module 'b64url_tests'
b64url_tests: table_test...ok
b64url_tests: encode_binary_test...[1.030 s] ok
b64url_tests: encode_iolist_test...[1.017 s] ok
b64url_tests: decode_binary_test...[1.074 s] ok
b64url_tests: decode_iolist_test...[1.240 s] ok
b64url_tests: decode_binary_error_test...[1.052 s] ok
b64url_tests: decode_bad_length_test...[0.780 s] ok
[done in 6.211 s]
[done in 6.211 s]
=======================================================
All 7 tests passed.
==> cassim (eunit)
======================== EUnit ========================
module 'cassim_security'
module 'cassim'
module 'cassim_metadata_cache'
module 'cassim_app'
cassim_metadata_cache_test: security_meta_id_test (module
'cassim_metadata_cache_test')...[0.085 s] ok
module 'cassim_sup'
=======================================================
Test passed.
==> couch_log (eunit)
======================== EUnit ========================
module 'couch_log'
There were no tests to run.
==> config (eunit)
======================== EUnit ========================
module 'config_app'
module 'config_util'
module 'config_listener'
module 'config'
module 'config_tests'
CouchDB config tests
Config get tests
config_tests:236: should_load_all_configs...13:14:33.656 [info]
Application lager started on node nonode@nohost
13:14:33.656 [info] Application couch_log started on node nonode@nohost
13:14:33.657 [info] Application config started on node nonode@nohost
ok
13:14:33.661 [info] Application config exited with reason: stopped
13:14:33.669 [info] Application config started on node nonode@nohost
config_tests:239: should_locate_daemons_section...ok
13:14:33.672 [info] Application config exited with reason: stopped
13:14:33.679 [info] Application config started on node nonode@nohost
config_tests:242: should_locate_mrview_handler...ok
13:14:33.682 [info] Application config exited with reason: stopped
13:14:33.689 [info] Application config started on node nonode@nohost
config_tests:246:
should_return_undefined_atom_on_missed_section...ok
13:14:33.692 [info] Application config exited with reason: stopped
13:14:33.699 [info] Application config started on node nonode@nohost
config_tests:250: should_return_undefined_atom_on_missed_option...ok
13:14:33.702 [info] Application config exited with reason: stopped
13:14:33.709 [info] Application config started on node nonode@nohost
config_tests:254: should_return_custom_default_value_on_missed_option...ok
13:14:33.712 [info] Application config exited with reason: stopped
13:14:33.720 [info] Application config started on node nonode@nohost
config_tests:258: should_only_return_default_on_missed_option...ok
13:14:33.723 [info] Application config exited with reason: stopped
13:14:33.730 [info] Application config started on node nonode@nohost
config_tests:262: should_fail_to_get_binary_value...ok
13:14:33.733 [info] Application config exited with reason: stopped
13:14:33.740 [info] Application config started on node nonode@nohost
config_tests:269: should_return_any_supported_default (for
type(undefined))...ok
config_tests:269: should_return_any_supported_default (for
type("list"))...ok
config_tests:269: should_return_any_supported_default (for
type(true))...ok
config_tests:269: should_return_any_supported_default (for
type(false))...ok
config_tests:269: should_return_any_supported_default (for
type(0.1))...ok
config_tests:269: should_return_any_supported_default (for
type(1))...ok
13:14:33.758 [info] Application config exited with reason: stopped
[done in 0.321 s]
Config set tests
13:14:33.766 [info] Application config started on node nonode@nohost
config_tests:273: should_update_option...13:14:33.790 [notice]
config: [log] level set to severe for reason nil
[0.024 s] ok
13:14:33.793 [info] Application config exited with reason: stopped
13:14:33.800 [info] Application config started on node nonode@nohost
13:14:33.801 [notice] config: [new_section] bizzle set to bang for reason
nil
config_tests:280: should_create_new_section...ok
13:14:33.804 [info] Application config exited with reason: stopped
config_tests:288: should_fail_to_set_binary_value...ok
[done in 0.057 s]
Config deletion tests
13:14:33.823 [notice] config: [log] level deleted for reason nil
config_tests:292:
should_return_undefined_atom_after_option_deletion...ok
13:14:33.833 [notice] config: [zoo] boo deleted for reason nil
config_tests:299: should_be_ok_on_deleting_unknown_options...ok
[done in 0.021 s]
Configs overide tests
config_tests:302: should_ensure_in_defaults...*failed*
in function config_tests:'-should_ensure_in_defaults/2-fun-1-'/1
(test/config_tests.erl, line 306)
in call from config_tests:'-should_ensure_in_defaults/2-fun-3-'/0
(test/config_tests.erl, line 305)
**error:{assertEqual_failed,[{module,config_tests},
{line,306},
{expression,"config : get ( \"httpd\" , \"port\" )"},
{expected,"0"},
{value,"5986"}]}
undefined
*** context setup failed ***
**in function config_tests:setup/1 (test/config_tests.erl, line 66)
**error:{badmatch,
{error,
{config,
{{shutdown,
{failed_to_start_child,config,
{bad_return_value,
{startup_error,<<"Couldn't fin"...>>}}}},
{config_app,start,[normal,[]]}}}}}
undefined
*** context setup failed ***
**in function config_tests:setup/1 (test/config_tests.erl, line 66)
**error:{badmatch,
{error,
{config,
{{shutdown,
{failed_to_start_child,config,
{bad_return_value,
{startup_error,<<"Couldn't fin"...>>}}}},
{config_app,start,[normal,[]]}}}}}
undefined
*** context setup failed ***
**in function config_tests:setup/1 (test/config_tests.erl, line 66)
**error:{badmatch,
{error,
{config,
{{shutdown,
{failed_to_start_child,config,
{bad_return_value,
{startup_error,<<"Couldn't fin"...>>}}}},
{config_app,start,[normal,[]]}}}}}
[done in 0.095 s]
Config persistent changes
config_tests:331: should_write_changes...*failed*
in function config_tests:'-should_write_changes/2-fun-0-'/1
(test/config_tests.erl, line 333)
in call from config_tests:'-should_write_changes/2-fun-5-'/0
(test/config_tests.erl, line 332)
**error:{assertEqual_failed,[{module,config_tests},
{line,333},
{expression,"config : get ( \"httpd\" , \"port\" )"},
{expected,"0"},
{value,"5986"}]}
13:14:33.852 [error] Couldn't find server configuration file
/home/kxepal/projects/asf/couchdb/couchdb/test/fixtures/config_tests_1.ini.
config_tests:345: should_ensure_that_default_wasnt_modified...*failed*
in function
config_tests:'-should_ensure_that_default_wasnt_modified/2-fun-0-'/1
(test/config_tests.erl, line 347)
in call from
config_tests:'-should_ensure_that_default_wasnt_modified/2-fun-2-'/0
(test/config_tests.erl, line 346)
**error:{assertEqual_failed,[{module,config_tests},
{line,347},
{expression,"config : get ( \"httpd\" , \"port\" )"},
{expected,"0"},
{value,"5986"}]}
config_tests:353:
should_ensure_that_written_to_last_config_in_chain...*failed*
in function
config_tests:'-should_ensure_that_written_to_last_config_in_chain/2-fun-0-'/1
(test/config_tests.erl, line 355)
in call from
config_tests:'-should_ensure_that_written_to_last_config_in_chain/2-fun-2-'/0
(test/config_tests.erl, line 354)
**error:{assertEqual_failed,[{module,config_tests},
{line,355},
{expression,"config : get ( \"httpd\" , \"port\" )"},
{expected,"8080"},
{value,undefined}]}
[done in 0.034 s]
Test config with no files
config_tests:361: should_ensure_that_no_ini_files_loaded...ok
config_tests:364: should_create_non_persistent_option...ok
config_tests:371: should_create_persistent_option...ok
[done in 0.013 s]
Test config_listener behaviour
config_tests:378: should_handle_value_change...[0.001 s] ok
13:14:33.858 [error] Couldn't find server configuration file
/home/kxepal/projects/asf/couchdb/couchdb/test/fixtures/config_tests_2.ini.
13:14:33.931 [error] Couldn't find server configuration file
/home/kxepal/projects/asf/couchdb/couchdb/test/fixtures/config_tests_1.ini.
13:14:33.971 [notice] config: [httpd] port set to 80 for reason nil
13:14:33.975 [notice] config: [httpd] bind_address set to 127.0.0.1 for
reason nil
13:14:33.988 [notice] config: [httpd] port set to 80 for reason nil
13:14:34.992 [notice] config_listener(config_tests) stopped with reason:
shutdown
13:14:34.993 [warning] lager_error_logger_h dropped 3 messages in the last
second that exceeded the limit of 50 messages/sec
13:14:34.993 [info] Application config exited with reason: stopped
13:14:35.004 [info] Application config started on node nonode@nohost
config_tests:383:
should_pass_correct_state_to_handle_config_change...13:14:35.004 [notice]
config: [httpd] port set to 80 for reason nil
13:14:35.005 [notice] config: [update_state] foo set to any for reason nil
ok
13:14:36.009 [notice] config_listener(config_tests) stopped with reason:
shutdown
13:14:36.010 [info] Application config exited with reason: stopped
13:14:36.028 [info] Application config started on node nonode@nohost
13:14:36.029 [notice] config: [httpd] port set to 80 for reason nil
config_tests:390:
should_pass_correct_state_to_handle_config_terminate...13:14:36.029 [notice]
config: [update_state] foo set to any for reason nil
13:14:36.029 [notice] config: [remove_handler] any set to any for reason nil
13:14:36.029 [info] config_listener(config_tests) stopped with reason:
shutdown
[0.001 s] ok
13:14:36.034 [info] Application config exited with reason: stopped
13:14:36.049 [info] Application config started on node nonode@nohost
config_tests:407:
should_pass_subscriber_pid_to_handle_config_terminate...13:14:36.049 [notice]
config: [remove_handler] any set to any for reason nil
13:14:36.049 [info] config_listener(config_tests) stopped with reason:
shutdown
[0.001 s] ok
config_tests:416:
should_not_call_handle_config_after_related_process_death...ok
config_tests:425: should_remove_handler_when_requested...ok
[done in 2.176 s]
[done in 2.718 s]
[done in 2.718 s]
[done in 2.719 s]
13:14:36.052 [error] Supervisor config_sup had child config started with
config:start_link(["/home/kxepal/projects/asf/couchdb/couchdb/tmp/etc/default_eunit.ini","/home/kxepal/projects/as...",...])
at <0.411.0> exit with reason shutdown in context shutdown_error
13:14:36.053 [info] Application config exited with reason: stopped
13:14:36.135 [info] Application config started on node nonode@nohost
13:14:36.135 [notice] config: [remove_handler] any set to any for reason nil
13:14:36.135 [info] config_listener(config_tests) stopped with reason:
shutdown
13:14:36.135 [notice] config: [httpd] port set to 80 for reason nil
13:14:36.139 [info] Application config exited with reason: stopped
13:14:36.150 [info] Application config started on node nonode@nohost
13:14:36.150 [notice] config: [remove_handler] any set to any for reason nil
13:14:36.150 [info] config_listener(config_tests) stopped with reason:
shutdown
13:14:36.153 [error] Supervisor config_sup had child config started with
config:start_link(["/home/kxepal/projects/asf/couchdb/couchdb/tmp/etc/default_eunit.ini","/home/kxepal/projects/as...",...])
at <0.431.0> exit with reason shutdown in context shutdown_error
13:14:36.154 [info] Application config exited with reason: stopped
module 'config_writer'
module 'config_sup'
=======================================================
Failed: 4. Skipped: 0. Passed: 28.
One or more tests were cancelled.
=INFO REPORT==== 19-Jun-2015::13:14:36 ===
application: lager
exited: stopped
type: temporary
ERROR: One or more eunit tests failed.
=INFO REPORT==== 19-Jun-2015::13:14:36 ===
application: goldrush
exited: killed
type: temporary
ERROR: eunit failed while processing
/home/kxepal/projects/asf/couchdb/couchdb/src/config: rebar_abort
Makefile:69: recipe for target 'eunit' failed
make: *** [eunit] Error 1
```
While tests are passed when runs only from couchdb-config repository.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---