{"action":"created","comment":{"url":"https://api.github.com/repos/puppetlabs/puppet/pulls/comments/215794437","pull_request_review_id":153141973,"id":215794437,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNTc5NDQzNw==","diff_hunk":"@@ -0,0 +1,88 @@\n+test_name \"Windows Service Provider With Mixed UTF-8 Service Names\" do\n+  confine :to, :platform => 'windows'\n+\n+  tag 'audit:medium',\n+      'audit:acceptance'\n+\n+  require 'puppet/acceptance/windows_utils'\n+  extend Puppet::Acceptance::WindowsUtils\n+\n+  def service_manifest(name, params)\n+    params_str = params.map do |param, value|\n+      value_str = value.to_s\n+      value_str = \"\\\"#{value_str}\\\"\" if value.is_a?(String)\n+\n+      \"  #{param} => #{value_str}\"\n+    end.join(\",\\n\")\n+\n+    <<-MANIFEST\n+service { '#{name}':\n+  #{params_str}\n+}\n+MANIFEST\n+  end\n+\n+  [\n+    {\n+      :name => \"偽のサービス\"\n+      :start_sleep => 0,\n+      :pause_sleep => 0,\n+      :continue_sleep => 0,\n+      :stop_sleep => 0,\n+    },\n+    # different UTF-8 widths\n+    # 1-byte A\n+    # 2-byte ۿ - http://www.fileformat.info/info/unicode/char/06ff/index.htm - 0xDB 0xBF / 219 191\n+    # 3-byte ᚠ - http://www.fileformat.info/info/unicode/char/16A0/index.htm - 0xE1 0x9A 0xA0 / 225 154 160\n+    # 4-byte ܎ - http://www.fileformat.info/info/unicode/char/2070E/index.htm - 0xF0 0xA0 0x9C 0x8E / 240 160 156 142\n+    {\n+      :name => \"A\\u06FF\\u16A0\\u{2070E}\",\n+      :start_sleep => 0,\n+      :pause_sleep => 0,\n+      :continue_sleep => 0,\n+      :stop_sleep => 0,\n+    }\n+  ].each do |mock_service|\n+    agents.each do |agent|\n+      setup_service(agent, mock_service, 'MockService.cs')\n+\n+      step 'Verify that enable = false disables the service' do\n+        apply_manifest_on(agent, service_manifest(mock_service[:name], enable: false))\n+        assert_service_properties_on(agent, mock_service[:name], StartMode: 'Disabled')\n+      end\n+\n+      step 'Verify that enable = manual indicates that the service can be started on demand' do\n+        apply_manifest_on(agent, service_manifest(mock_service_nofail[:name], enable: :manual))\n+        assert_service_properties_on(agent, mock_service_nofail[:name], StartMode: 'Manual')\n+      end\n+\n+      step 'Verify that enable = true indicates that the service is started automatically upon reboot' do\n+        apply_manifest_on(agent, service_manifest(mock_service_nofail[:name], enable: true))\n+        assert_service_properties_on(agent, mock_service_nofail[:name], StartMode: 'Auto')\n+      end\n+\n+      step 'Verify that we can start the service' do\n+        apply_manifest_on(agent, service_manifest(mock_service[:name], ensure: :running))\n+        assert_service_properties_on(agent, mock_service[:name], State: 'Running')\n+      end\n+\n+      step 'Verify idempotence' do","path":"acceptance/tests/resource/service/windows_mixed_utf8.rb","position":69,"original_position":69,"commit_id":"41355f542afa473d6bba620556fac25b6055278f","original_commit_id":"ce44c44e202b66a5ba4d92ebecfabdb4c780f8be","user":{"login":"speedofdark","id":33673687,"node_id":"MDQ6VXNlcjMzNjczNjg3","avatar_url":"https://avatars3.githubusercontent.com/u/33673687?v=4","gravatar_id":"","url":"https://api.github.com/users/speedofdark","html_url":"https://github.com/speedofdark","followers_url":"https://api.github.com/users/speedofdark/followers","following_url":"https://api.github.com/users/speedofdark/following{/other_user}","gists_url":"https://api.github.com/users/speedofdark/gists{/gist_id}","starred_url":"https://api.github.com/users/speedofdark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/speedofdark/subscriptions","organizations_url":"https://api.github.com/users/speedofdark/orgs","repos_url":"https://api.github.com/users/speedofdark/repos","events_url":"https://api.github.com/users/speedofdark/events{/privacy}","received_events_url":"https://api.github.com/users/speedofdark/received_events","type":"User","site_admin":false},"body":"Makes sense.","created_at":"2018-09-06T22:11:42Z","updated_at":"2018-09-06T22:11:42Z","html_url":"https://github.com/puppetlabs/puppet/pull/7017#discussion_r215794437","pull_request_url":"https://api.github.com/repos/puppetlabs/puppet/pulls/7017","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/puppet/pulls/comments/215794437"},"html":{"href":"https://github.com/puppetlabs/puppet/pull/7017#discussion_r215794437"},"pull_request":{"href":"https://api.github.com/repos/puppetlabs/puppet/pulls/7017"}},"in_reply_to_id":215767561},"pull_request":{"url":"https://api.github.com/repos/puppetlabs/puppet/pulls/7017","id":210599644,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEwNTk5NjQ0","html_url":"https://github.com/puppetlabs/puppet/pull/7017","diff_url":"https://github.com/puppetlabs/puppet/pull/7017.diff","patch_url":"https://github.com/puppetlabs/puppet/pull/7017.patch","issue_url":"https://api.github.com/repos/puppetlabs/puppet/issues/7017","number":7017,"state":"open","locked":false,"title":"(PUP-5475) Refactor windows service provider to connect directly to windows API","user":{"login":"McdonaldSeanp","id":6415932,"node_id":"MDQ6VXNlcjY0MTU5MzI=","avatar_url":"https://avatars0.githubusercontent.com/u/6415932?v=4","gravatar_id":"","url":"https://api.github.com/users/McdonaldSeanp","html_url":"https://github.com/McdonaldSeanp","followers_url":"https://api.github.com/users/McdonaldSeanp/followers","following_url":"https://api.github.com/users/McdonaldSeanp/following{/other_user}","gists_url":"https://api.github.com/users/McdonaldSeanp/gists{/gist_id}","starred_url":"https://api.github.com/users/McdonaldSeanp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/McdonaldSeanp/subscriptions","organizations_url":"https://api.github.com/users/McdonaldSeanp/orgs","repos_url":"https://api.github.com/users/McdonaldSeanp/repos","events_url":"https://api.github.com/users/McdonaldSeanp/events{/privacy}","received_events_url":"https://api.github.com/users/McdonaldSeanp/received_events","type":"User","site_admin":false},"body":"Neither net.exe or sc.exe really satisfy our management needs for windows services, so this PR adds a new Util::Windows::Service ruby module to puppet's utilities that implements service control on windows directly with the windows API via FFI.\r\n\r\nSubsequently, this PR updates the service provider to re-implement the various functions of the provider API using the Windows::Service utility rather than win32-service + net.exe","created_at":"2018-08-23T23:08:31Z","updated_at":"2018-09-06T22:11:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"297fcf7493a80940ceee1df4faec37af10ed1c30","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/puppetlabs/puppet/pulls/7017/commits","review_comments_url":"https://api.github.com/repos/puppetlabs/puppet/pulls/7017/comments","review_comment_url":"https://api.github.com/repos/puppetlabs/puppet/pulls/comments{/number}","comments_url":"https://api.github.com/repos/puppetlabs/puppet/issues/7017/comments","statuses_url":"https://api.github.com/repos/puppetlabs/puppet/statuses/41355f542afa473d6bba620556fac25b6055278f","head":{"label":"McdonaldSeanp:PUP5475","ref":"PUP5475","sha":"41355f542afa473d6bba620556fac25b6055278f","user":{"login":"McdonaldSeanp","id":6415932,"node_id":"MDQ6VXNlcjY0MTU5MzI=","avatar_url":"https://avatars0.githubusercontent.com/u/6415932?v=4","gravatar_id":"","url":"https://api.github.com/users/McdonaldSeanp","html_url":"https://github.com/McdonaldSeanp","followers_url":"https://api.github.com/users/McdonaldSeanp/followers","following_url":"https://api.github.com/users/McdonaldSeanp/following{/other_user}","gists_url":"https://api.github.com/users/McdonaldSeanp/gists{/gist_id}","starred_url":"https://api.github.com/users/McdonaldSeanp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/McdonaldSeanp/subscriptions","organizations_url":"https://api.github.com/users/McdonaldSeanp/orgs","repos_url":"https://api.github.com/users/McdonaldSeanp/repos","events_url":"https://api.github.com/users/McdonaldSeanp/events{/privacy}","received_events_url":"https://api.github.com/users/McdonaldSeanp/received_events","type":"User","site_admin":false},"repo":{"id":48507869,"node_id":"MDEwOlJlcG9zaXRvcnk0ODUwNzg2OQ==","name":"puppet","full_name":"McdonaldSeanp/puppet","owner":{"login":"McdonaldSeanp","id":6415932,"node_id":"MDQ6VXNlcjY0MTU5MzI=","avatar_url":"https://avatars0.githubusercontent.com/u/6415932?v=4","gravatar_id":"","url":"https://api.github.com/users/McdonaldSeanp","html_url":"https://github.com/McdonaldSeanp","followers_url":"https://api.github.com/users/McdonaldSeanp/followers","following_url":"https://api.github.com/users/McdonaldSeanp/following{/other_user}","gists_url":"https://api.github.com/users/McdonaldSeanp/gists{/gist_id}","starred_url":"https://api.github.com/users/McdonaldSeanp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/McdonaldSeanp/subscriptions","organizations_url":"https://api.github.com/users/McdonaldSeanp/orgs","repos_url":"https://api.github.com/users/McdonaldSeanp/repos","events_url":"https://api.github.com/users/McdonaldSeanp/events{/privacy}","received_events_url":"https://api.github.com/users/McdonaldSeanp/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/McdonaldSeanp/puppet","description":"Server automation framework and application","fork":true,"url":"https://api.github.com/repos/McdonaldSeanp/puppet","forks_url":"https://api.github.com/repos/McdonaldSeanp/puppet/forks","keys_url":"https://api.github.com/repos/McdonaldSeanp/puppet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/McdonaldSeanp/puppet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/McdonaldSeanp/puppet/teams","hooks_url":"https://api.github.com/repos/McdonaldSeanp/puppet/hooks","issue_events_url":"https://api.github.com/repos/McdonaldSeanp/puppet/issues/events{/number}","events_url":"https://api.github.com/repos/McdonaldSeanp/puppet/events","assignees_url":"https://api.github.com/repos/McdonaldSeanp/puppet/assignees{/user}","branches_url":"https://api.github.com/repos/McdonaldSeanp/puppet/branches{/branch}","tags_url":"https://api.github.com/repos/McdonaldSeanp/puppet/tags","blobs_url":"https://api.github.com/repos/McdonaldSeanp/puppet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/McdonaldSeanp/puppet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/McdonaldSeanp/puppet/git/refs{/sha}","trees_url":"https://api.github.com/repos/McdonaldSeanp/puppet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/McdonaldSeanp/puppet/statuses/{sha}","languages_url":"https://api.github.com/repos/McdonaldSeanp/puppet/languages","stargazers_url":"https://api.github.com/repos/McdonaldSeanp/puppet/stargazers","contributors_url":"https://api.github.com/repos/McdonaldSeanp/puppet/contributors","subscribers_url":"https://api.github.com/repos/McdonaldSeanp/puppet/subscribers","subscription_url":"https://api.github.com/repos/McdonaldSeanp/puppet/subscription","commits_url":"https://api.github.com/repos/McdonaldSeanp/puppet/commits{/sha}","git_commits_url":"https://api.github.com/repos/McdonaldSeanp/puppet/git/commits{/sha}","comments_url":"https://api.github.com/repos/McdonaldSeanp/puppet/comments{/number}","issue_comment_url":"https://api.github.com/repos/McdonaldSeanp/puppet/issues/comments{/number}","contents_url":"https://api.github.com/repos/McdonaldSeanp/puppet/contents/{+path}","compare_url":"https://api.github.com/repos/McdonaldSeanp/puppet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/McdonaldSeanp/puppet/merges","archive_url":"https://api.github.com/repos/McdonaldSeanp/puppet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/McdonaldSeanp/puppet/downloads","issues_url":"https://api.github.com/repos/McdonaldSeanp/puppet/issues{/number}","pulls_url":"https://api.github.com/repos/McdonaldSeanp/puppet/pulls{/number}","milestones_url":"https://api.github.com/repos/McdonaldSeanp/puppet/milestones{/number}","notifications_url":"https://api.github.com/repos/McdonaldSeanp/puppet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/McdonaldSeanp/puppet/labels{/name}","releases_url":"https://api.github.com/repos/McdonaldSeanp/puppet/releases{/id}","deployments_url":"https://api.github.com/repos/McdonaldSeanp/puppet/deployments","created_at":"2015-12-23T19:35:46Z","updated_at":"2018-08-17T20:08:03Z","pushed_at":"2018-09-06T21:29:50Z","git_url":"git://github.com/McdonaldSeanp/puppet.git","ssh_url":"git@github.com:McdonaldSeanp/puppet.git","clone_url":"https://github.com/McdonaldSeanp/puppet.git","svn_url":"https://github.com/McdonaldSeanp/puppet","homepage":"https://puppetlabs.com/puppet/what-is-puppet","size":68139,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"puppetlabs:5.5.x","ref":"5.5.x","sha":"2e32f055fe481259f74fa588d1e20ff53a064cc4","user":{"login":"puppetlabs","id":234268,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzNDI2OA==","avatar_url":"https://avatars0.githubusercontent.com/u/234268?v=4","gravatar_id":"","url":"https://api.github.com/users/puppetlabs","html_url":"https://github.com/puppetlabs","followers_url":"https://api.github.com/users/puppetlabs/followers","following_url":"https://api.github.com/users/puppetlabs/following{/other_user}","gists_url":"https://api.github.com/users/puppetlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/puppetlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puppetlabs/subscriptions","organizations_url":"https://api.github.com/users/puppetlabs/orgs","repos_url":"https://api.github.com/users/puppetlabs/repos","events_url":"https://api.github.com/users/puppetlabs/events{/privacy}","received_events_url":"https://api.github.com/users/puppetlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":910744,"node_id":"MDEwOlJlcG9zaXRvcnk5MTA3NDQ=","name":"puppet","full_name":"puppetlabs/puppet","owner":{"login":"puppetlabs","id":234268,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzNDI2OA==","avatar_url":"https://avatars0.githubusercontent.com/u/234268?v=4","gravatar_id":"","url":"https://api.github.com/users/puppetlabs","html_url":"https://github.com/puppetlabs","followers_url":"https://api.github.com/users/puppetlabs/followers","following_url":"https://api.github.com/users/puppetlabs/following{/other_user}","gists_url":"https://api.github.com/users/puppetlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/puppetlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puppetlabs/subscriptions","organizations_url":"https://api.github.com/users/puppetlabs/orgs","repos_url":"https://api.github.com/users/puppetlabs/repos","events_url":"https://api.github.com/users/puppetlabs/events{/privacy}","received_events_url":"https://api.github.com/users/puppetlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/puppetlabs/puppet","description":"Server automation framework and application","fork":false,"url":"https://api.github.com/repos/puppetlabs/puppet","forks_url":"https://api.github.com/repos/puppetlabs/puppet/forks","keys_url":"https://api.github.com/repos/puppetlabs/puppet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/puppetlabs/puppet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/puppetlabs/puppet/teams","hooks_url":"https://api.github.com/repos/puppetlabs/puppet/hooks","issue_events_url":"https://api.github.com/repos/puppetlabs/puppet/issues/events{/number}","events_url":"https://api.github.com/repos/puppetlabs/puppet/events","assignees_url":"https://api.github.com/repos/puppetlabs/puppet/assignees{/user}","branches_url":"https://api.github.com/repos/puppetlabs/puppet/branches{/branch}","tags_url":"https://api.github.com/repos/puppetlabs/puppet/tags","blobs_url":"https://api.github.com/repos/puppetlabs/puppet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/puppetlabs/puppet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/puppetlabs/puppet/git/refs{/sha}","trees_url":"https://api.github.com/repos/puppetlabs/puppet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/puppetlabs/puppet/statuses/{sha}","languages_url":"https://api.github.com/repos/puppetlabs/puppet/languages","stargazers_url":"https://api.github.com/repos/puppetlabs/puppet/stargazers","contributors_url":"https://api.github.com/repos/puppetlabs/puppet/contributors","subscribers_url":"https://api.github.com/repos/puppetlabs/puppet/subscribers","subscription_url":"https://api.github.com/repos/puppetlabs/puppet/subscription","commits_url":"https://api.github.com/repos/puppetlabs/puppet/commits{/sha}","git_commits_url":"https://api.github.com/repos/puppetlabs/puppet/git/commits{/sha}","comments_url":"https://api.github.com/repos/puppetlabs/puppet/comments{/number}","issue_comment_url":"https://api.github.com/repos/puppetlabs/puppet/issues/comments{/number}","contents_url":"https://api.github.com/repos/puppetlabs/puppet/contents/{+path}","compare_url":"https://api.github.com/repos/puppetlabs/puppet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/puppetlabs/puppet/merges","archive_url":"https://api.github.com/repos/puppetlabs/puppet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/puppetlabs/puppet/downloads","issues_url":"https://api.github.com/repos/puppetlabs/puppet/issues{/number}","pulls_url":"https://api.github.com/repos/puppetlabs/puppet/pulls{/number}","milestones_url":"https://api.github.com/repos/puppetlabs/puppet/milestones{/number}","notifications_url":"https://api.github.com/repos/puppetlabs/puppet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/puppetlabs/puppet/labels{/name}","releases_url":"https://api.github.com/repos/puppetlabs/puppet/releases{/id}","deployments_url":"https://api.github.com/repos/puppetlabs/puppet/deployments","created_at":"2010-09-14T19:26:44Z","updated_at":"2018-09-06T22:10:46Z","pushed_at":"2018-09-06T21:59:31Z","git_url":"git://github.com/puppetlabs/puppet.git","ssh_url":"git@github.com:puppetlabs/puppet.git","clone_url":"https://github.com/puppetlabs/puppet.git","svn_url":"https://github.com/puppetlabs/puppet","homepage":"https://puppet.com/puppet/what-is-puppet","size":68242,"stargazers_count":5063,"watchers_count":5063,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2044,"mirror_url":null,"archived":false,"open_issues_count":60,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":2044,"open_issues":60,"watchers":5063,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/puppet/pulls/7017"},"html":{"href":"https://github.com/puppetlabs/puppet/pull/7017"},"issue":{"href":"https://api.github.com/repos/puppetlabs/puppet/issues/7017"},"comments":{"href":"https://api.github.com/repos/puppetlabs/puppet/issues/7017/comments"},"review_comments":{"href":"https://api.github.com/repos/puppetlabs/puppet/pulls/7017/comments"},"review_comment":{"href":"https://api.github.com/repos/puppetlabs/puppet/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/puppetlabs/puppet/pulls/7017/commits"},"statuses":{"href":"https://api.github.com/repos/puppetlabs/puppet/statuses/41355f542afa473d6bba620556fac25b6055278f"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"speedofdark"}}