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

Add tests for barclamp pacemaker #31

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mmnelemane
Copy link

Verifies deployment with basic tests for DRBD and CRM on the HA cluster.

@aspiers aspiers added the wip label Sep 25, 2015
@aspiers aspiers changed the title [WIP]Add tests for barclamp pacemaker Add tests for barclamp pacemaker Sep 25, 2015
#device /dev/drbd-cct is chosen to avoid conflicts with
#other existing device paths on the nodes
@primary_node.exec!("open('/etc/drbd.d/cct_test1.res', 'w') { |f|
f << \"# Generated Manually for d52-54-02-77-77-02.virtual.cloud.suse.de\"
Copy link

Choose a reason for hiding this comment

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

It would be nicer to get this from an external file, or at least use a heredoc.

@aspiers
Copy link

aspiers commented Sep 25, 2015

In general this looks really awesome, thanks a lot!

Other than my comments about DRY, I just have one overall observation at this point: the scenarios are really long. I don't think cucumber was supposed to be used like this. But maybe this is a deliberate choice to avoid lengthy setup for each scenario? If so is there any way to work around that?

@mmnelemane
Copy link
Author

@aspiers: Thanks for the comments. I will refactor the code and submit the PR again.

I do understand the scenarios are long, but i still feel they don't cover a few aspects. However, I think if we integrate CTS runs into mkcloud testsetup, then most of the tests in CCT can be eliminated OR yet another way could be to invoke pacemaker/CTS cases from CCT.

@aspiers
Copy link

aspiers commented Sep 30, 2015

To clarify: I am not at all objecting to these tests being comprehensive. I just wonder if they should be split up into a much larger number of smaller scenarios. AIUI best practice with cucumber is to have scenarios with not more than 5 or 6 steps. But I could be wrong. I'm also open to the idea of using CTS although I'd like to know what the advantages are. It's a much older testing framework than Cucumber so I expect it will have some disadvantages.

@mmnelemane mmnelemane force-pushed the test-pacemaker branch 3 times, most recently from 71d6d9b to abbc46a Compare October 1, 2015 14:09
@mmnelemane
Copy link
Author

@aspiers: I tried to separate some of the tests to create 3 scenarios now. Regarding CTS, my understanding was that it is a more elaborate test suite that can be used for stress tests. And the advantage is that we need not maintain it ourselves and has community to support. However we can have CCT to do basic smoke tests and CTS for more regressive tests (not integrated into mkcloud testsetup currently). So in essence both CTS and CCT could exist for Pacemaker.

@aspiers
Copy link

aspiers commented Oct 2, 2015

Yeah, that might make sense. I haven't looked too deeply into CTS yet.

@mmnelemane mmnelemane force-pushed the test-pacemaker branch 5 times, most recently from 98c1967 to 3926c07 Compare October 5, 2015 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants