Skip to content
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

Fix #1080 #1081

Merged
merged 2 commits into from
Dec 12, 2016
Merged

Fix #1080 #1081

merged 2 commits into from
Dec 12, 2016

Conversation

kenstir
Copy link

@kenstir kenstir commented Nov 18, 2016

This PR addresses #1080

Proposed changes include:

  • change test group finalise method to delete users given the test config, not the atom 'ok'

@@ -47,8 +47,8 @@ finalise_by_all_metrics_are_global(Config, false) ->
finalise_by_all_metrics_are_global(Config, true) ->
Config1 = lists:keydelete(all_metrics_are_global, 1, Config),
%% TODO: Refactor once escalus becomes compatible with multiple nodes RPC
Config2 = distributed_helper:remove_node_from_cluster(ejabberd_node_utils:mim2(), Config1),
escalus:delete_users(Config2, escalus:get_users(?ONLY_GLOBAL_METRICS_GROUP_USERS)).
distributed_helper:remove_node_from_cluster(ejabberd_node_utils:mim2(), Config1),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to Elvis:

Line 50 is too long: distributed_helper:remove_node_from_cluster(ejabberd_node_utils:mim2(), Config1),.

Config2 = distributed_helper:remove_node_from_cluster(ejabberd_node_utils:mim2(), Config1),
escalus:delete_users(Config2, escalus:get_users(?ONLY_GLOBAL_METRICS_GROUP_USERS)).
distributed_helper:remove_node_from_cluster(ejabberd_node_utils:mim2(), Config1),
escalus:delete_users(Config1, escalus:get_users(?ONLY_GLOBAL_METRICS_GROUP_USERS)).

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to Elvis:

Line 51 is too long: escalus:delete_users(Config1, escalus:get_users(?ONLY_GLOBAL_METRICS_GROUP_USERS))..

Copy link
Contributor

@michalwski michalwski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @kenstir

Thanks a lot for your contribution and for using MongooseIM. I really appreciate the smallest changes improving integration with other CI tools, or just making things easier.

I commented on things we may not want in main repo. Also, it would be perfect if you could fix the 2 Elvis's suggestions as well.

@@ -49,13 +49,14 @@ otp_release:
- 18.3
env:
- PRESET=internal_mnesia DB=mnesia REL_CONFIG=with-all
ken_disabled_upstream_env:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-enable all the disabled presets for mainstream repo. I understand in your setup you need only one preset. Here in the main repo we need to test all the configurations.

- PRESET=mysql_redis DB=mysql REL_CONFIG="with-mysql with-redis"
- PRESET=odbc_pgsql_mnesia DB=pgsql REL_CONFIG=with-odbc
- PRESET=ldap_mnesia DB=mnesia REL_CONFIG=with-none
- PRESET=riak_mnesia DB=riak REL_CONFIG=with-riak
- PRESET=dialyzer_only

matrix:
ken_disabled_upstream_matrix:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same thing as re ken_disabled_upstream_env

@@ -0,0 +1,74 @@
%% Spec examples:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably don't need jenkins.spec file in main repo.

@@ -0,0 +1,165 @@
#!/bin/bash
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any way to merge this file with tools/travis-test.sh?

@kenstir
Copy link
Author

kenstir commented Nov 21, 2016

Hi Michal,

Thanks for your helpful comments. I accidentally submitted this PR with all the changes in my repo, when what I really wanted was just the single commit fe4a97c fixing the issue. I am sorry for the trouble. What is better for you, a new PR or an update to this one?

@michalwski
Copy link
Contributor

You can rebase and force push this one.

@kenstir kenstir force-pushed the fix-test-cleanup-1080 branch from fe4a97c to 0bac895 Compare December 8, 2016 13:30
Config2 = distributed_helper:remove_node_from_cluster(ejabberd_node_utils:mim2(), Config1),
escalus:delete_users(Config2, escalus:get_users(?ONLY_GLOBAL_METRICS_GROUP_USERS)).
distributed_helper:remove_node_from_cluster(ejabberd_node_utils:mim2(), Config1),
escalus:delete_users(Config1, escalus:get_users(?ONLY_GLOBAL_METRICS_GROUP_USERS)).
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to Elvis:

Line 51 is too long: escalus:delete_users(Config1, escalus:get_users(?ONLY_GLOBAL_METRICS_GROUP_USERS))..

@@ -47,8 +47,8 @@ finalise_by_all_metrics_are_global(Config, false) ->
finalise_by_all_metrics_are_global(Config, true) ->
Config1 = lists:keydelete(all_metrics_are_global, 1, Config),
%% TODO: Refactor once escalus becomes compatible with multiple nodes RPC
Config2 = distributed_helper:remove_node_from_cluster(ejabberd_node_utils:mim2(), Config1),
escalus:delete_users(Config2, escalus:get_users(?ONLY_GLOBAL_METRICS_GROUP_USERS)).
distributed_helper:remove_node_from_cluster(ejabberd_node_utils:mim2(), Config1),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to Elvis:

Line 50 is too long: distributed_helper:remove_node_from_cluster(ejabberd_node_utils:mim2(), Config1),.

@michalwski michalwski merged commit e325ee1 into esl:master Dec 12, 2016
@michalwski
Copy link
Contributor

Thanks a lot @kenstir!

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.

3 participants