Open TraGicCode opened 7 years ago
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:
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.
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?
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.
@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.
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.
@johlju have you looked at this?
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.