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

FailOverCluster: [Feature] - Test-Kitchen for setting up some acceptance tests #142

Open
TraGicCode opened this issue Sep 5, 2017 · 7 comments
Labels
discussion The issue is a discussion. enhancement The issue is an enhancement request.

Comments

@TraGicCode
Copy link
Contributor

Would it be helpful to create some acceptance tests using Test-Kitchen to verify certain features are working as intended? FailOverClustering is not the easiest thing to setup and not every scenarios can be tested under test-kitchen but it might be helpful.

@johlju
Copy link
Member

johlju commented Sep 5, 2017

Sure, I'm open to anything that would ease the integration testing. But I would want the same test framework as the DSC Resource Kit offers Integration Test template to validate the configuration. Is that possible?

Questions:

  • What would be needed for the user to run the integration tests?
  • And when you say not every scenarion, what scenarios are that?

@johlju johlju added the discussion The issue is a discussion. label Sep 5, 2017
@johlju johlju changed the title [Feature] - Test-Kitchen for setting up some acceptance tests xFailOverCluster: [Feature] - Test-Kitchen for setting up some acceptance tests Sep 5, 2017
@johlju johlju added the enhancement The issue is an enhancement request. label Sep 5, 2017
@TraGicCode
Copy link
Contributor Author

I am really new to cluster but i don't think there would be an easy way to test a cluster with shared storage. Not really sure how you would do this with vagrant. But the basic stuff could be done though. Creating a cluster...joining a second node...etc

Hmm i looked at the template but i don't understand they need to be using vagrant/test-kitchen/beaker or something to spin up a vm to apply the configuration too. You wouldn't want to run this in your own machine.

@johlju
Copy link
Member

johlju commented Sep 8, 2017

To test a failover cluster with shared storage you can use Windows Server 2016 (or Storage Server 2016) and use iSCSIDsc.

Please look at this comment on the steps I'm looking at. That could also be used to run tests using Test-Kitchen?

@johlju
Copy link
Member

johlju commented Sep 8, 2017

Btw. I think it is important that the user can run the tests on a Dev-machine, preferably with already present VM's. Because not all will be able to set up a dedicated server for running integration tests for testing a change in the code. But they do need to have enough memory on the Dev-machine to be able to run the entire integration testing infrastructure.

That said. There will be contributors that can't run this at all, in those cases I guess it will be up to me to run integration tests for the changes. We will need to add a new entry to the checklist in PR description that can be checked if integration tests has been run or not.

@TraGicCode
Copy link
Contributor Author

@johlju When doing the integration tests on VM's I wouldn't even bother with using already existing machines or evening trying to clean up after yourself. When they are run it should build out all the vm's and in the right order. This is the test setup phase. It should then run the tests once all things are setup correctly. The problem with using existing machines over and over again or even trying to clean up is you end up getting configuration drift over time.

@TraGicCode
Copy link
Contributor Author

I would use test-kitchen or puppetlabs beaker over labbuilder. These 2 testing frameworks were built with tackling the problem we are currently trying to solve. Generally you use these with chef and puppet respectively but i've seen and used them without either ( There are also examples in the wild of people writing dsc resources and using test-kitchen for integration/acceptance testing ). Test-Kitchen allows writing of tests in pester which makes sense for powershell dsc development.

@TraGicCode
Copy link
Contributor Author

@johlju have you looked at this?

https://github.com/VirtualEngine/Lability

@SteveL-MSFT SteveL-MSFT added this to Discussion in powershell/dscresources May 14, 2019
@SteveL-MSFT SteveL-MSFT removed this from Discussion in powershell/dscresources Nov 27, 2019
@johlju johlju changed the title xFailOverCluster: [Feature] - Test-Kitchen for setting up some acceptance tests FailOverCluster: [Feature] - Test-Kitchen for setting up some acceptance tests Jun 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion The issue is a discussion. enhancement The issue is an enhancement request.
Projects
None yet
Development

No branches or pull requests

2 participants