{"action":"created","comment":{"url":"https://api.github.com/repos/puppetlabs/r10k/pulls/comments/26795475","id":26795475,"diff_hunk":"@@ -0,0 +1,71 @@\n+require 'git_utils'\n+require 'r10k_utils'\n+require 'master_manipulator'\n+test_name 'CODEMGMT-117 - C63601 - Single Environment Specify Module that is Already Installed' \n+\n+#Init\n+master_certname = on(master, puppet('config', 'print', 'certname')).stdout.rstrip\n+environment_path = on(master, puppet('config', 'print', 'environmentpath')).stdout.rstrip\n+prod_env_path = File.join(environment_path, 'production')\n+\n+git_environments_path = '/root/environments'\n+last_commit = git_last_commit(master, git_environments_path)\n+\n+forge_module_path = File.join(prod_env_path, 'modules')\n+\n+#Verification\n+motd_path = '/etc/motd'\n+motd_contents = 'Hello!'\n+motd_contents_regex = /\\A#{motd_contents}\\z/\n+\n+#File\n+puppet_file = <<-PUPPETFILE\n+mod \"puppetlabs/motd\"\n+PUPPETFILE\n+\n+puppet_file_path = File.join(git_environments_path, 'Puppetfile')\n+\n+#Manifest\n+manifest = <<-MANIFEST\n+  class { 'motd':\n+    content => '#{motd_contents}',\n+  }\n+MANIFEST\n+\n+site_pp_path = File.join(git_environments_path, 'manifests', 'site.pp')\n+site_pp = create_site_pp(master_certname, manifest)\n+\n+#Teardown\n+teardown do\n+  clean_up_r10k(master, last_commit, git_environments_path)\n+\n+  step 'Remove \"/etc/motd\" File'\n+  on(agents, \"rm -rf #{motd_path}\")\n+end\n+\n+#Setup\n+step 'Add motd module from the forge using the PMT'\n+on(master, puppet('module', 'install', 'puppetlabs-motd', '--modulepath', forge_module_path)) \n+\n+step 'Remove \"/etc/motd\" File'\n+on(agents, \"rm -rf #{motd_path}\")\n+\n+step 'Inject New \"site.pp\" to the \"production\" Environment'\n+inject_site_pp(master, site_pp_path, site_pp)\n+\n+step 'Create \"Puppetfile\" for the \"production\" Environment'\n+create_remote_file(master, puppet_file_path, puppet_file)\n+\n+step 'Push Changes'\n+git_add_commit_push(master, 'production', 'Update site.pp and add module.', git_environments_path)\n+\n+#Tests\n+step 'Deploy \"production\" Environment via r10k with modules'\n+on(master, 'r10k deploy environment -p -v')\n+\n+agents.each do |agent|\n+  step \"Run Puppet Agent\"\n+  on(agent, puppet('agent', '--test', '--environment production'), :acceptable_exit_codes => 2)do |result|","path":"integration/tests/user_scenario/basic_workflow/single_env_module_already_installed.rb","position":68,"original_position":68,"commit_id":"a5a75877c8784ccae71471f2ad799085dc96e9c9","original_commit_id":"a5a75877c8784ccae71471f2ad799085dc96e9c9","user":{"login":"cowofevil","id":1972333,"avatar_url":"https://avatars.githubusercontent.com/u/1972333?v=3","gravatar_id":"","url":"https://api.github.com/users/cowofevil","html_url":"https://github.com/cowofevil","followers_url":"https://api.github.com/users/cowofevil/followers","following_url":"https://api.github.com/users/cowofevil/following{/other_user}","gists_url":"https://api.github.com/users/cowofevil/gists{/gist_id}","starred_url":"https://api.github.com/users/cowofevil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cowofevil/subscriptions","organizations_url":"https://api.github.com/users/cowofevil/orgs","repos_url":"https://api.github.com/users/cowofevil/repos","events_url":"https://api.github.com/users/cowofevil/events{/privacy}","received_events_url":"https://api.github.com/users/cowofevil/received_events","type":"User","site_admin":false},"body":"Missing space between \")\" and \"do\".","created_at":"2015-03-19T20:43:41Z","updated_at":"2015-03-19T20:43:41Z","html_url":"https://github.com/puppetlabs/r10k/pull/360#discussion_r26795475","pull_request_url":"https://api.github.com/repos/puppetlabs/r10k/pulls/360","_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/r10k/pulls/comments/26795475"},"html":{"href":"https://github.com/puppetlabs/r10k/pull/360#discussion_r26795475"},"pull_request":{"href":"https://api.github.com/repos/puppetlabs/r10k/pulls/360"}}},"pull_request":{"url":"https://api.github.com/repos/puppetlabs/r10k/pulls/360","id":31551744,"html_url":"https://github.com/puppetlabs/r10k/pull/360","diff_url":"https://github.com/puppetlabs/r10k/pull/360.diff","patch_url":"https://github.com/puppetlabs/r10k/pull/360.patch","issue_url":"https://api.github.com/repos/puppetlabs/r10k/issues/360","number":360,"state":"open","locked":false,"title":"(CODEMGMT-117) - modify 1 test, add 1 test.","user":{"login":"carlosvelarde","id":8421109,"avatar_url":"https://avatars.githubusercontent.com/u/8421109?v=3","gravatar_id":"","url":"https://api.github.com/users/carlosvelarde","html_url":"https://github.com/carlosvelarde","followers_url":"https://api.github.com/users/carlosvelarde/followers","following_url":"https://api.github.com/users/carlosvelarde/following{/other_user}","gists_url":"https://api.github.com/users/carlosvelarde/gists{/gist_id}","starred_url":"https://api.github.com/users/carlosvelarde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carlosvelarde/subscriptions","organizations_url":"https://api.github.com/users/carlosvelarde/orgs","repos_url":"https://api.github.com/users/carlosvelarde/repos","events_url":"https://api.github.com/users/carlosvelarde/events{/privacy}","received_events_url":"https://api.github.com/users/carlosvelarde/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-03-19T18:26:48Z","updated_at":"2015-03-19T20:43:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"93e7c0c3794c9e2f09d6513e8b7fdafe6ea50ee9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/puppetlabs/r10k/pulls/360/commits","review_comments_url":"https://api.github.com/repos/puppetlabs/r10k/pulls/360/comments","review_comment_url":"https://api.github.com/repos/puppetlabs/r10k/pulls/comments{/number}","comments_url":"https://api.github.com/repos/puppetlabs/r10k/issues/360/comments","statuses_url":"https://api.github.com/repos/puppetlabs/r10k/statuses/a5a75877c8784ccae71471f2ad799085dc96e9c9","head":{"label":"carlosvelarde:tests/master/CODEMGMT-117_basic_workflow","ref":"tests/master/CODEMGMT-117_basic_workflow","sha":"a5a75877c8784ccae71471f2ad799085dc96e9c9","user":{"login":"carlosvelarde","id":8421109,"avatar_url":"https://avatars.githubusercontent.com/u/8421109?v=3","gravatar_id":"","url":"https://api.github.com/users/carlosvelarde","html_url":"https://github.com/carlosvelarde","followers_url":"https://api.github.com/users/carlosvelarde/followers","following_url":"https://api.github.com/users/carlosvelarde/following{/other_user}","gists_url":"https://api.github.com/users/carlosvelarde/gists{/gist_id}","starred_url":"https://api.github.com/users/carlosvelarde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carlosvelarde/subscriptions","organizations_url":"https://api.github.com/users/carlosvelarde/orgs","repos_url":"https://api.github.com/users/carlosvelarde/repos","events_url":"https://api.github.com/users/carlosvelarde/events{/privacy}","received_events_url":"https://api.github.com/users/carlosvelarde/received_events","type":"User","site_admin":false},"repo":{"id":30678065,"name":"r10k","full_name":"carlosvelarde/r10k","owner":{"login":"carlosvelarde","id":8421109,"avatar_url":"https://avatars.githubusercontent.com/u/8421109?v=3","gravatar_id":"","url":"https://api.github.com/users/carlosvelarde","html_url":"https://github.com/carlosvelarde","followers_url":"https://api.github.com/users/carlosvelarde/followers","following_url":"https://api.github.com/users/carlosvelarde/following{/other_user}","gists_url":"https://api.github.com/users/carlosvelarde/gists{/gist_id}","starred_url":"https://api.github.com/users/carlosvelarde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carlosvelarde/subscriptions","organizations_url":"https://api.github.com/users/carlosvelarde/orgs","repos_url":"https://api.github.com/users/carlosvelarde/repos","events_url":"https://api.github.com/users/carlosvelarde/events{/privacy}","received_events_url":"https://api.github.com/users/carlosvelarde/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/carlosvelarde/r10k","description":"Smarter Puppet deployment","fork":true,"url":"https://api.github.com/repos/carlosvelarde/r10k","forks_url":"https://api.github.com/repos/carlosvelarde/r10k/forks","keys_url":"https://api.github.com/repos/carlosvelarde/r10k/keys{/key_id}","collaborators_url":"https://api.github.com/repos/carlosvelarde/r10k/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/carlosvelarde/r10k/teams","hooks_url":"https://api.github.com/repos/carlosvelarde/r10k/hooks","issue_events_url":"https://api.github.com/repos/carlosvelarde/r10k/issues/events{/number}","events_url":"https://api.github.com/repos/carlosvelarde/r10k/events","assignees_url":"https://api.github.com/repos/carlosvelarde/r10k/assignees{/user}","branches_url":"https://api.github.com/repos/carlosvelarde/r10k/branches{/branch}","tags_url":"https://api.github.com/repos/carlosvelarde/r10k/tags","blobs_url":"https://api.github.com/repos/carlosvelarde/r10k/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/carlosvelarde/r10k/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/carlosvelarde/r10k/git/refs{/sha}","trees_url":"https://api.github.com/repos/carlosvelarde/r10k/git/trees{/sha}","statuses_url":"https://api.github.com/repos/carlosvelarde/r10k/statuses/{sha}","languages_url":"https://api.github.com/repos/carlosvelarde/r10k/languages","stargazers_url":"https://api.github.com/repos/carlosvelarde/r10k/stargazers","contributors_url":"https://api.github.com/repos/carlosvelarde/r10k/contributors","subscribers_url":"https://api.github.com/repos/carlosvelarde/r10k/subscribers","subscription_url":"https://api.github.com/repos/carlosvelarde/r10k/subscription","commits_url":"https://api.github.com/repos/carlosvelarde/r10k/commits{/sha}","git_commits_url":"https://api.github.com/repos/carlosvelarde/r10k/git/commits{/sha}","comments_url":"https://api.github.com/repos/carlosvelarde/r10k/comments{/number}","issue_comment_url":"https://api.github.com/repos/carlosvelarde/r10k/issues/comments{/number}","contents_url":"https://api.github.com/repos/carlosvelarde/r10k/contents/{+path}","compare_url":"https://api.github.com/repos/carlosvelarde/r10k/compare/{base}...{head}","merges_url":"https://api.github.com/repos/carlosvelarde/r10k/merges","archive_url":"https://api.github.com/repos/carlosvelarde/r10k/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/carlosvelarde/r10k/downloads","issues_url":"https://api.github.com/repos/carlosvelarde/r10k/issues{/number}","pulls_url":"https://api.github.com/repos/carlosvelarde/r10k/pulls{/number}","milestones_url":"https://api.github.com/repos/carlosvelarde/r10k/milestones{/number}","notifications_url":"https://api.github.com/repos/carlosvelarde/r10k/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/carlosvelarde/r10k/labels{/name}","releases_url":"https://api.github.com/repos/carlosvelarde/r10k/releases{/id}","created_at":"2015-02-12T00:50:46Z","updated_at":"2015-03-19T18:22:13Z","pushed_at":"2015-03-19T18:46:34Z","git_url":"git://github.com/carlosvelarde/r10k.git","ssh_url":"git@github.com:carlosvelarde/r10k.git","clone_url":"https://github.com/carlosvelarde/r10k.git","svn_url":"https://github.com/carlosvelarde/r10k","homepage":"","size":1474,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"puppetlabs:master","ref":"master","sha":"7bd7a81ddc381f02b3c38efc48ee4ca72eff14b9","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":7176141,"name":"r10k","full_name":"puppetlabs/r10k","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/r10k","description":"Smarter Puppet deployment","fork":false,"url":"https://api.github.com/repos/puppetlabs/r10k","forks_url":"https://api.github.com/repos/puppetlabs/r10k/forks","keys_url":"https://api.github.com/repos/puppetlabs/r10k/keys{/key_id}","collaborators_url":"https://api.github.com/repos/puppetlabs/r10k/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/puppetlabs/r10k/teams","hooks_url":"https://api.github.com/repos/puppetlabs/r10k/hooks","issue_events_url":"https://api.github.com/repos/puppetlabs/r10k/issues/events{/number}","events_url":"https://api.github.com/repos/puppetlabs/r10k/events","assignees_url":"https://api.github.com/repos/puppetlabs/r10k/assignees{/user}","branches_url":"https://api.github.com/repos/puppetlabs/r10k/branches{/branch}","tags_url":"https://api.github.com/repos/puppetlabs/r10k/tags","blobs_url":"https://api.github.com/repos/puppetlabs/r10k/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/puppetlabs/r10k/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/puppetlabs/r10k/git/refs{/sha}","trees_url":"https://api.github.com/repos/puppetlabs/r10k/git/trees{/sha}","statuses_url":"https://api.github.com/repos/puppetlabs/r10k/statuses/{sha}","languages_url":"https://api.github.com/repos/puppetlabs/r10k/languages","stargazers_url":"https://api.github.com/repos/puppetlabs/r10k/stargazers","contributors_url":"https://api.github.com/repos/puppetlabs/r10k/contributors","subscribers_url":"https://api.github.com/repos/puppetlabs/r10k/subscribers","subscription_url":"https://api.github.com/repos/puppetlabs/r10k/subscription","commits_url":"https://api.github.com/repos/puppetlabs/r10k/commits{/sha}","git_commits_url":"https://api.github.com/repos/puppetlabs/r10k/git/commits{/sha}","comments_url":"https://api.github.com/repos/puppetlabs/r10k/comments{/number}","issue_comment_url":"https://api.github.com/repos/puppetlabs/r10k/issues/comments{/number}","contents_url":"https://api.github.com/repos/puppetlabs/r10k/contents/{+path}","compare_url":"https://api.github.com/repos/puppetlabs/r10k/compare/{base}...{head}","merges_url":"https://api.github.com/repos/puppetlabs/r10k/merges","archive_url":"https://api.github.com/repos/puppetlabs/r10k/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/puppetlabs/r10k/downloads","issues_url":"https://api.github.com/repos/puppetlabs/r10k/issues{/number}","pulls_url":"https://api.github.com/repos/puppetlabs/r10k/pulls{/number}","milestones_url":"https://api.github.com/repos/puppetlabs/r10k/milestones{/number}","notifications_url":"https://api.github.com/repos/puppetlabs/r10k/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/puppetlabs/r10k/labels{/name}","releases_url":"https://api.github.com/repos/puppetlabs/r10k/releases{/id}","created_at":"2012-12-15T05:19:38Z","updated_at":"2015-03-19T14:17:44Z","pushed_at":"2015-03-19T20:43:16Z","git_url":"git://github.com/puppetlabs/r10k.git","ssh_url":"git@github.com:puppetlabs/r10k.git","clone_url":"https://github.com/puppetlabs/r10k.git","svn_url":"https://github.com/puppetlabs/r10k","homepage":"","size":4426,"stargazers_count":406,"watchers_count":406,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":113,"mirror_url":null,"open_issues_count":58,"forks":113,"open_issues":58,"watchers":406,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/r10k/pulls/360"},"html":{"href":"https://github.com/puppetlabs/r10k/pull/360"},"issue":{"href":"https://api.github.com/repos/puppetlabs/r10k/issues/360"},"comments":{"href":"https://api.github.com/repos/puppetlabs/r10k/issues/360/comments"},"review_comments":{"href":"https://api.github.com/repos/puppetlabs/r10k/pulls/360/comments"},"review_comment":{"href":"https://api.github.com/repos/puppetlabs/r10k/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/puppetlabs/r10k/pulls/360/commits"},"statuses":{"href":"https://api.github.com/repos/puppetlabs/r10k/statuses/a5a75877c8784ccae71471f2ad799085dc96e9c9"}}}}