-
Notifications
You must be signed in to change notification settings - Fork 225
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
xSQLServer: Problem running integration tests with fixes in issue #649 #774
Comments
Currently I'm looking at splitting up the Unit tests and Integration tests so they run in different build workers. |
Splitting on different build workers does work. But the test framework currently doesn't handle that, because it will send up an incomplete test result file (the last run only). And the code coverage listing in AppVeyor will not be accurate since it will not take in account the order test run. I will look at another solution, which means I have to modify a PR I already sent in for making it possible to run ordered integration tests. Essentially I will in that make sure that integration tests are always run last. And in appveyor.yml we will either
I opt for the last. Or even better, both (but I don't think we go so far now). I think we start with copying SQLPS module back because that is probably what most users still will use. Opened an issue #778 so we get support for SqlServer PowerShell module too. |
- Changes to xSQLServer - Updated appveyor.yml so that integration tests can run in AppVeyor (issue dsccommunity#774). - Changes to xSQLServerSetup - Fixed so that the integration test copies back the SQLPS module (issue dsccommunity#774).
- Changes to xSQLServer - Updated appveyor.yml so that integration tests can run in AppVeyor (issue dsccommunity#774). - Changes to xSQLServerSetup - Fixed so that the integration test copies back the SQLPS module (issue dsccommunity#774).
- Changes to xSQLServer - Updated appveyor.yml so that integration tests run in order and so that the SQLPS module folders are renamed to not disturb the units test, but can be renamed back by the integration tests xSQLServerSetup so that the integration tests can run successfully. (issue #774). - Changes to xSQLServerHelper - Changes to Connect-SQL and Import-SQLPSModule - Now it correctly loads the correct assemblies when SqlServer module is present (issue #649). - Now SQLPS module will be correctly loaded (discovered) after installation of SQL Server. Previously resources depending on SQLPS module could fail because SQLPS was not found after installation because the PSModulePath environment variable in the (LCM) PowerShell session did not contain the new module path. - Changes to xSQLServerSetup - Fixed so that the integration test renames back the SQLPS module folders if they was renamed by AppVeyor (in the appveyor.yml file). (issue #774). - Fixed so integration test does not write warnings when SQLPS module is loaded (issue #798).
Details of the scenario you tried and the problem that is occurring:
I got a problem when trying to send in a pull request for issue #649. The integration tests fail because in appveyor.yml we are removing all the SQLPS modules because they messed up the mocking of SMO (more information in issue #239). And the integration tests need SQLPS (or SqlServer) PowerShell module to runm with these fixes in issue #649.
Because we are removing that SQLPS module, and there is already SQL Server 2016 Developer edition installed on the AppVeyor build worker, SQL Server Setup does not reinstall SQLPS module.
BUT, if it would, or we just don't remove it, then the unit testing would start to break again. Because the SMO assembly is loaded so our SMO mocks can't load, breaking the unit tests.
The DSC configuration that is using the resource (as detailed as possible):
n/a
Version of the Operating System, SQL Server and PowerShell the DSC Target Node is running:
n/a
What module (SqlServer or SQLPS) and which version of the module the DSC Target Node is running:
n/a
Version of the DSC module you're using, or 'dev' if you're using current dev branch:
Dev
The text was updated successfully, but these errors were encountered: