Skip to content

Correctly find schema for rabbit application named "rabbit.schema" #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 16, 2017

Conversation

lukebakken
Copy link
Contributor

@lukebakken lukebakken commented Jun 15, 2017

The issue I addressed in PR #9 and tried to address in #10 is that the config_schema_SUITE tests fail when run in a clone of a project outside of the umbrella. PR #9 fixed running that test suite in all projects except rabbitmq-server. PR #10 introduced a bug when finding the schema for the rabbit application, since the schema is named rabbitmq.schema but resides in deps/rabbit in an umbrella checkout.

This PR addresses the change in rabbitmq/rabbitmq-server#1267

rabbitmq-server

The config_schema_SUITE test will fail when run in a clone of github.com/rabbitmq/rabbitmq-server (i.e. outside of the umbrella project):

$ make ct-config_schema
# Trimmed...
config_schema_SUITE
    {'EXIT',
        {{badmatch,{error,enoent}},
         [{rabbit_ct_config_schema,copy_to,2,
              [{file,"src/rabbit_ct_config_schema.erl"},{line,66}]},
          {rabbit_ct_config_schema,'-init_schemas/2-lc$^0/1-0-',2,
              [{file,"src/rabbit_ct_config_schema.erl"},{line,35}]},
          {rabbit_ct_config_schema,init_schemas,2,
              [{file,"src/rabbit_ct_config_schema.erl"},{line,35}]},
          {test_server,ts_tc,3,[{file,"test_server.erl"},{line,1529}]},
          {test_server,run_test_case_eval1,6,
              [{file,"test_server.erl"},{line,1130}]},
          {test_server,run_test_case_eval,9,
              [{file,"test_server.erl"},{line,977}]}]}}

Using the rename-schema-file branch in rabbitmq-server and find-rabbit-schema branch in deps/rabbitmq_ct_helpers:

$ git co rename-schema-file
$ cd deps/rabbitmq_ct_helpers
$ git co find-rabbit-schema
$ cd ../..
$ make ct-config_schema
# Trimmed...
TEST INFO: 1 test(s), 1 case(s) in 1 suite(s)

== config_schema_SUITE ==

== config_schema_SUITE ==

  run_snippets
  run_snippets
  run_snippets
  run_snippets (01:02.063)
== config_schema_SUITE ==

== config_schema_SUITE ==

rabbitmq-public-umbrella

Command to test all deps that have config_schema_SUITE.erl. This command runs successfully using this branch (and failed with #10)

$ cd deps/rabbit
$ git co rename-schema-file
$ cd ../rabbitmq_ct_helpers
$ git co find-rabbit-schema
$ cd ../

# now in deps/ sub-directory of umbrella clone

$ for DEP in */test/config_schema_SUITE.erl; do pushd "$(dirname $DEP)/.."; pwd; make ct-config_schema; popd; done

@lukebakken lukebakken requested a review from dcorbacho June 15, 2017 15:44
@hairyhum
Copy link
Contributor

Should we rename the schema file instead?
It's a new thing in master and is used mostly internally.

@lukebakken
Copy link
Contributor Author

If that's an option that would be great. I'll look into it.

@hairyhum
Copy link
Contributor

Go ahead, just make sure the correct filename is used in actual config generation in https://github.com/rabbitmq/rabbitmq-server/blob/master/src/rabbit_config.erl

@lukebakken lukebakken changed the title Correctly find schema for rabbit application named "rabbitmq.schema" Correctly find schema for rabbit application named "rabbit.schema" Jun 15, 2017
Changes to support renaming rabbitmq.schema to rabbit.schema
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants