{"action":"created","issue":{"url":"https://api.github.com/repos/PowerShell/xSQLServer/issues/186","repository_url":"https://api.github.com/repos/PowerShell/xSQLServer","labels_url":"https://api.github.com/repos/PowerShell/xSQLServer/issues/186/labels{/name}","comments_url":"https://api.github.com/repos/PowerShell/xSQLServer/issues/186/comments","events_url":"https://api.github.com/repos/PowerShell/xSQLServer/issues/186/events","html_url":"https://github.com/PowerShell/xSQLServer/issues/186","id":187670667,"number":186,"title":"xSQLServerSetup: Create integration tests","user":{"login":"johlju","id":7189721,"avatar_url":"https://avatars.githubusercontent.com/u/7189721?v=3","gravatar_id":"","url":"https://api.github.com/users/johlju","html_url":"https://github.com/johlju","followers_url":"https://api.github.com/users/johlju/followers","following_url":"https://api.github.com/users/johlju/following{/other_user}","gists_url":"https://api.github.com/users/johlju/gists{/gist_id}","starred_url":"https://api.github.com/users/johlju/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johlju/subscriptions","organizations_url":"https://api.github.com/users/johlju/orgs","repos_url":"https://api.github.com/users/johlju/repos","events_url":"https://api.github.com/users/johlju/events{/privacy}","received_events_url":"https://api.github.com/users/johlju/received_events","type":"User","site_admin":false},"labels":[{"id":200152071,"url":"https://api.github.com/repos/PowerShell/xSQLServer/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-11-07T10:09:06Z","updated_at":"2016-11-07T21:48:13Z","closed_at":null,"body":"We should start to create integration tests. xSQLServerSetup would be the ideal resource to start with since all other integration tests are dependent on that working (?). We need a SQL instance to test the other resources on.\r\nIf nobody else is up to it I would be happy to try to get some basic integration tests done. It would be a fun challenge. \r\n\r\nI looked at @plagueHO's integration tests in xNetworking and also the integration tests in SharePointDsc. And templates are here: https://github.com/PowerShell/DscResources/tree/master/Tests.Template \r\n\r\nBut... I need a bit more information how this works practically.\r\n\r\n@kwirkykat @mbreakey3 @plagueHO or anyone else with experience with this.\r\n\r\n- To be able to create an integration test for xSQLServerSetup I would need the SQL Server media somewhere accessible, preferably all supported versions, either on the node or in a UNC path. How does this work? \r\n- Does the node get clean (new) before each commit to PR? Or is there a need for the integration test to clean up (uninstall SQL in this case) before next commit? (I would guess/hope tests always run on a clean node)\r\n- Is it possible to have a node with a pre-installed SQL Server instance (preferably an separate instance for all supported versions) so some integration tests can run aginst that/those so the finish quicker (than waiting for the xSQLServerSetup integration tests to finish).\r\n- For some resources we need to use user accounts. It might work with local user accounts, but some resources might need an AD, for example using Failover cluster (?). That means it would need an AD as well. Is that possible? (Preferably the AD could be cleanup after the test run is finished, and not deploy a new AD each run)\r\n- For some tests we might need two nodes with failover cluster (for AlwaysOn, and failover installs) to actually test stuff. Is that possible? (Failover cluster could be setup using DSC as well)\r\n- How far do we go with integration tests? :)\r\n"},"comment":{"url":"https://api.github.com/repos/PowerShell/xSQLServer/issues/comments/258973543","html_url":"https://github.com/PowerShell/xSQLServer/issues/186#issuecomment-258973543","issue_url":"https://api.github.com/repos/PowerShell/xSQLServer/issues/186","id":258973543,"user":{"login":"mbreakey3","id":18012846,"avatar_url":"https://avatars.githubusercontent.com/u/18012846?v=3","gravatar_id":"","url":"https://api.github.com/users/mbreakey3","html_url":"https://github.com/mbreakey3","followers_url":"https://api.github.com/users/mbreakey3/followers","following_url":"https://api.github.com/users/mbreakey3/following{/other_user}","gists_url":"https://api.github.com/users/mbreakey3/gists{/gist_id}","starred_url":"https://api.github.com/users/mbreakey3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbreakey3/subscriptions","organizations_url":"https://api.github.com/users/mbreakey3/orgs","repos_url":"https://api.github.com/users/mbreakey3/repos","events_url":"https://api.github.com/users/mbreakey3/events{/privacy}","received_events_url":"https://api.github.com/users/mbreakey3/received_events","type":"User","site_admin":false},"created_at":"2016-11-07T21:48:13Z","updated_at":"2016-11-07T21:48:13Z","body":"Integration tests are a bit more flexible than unit tests since the way to write them can vary based on the nature of the resource, so we don't have as many hard rules on writing them. The main thing is that it's testing the actual functionality of the resource - making sure it really does what it says it does."}}
{"actor":{"display_login":"mbreakey3"}}