{"action":"created","issue":{"url":"https://api.github.com/repos/PowerShell/DscResource.Tests/issues/216","repository_url":"https://api.github.com/repos/PowerShell/DscResource.Tests","labels_url":"https://api.github.com/repos/PowerShell/DscResource.Tests/issues/216/labels{/name}","comments_url":"https://api.github.com/repos/PowerShell/DscResource.Tests/issues/216/comments","events_url":"https://api.github.com/repos/PowerShell/DscResource.Tests/issues/216/events","html_url":"https://github.com/PowerShell/DscResource.Tests/pull/216","id":310475359,"number":216,"title":"BREAKING CHANGE: Support multiple containers for testing both unit- and integration tests - Fixes #204","user":{"login":"johlju","id":7189721,"avatar_url":"https://avatars0.githubusercontent.com/u/7189721?v=4","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":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-04-02T12:43:01Z","updated_at":"2018-04-02T12:46:04Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/PowerShell/DscResource.Tests/pulls/216","html_url":"https://github.com/PowerShell/DscResource.Tests/pull/216","diff_url":"https://github.com/PowerShell/DscResource.Tests/pull/216.diff","patch_url":"https://github.com/PowerShell/DscResource.Tests/pull/216.patch"},"body":"### About breaking change \r\n**Note: It is probably only SqlServerDsc is affected by this breaking change.**\r\n\r\nI labeled this as a breaking change according to guidelines as it removes a parameter that was previously used for starting containers, and changes the behavior of parameter `RunTestInOrder` as it now handles the container logic. Also the decoration `[Microsoft.DscResourceKit.IntegrationTest(OrderNumber = 1)]` need to be moved from the configuration file to the integration test file.\r\nSee more in the change log.\r\n\r\n### Changes\r\n\r\n- Changes to DscResource.Tests\r\n  - Added new helper function Get-DscTestContainerInformation to read the container\r\n    information in a particular PowerShell script test file (.Tests.ps1).\r\n  - BREAKING CHANGE: For those repositories that are using parameter `RunTestInOrder`\r\n    for the helper function `Invoke-AppveyorTestScriptTask` the\r\n    decoration `[Microsoft.DscResourceKit.IntegrationTest(OrderNumber = 1)]` need\r\n    to move from the configuration file to the test file. This was done since unit\r\n    tests does not have configuration files, and also to align the ability to\r\n    define the order and the container information using the same decoration.\r\n    It is also natural to have the decoration in the test files since those are\r\n    the scripts that are actually run in order.\r\n  - BREAKING CHANGE: The parameter `RunInDocker` is removed in helper function\r\n    `Invoke-AppveyorTestScriptTask`. Using parameter `RunTestInOrder` will now\r\n    handle running tests in a container, but only if at least on test is decorated\r\n    using `[Microsoft.DscResourceKit.IntegrationTest()]` or\r\n    `[Microsoft.DscResourceKit.UnitTest()]`, together with the correct named arguments.\r\n  - Added support for the default shared module to run unit test and integration test\r\n    in a container by decorating each test file with either\r\n    `[Microsoft.DscResourceKit.IntegrationTest()]` or\r\n    `[Microsoft.DscResourceKit.UnitTest()]`.\r\n- Changes to DcsResource.Container\r\n  - Now has support for verifying if image, with or without\r\n    a tag, exist locally or needs to be pulled from Docker Hub.\r\n  - Now shows the correct localized message when downloading\r\n    an image.\r\n  - If 'latest' tag is used on the image name, 'docker pull' will be called to\r\n    make sure the local revision of 'latest' is actually the latest revision on\r\n    Docker Hub. If it isn't, then the latest image will be pulled from Docker Hub.\r\n\r\n### Tests\r\nThis are updated as the test runs finishes. \r\n\r\n* Repository using shared default model without paramater `RunTestInOrder` (PSDscResource):\r\n* Repository using \"harness\" model (SharePointDsc): \r\n* Repository using shared default model with parameter `RunTestInOrder` and without containers (SqlServerDsc): https://ci.appveyor.com/project/johlju/sqlserverdsc/build/9.0.387.0\r\n* Repository using shared default model with 2 containers:\r\n* Repository using shared default model with 2 containers - build worker fail:\r\n* Repository using shared default model with 2 containers - 1st container fail:\r\n* Repository using shared default model with 2 containers - 2nd container fail:\r\n* Repository using shared default model with 2 containers - both containers fail:\r\n* Repository using shared default model with 2 containers - both containers and build worker fail:\n\n<!-- Reviewable:start -->\n---\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/powershell/dscresource.tests/216)\n<!-- Reviewable:end -->\n"},"comment":{"url":"https://api.github.com/repos/PowerShell/DscResource.Tests/issues/comments/377921982","html_url":"https://github.com/PowerShell/DscResource.Tests/pull/216#issuecomment-377921982","issue_url":"https://api.github.com/repos/PowerShell/DscResource.Tests/issues/216","id":377921982,"user":{"login":"codecov-io","id":8655789,"avatar_url":"https://avatars0.githubusercontent.com/u/8655789?v=4","gravatar_id":"","url":"https://api.github.com/users/codecov-io","html_url":"https://github.com/codecov-io","followers_url":"https://api.github.com/users/codecov-io/followers","following_url":"https://api.github.com/users/codecov-io/following{/other_user}","gists_url":"https://api.github.com/users/codecov-io/gists{/gist_id}","starred_url":"https://api.github.com/users/codecov-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codecov-io/subscriptions","organizations_url":"https://api.github.com/users/codecov-io/orgs","repos_url":"https://api.github.com/users/codecov-io/repos","events_url":"https://api.github.com/users/codecov-io/events{/privacy}","received_events_url":"https://api.github.com/users/codecov-io/received_events","type":"User","site_admin":false},"created_at":"2018-04-02T12:46:04Z","updated_at":"2018-04-02T12:46:04Z","author_association":"NONE","body":"# [Codecov](https://codecov.io/gh/PowerShell/DscResource.Tests/pull/216?src=pr&el=h1) Report\n> Merging [#216](https://codecov.io/gh/PowerShell/DscResource.Tests/pull/216?src=pr&el=desc) into [dev](https://codecov.io/gh/PowerShell/DscResource.Tests/commit/0cc18de707a9e25e7ddf04916020ef5633ae1d76?src=pr&el=desc) will **decrease** coverage by `<1%`.\n> The diff coverage is `16%`.\n\n[![Impacted file tree graph](https://codecov.io/gh/PowerShell/DscResource.Tests/pull/216/graphs/tree.svg?token=CacoHQHXez&src=pr&width=650&height=150)](https://codecov.io/gh/PowerShell/DscResource.Tests/pull/216?src=pr&el=tree)\n\n```diff\n@@        Coverage Diff         @@\n##           dev   #216   +/-   ##\n==================================\n- Coverage   52%    51%   -1%     \n==================================\n  Files        4      4           \n  Lines      595    639   +44     \n==================================\n+ Hits       312    332   +20     \n- Misses     283    307   +24\n```\n"}}
{"actor":{"display_login":"codecov-io"}}