{"action":"created","comment":{"url":"https://api.github.com/repos/puppetlabs/puppet/pulls/comments/34517490","id":34517490,"diff_hunk":"@@ -0,0 +1,63 @@\n+test_name \"Puppet facts face should resolve custom and external facts\"\n+\n+#\n+# This test is intended to ensure that custom and external facts present\n+# on the agent are resolved and displayed by the puppet facts face.\n+#\n+custom_fact = <<CFACT\n+Facter.add('custom_fact') do\n+  setcode do\n+    'foo'\n+  end\n+end\n+CFACT\n+\n+unix_external_fact = <<EFACT\n+#!/bin/sh\n+echo 'external_fact=bar'\n+EFACT\n+\n+win_external_fact = <<EFACT\n+@echo off\n+echo external_fact=bar\n+EFACT\n+\n+agents.each do |agent|\n+  if agent['platform'] =~ /windows/\n+    external_fact = win_external_fact\n+    ext = '.bat'\n+  else\n+    external_fact = unix_external_fact\n+    ext = '.sh'\n+  end\n+\n+  step \"Create a fact dir with custom and external facts\"\n+  factdir = agent.tmpdir('4654-factdir')\n+\n+  on agent, \"mkdir -p '#{File.join(factdir, 'lib', 'facter')}'\"\n+  on agent, \"mkdir -p '#{File.join(factdir, 'facts.d')}'\"\n+  on agent, puppet('apply'), :stdin => <<MANIFEST\n+  file { \"#{factdir}/lib/facter/custom.rb\":\n+    ensure  => file,\n+    content => \"#{custom_fact}\",\n+  }\n+\n+  file { \"#{factdir}/facts.d/external#{ext}\":\n+    ensure  => file,\n+    mode    => \"0755\",\n+    content => \"#{external_fact}\",\n+  }\n+MANIFEST\n+\n+  step \"Agent #{agent}: custom_fact and external_fact should be present in the output of `puppet facts`\"\n+  on agent, puppet('facts',\n+                   '--libdir', File.join(factdir, 'lib'),\n+                   '--pluginfactdest', File.join(factdir, 'facts.d')) do","path":"acceptance/tests/face/4654_facts_face.rb","position":55,"original_position":55,"commit_id":"cba41a9199d2d3766653b3c9b8f7836e7f4a33cc","original_commit_id":"cba41a9199d2d3766653b3c9b8f7836e7f4a33cc","user":{"login":"whopper","id":507621,"avatar_url":"https://avatars.githubusercontent.com/u/507621?v=3","gravatar_id":"","url":"https://api.github.com/users/whopper","html_url":"https://github.com/whopper","followers_url":"https://api.github.com/users/whopper/followers","following_url":"https://api.github.com/users/whopper/following{/other_user}","gists_url":"https://api.github.com/users/whopper/gists{/gist_id}","starred_url":"https://api.github.com/users/whopper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whopper/subscriptions","organizations_url":"https://api.github.com/users/whopper/orgs","repos_url":"https://api.github.com/users/whopper/repos","events_url":"https://api.github.com/users/whopper/events{/privacy}","received_events_url":"https://api.github.com/users/whopper/received_events","type":"User","site_admin":false},"body":"Yeah, makes sense. I believe there may be a simple way to get nix/windows paths out of beaker as well.","created_at":"2015-07-13T22:03:29Z","updated_at":"2015-07-13T22:03:29Z","html_url":"https://github.com/puppetlabs/puppet/pull/4083#discussion_r34517490","pull_request_url":"https://api.github.com/repos/puppetlabs/puppet/pulls/4083","_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/puppet/pulls/comments/34517490"},"html":{"href":"https://github.com/puppetlabs/puppet/pull/4083#discussion_r34517490"},"pull_request":{"href":"https://api.github.com/repos/puppetlabs/puppet/pulls/4083"}}},"pull_request":{"url":"https://api.github.com/repos/puppetlabs/puppet/pulls/4083","id":39854851,"html_url":"https://github.com/puppetlabs/puppet/pull/4083","diff_url":"https://github.com/puppetlabs/puppet/pull/4083.diff","patch_url":"https://github.com/puppetlabs/puppet/pull/4083.patch","issue_url":"https://api.github.com/repos/puppetlabs/puppet/issues/4083","number":4083,"state":"open","locked":false,"title":"(PUP-4654) Add acceptance test for custom facts in puppet facts face","user":{"login":"whopper","id":507621,"avatar_url":"https://avatars.githubusercontent.com/u/507621?v=3","gravatar_id":"","url":"https://api.github.com/users/whopper","html_url":"https://github.com/whopper","followers_url":"https://api.github.com/users/whopper/followers","following_url":"https://api.github.com/users/whopper/following{/other_user}","gists_url":"https://api.github.com/users/whopper/gists{/gist_id}","starred_url":"https://api.github.com/users/whopper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whopper/subscriptions","organizations_url":"https://api.github.com/users/whopper/orgs","repos_url":"https://api.github.com/users/whopper/repos","events_url":"https://api.github.com/users/whopper/events{/privacy}","received_events_url":"https://api.github.com/users/whopper/received_events","type":"User","site_admin":false},"body":"This commit adds a new acceptance test to ensure that custom and\r\nexternal facts are resolved correctly and present in the output\r\nof the puppet facts face.","created_at":"2015-07-13T20:49:59Z","updated_at":"2015-07-13T22:03:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"95d63b7b4b6e08774fb968e98bd904e5b15f0b22","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/puppetlabs/puppet/pulls/4083/commits","review_comments_url":"https://api.github.com/repos/puppetlabs/puppet/pulls/4083/comments","review_comment_url":"https://api.github.com/repos/puppetlabs/puppet/pulls/comments{/number}","comments_url":"https://api.github.com/repos/puppetlabs/puppet/issues/4083/comments","statuses_url":"https://api.github.com/repos/puppetlabs/puppet/statuses/cba41a9199d2d3766653b3c9b8f7836e7f4a33cc","head":{"label":"whopper:PUP-4654/puppet-facts-tests","ref":"PUP-4654/puppet-facts-tests","sha":"cba41a9199d2d3766653b3c9b8f7836e7f4a33cc","user":{"login":"whopper","id":507621,"avatar_url":"https://avatars.githubusercontent.com/u/507621?v=3","gravatar_id":"","url":"https://api.github.com/users/whopper","html_url":"https://github.com/whopper","followers_url":"https://api.github.com/users/whopper/followers","following_url":"https://api.github.com/users/whopper/following{/other_user}","gists_url":"https://api.github.com/users/whopper/gists{/gist_id}","starred_url":"https://api.github.com/users/whopper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whopper/subscriptions","organizations_url":"https://api.github.com/users/whopper/orgs","repos_url":"https://api.github.com/users/whopper/repos","events_url":"https://api.github.com/users/whopper/events{/privacy}","received_events_url":"https://api.github.com/users/whopper/received_events","type":"User","site_admin":false},"repo":{"id":4678592,"name":"puppet","full_name":"whopper/puppet","owner":{"login":"whopper","id":507621,"avatar_url":"https://avatars.githubusercontent.com/u/507621?v=3","gravatar_id":"","url":"https://api.github.com/users/whopper","html_url":"https://github.com/whopper","followers_url":"https://api.github.com/users/whopper/followers","following_url":"https://api.github.com/users/whopper/following{/other_user}","gists_url":"https://api.github.com/users/whopper/gists{/gist_id}","starred_url":"https://api.github.com/users/whopper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whopper/subscriptions","organizations_url":"https://api.github.com/users/whopper/orgs","repos_url":"https://api.github.com/users/whopper/repos","events_url":"https://api.github.com/users/whopper/events{/privacy}","received_events_url":"https://api.github.com/users/whopper/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/whopper/puppet","description":"Server automation framework and application","fork":true,"url":"https://api.github.com/repos/whopper/puppet","forks_url":"https://api.github.com/repos/whopper/puppet/forks","keys_url":"https://api.github.com/repos/whopper/puppet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/whopper/puppet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/whopper/puppet/teams","hooks_url":"https://api.github.com/repos/whopper/puppet/hooks","issue_events_url":"https://api.github.com/repos/whopper/puppet/issues/events{/number}","events_url":"https://api.github.com/repos/whopper/puppet/events","assignees_url":"https://api.github.com/repos/whopper/puppet/assignees{/user}","branches_url":"https://api.github.com/repos/whopper/puppet/branches{/branch}","tags_url":"https://api.github.com/repos/whopper/puppet/tags","blobs_url":"https://api.github.com/repos/whopper/puppet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/whopper/puppet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/whopper/puppet/git/refs{/sha}","trees_url":"https://api.github.com/repos/whopper/puppet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/whopper/puppet/statuses/{sha}","languages_url":"https://api.github.com/repos/whopper/puppet/languages","stargazers_url":"https://api.github.com/repos/whopper/puppet/stargazers","contributors_url":"https://api.github.com/repos/whopper/puppet/contributors","subscribers_url":"https://api.github.com/repos/whopper/puppet/subscribers","subscription_url":"https://api.github.com/repos/whopper/puppet/subscription","commits_url":"https://api.github.com/repos/whopper/puppet/commits{/sha}","git_commits_url":"https://api.github.com/repos/whopper/puppet/git/commits{/sha}","comments_url":"https://api.github.com/repos/whopper/puppet/comments{/number}","issue_comment_url":"https://api.github.com/repos/whopper/puppet/issues/comments{/number}","contents_url":"https://api.github.com/repos/whopper/puppet/contents/{+path}","compare_url":"https://api.github.com/repos/whopper/puppet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/whopper/puppet/merges","archive_url":"https://api.github.com/repos/whopper/puppet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/whopper/puppet/downloads","issues_url":"https://api.github.com/repos/whopper/puppet/issues{/number}","pulls_url":"https://api.github.com/repos/whopper/puppet/pulls{/number}","milestones_url":"https://api.github.com/repos/whopper/puppet/milestones{/number}","notifications_url":"https://api.github.com/repos/whopper/puppet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/whopper/puppet/labels{/name}","releases_url":"https://api.github.com/repos/whopper/puppet/releases{/id}","created_at":"2012-06-15T18:31:29Z","updated_at":"2014-09-29T18:19:22Z","pushed_at":"2015-07-13T20:48:14Z","git_url":"git://github.com/whopper/puppet.git","ssh_url":"git@github.com:whopper/puppet.git","clone_url":"https://github.com/whopper/puppet.git","svn_url":"https://github.com/whopper/puppet","homepage":"http://www.puppetlabs.com/puppet/introduction/","size":52137,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"puppetlabs:stable","ref":"stable","sha":"ed27bd04824884ba7e13f81340313c41b6347228","user":{"login":"puppetlabs","id":234268,"avatar_url":"https://avatars.githubusercontent.com/u/234268?v=3","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,"name":"puppet","full_name":"puppetlabs/puppet","owner":{"login":"puppetlabs","id":234268,"avatar_url":"https://avatars.githubusercontent.com/u/234268?v=3","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}","created_at":"2010-09-14T19:26:44Z","updated_at":"2015-07-13T11:04:27Z","pushed_at":"2015-07-13T21:06:38Z","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":"http://www.puppetlabs.com/puppet/introduction/","size":117210,"stargazers_count":3430,"watchers_count":3430,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1451,"mirror_url":null,"open_issues_count":29,"forks":1451,"open_issues":29,"watchers":3430,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/puppet/pulls/4083"},"html":{"href":"https://github.com/puppetlabs/puppet/pull/4083"},"issue":{"href":"https://api.github.com/repos/puppetlabs/puppet/issues/4083"},"comments":{"href":"https://api.github.com/repos/puppetlabs/puppet/issues/4083/comments"},"review_comments":{"href":"https://api.github.com/repos/puppetlabs/puppet/pulls/4083/comments"},"review_comment":{"href":"https://api.github.com/repos/puppetlabs/puppet/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/puppetlabs/puppet/pulls/4083/commits"},"statuses":{"href":"https://api.github.com/repos/puppetlabs/puppet/statuses/cba41a9199d2d3766653b3c9b8f7836e7f4a33cc"}}}}