{"action":"created","comment":{"url":"https://api.github.com/repos/puppetlabs/puppet/pulls/comments/43152061","id":43152061,"diff_hunk":"@@ -2,46 +2,62 @@\n \n confine :except, :platform => ['windows']\n confine :except, :platform => /osx/ # See PUP-4823\n-confine :except, :platform => /solaris/\n-confine :except, :platform => /aix/\n+confine :except, :platform => /solaris/ # See PUP-5201\n+\n+require 'puppet/acceptance/mount_utils'\n+extend Puppet::Acceptance::MountUtils\n \n-fstab = '/etc/fstab'\n name = \"pl#{rand(999999).to_i}\"\n \n agents.each do |agent|\n+  fs_file = filesystem_file(agent)\n+  fs_type = filesystem_type(agent)\n+\n   teardown do\n-    #(teardown) restore the fstab file\n-    on(agent, \"mv /tmp/fstab #{fstab}\", :acceptable_exit_codes => (0..254))\n     #(teardown) umount disk image\n     on(agent, \"umount /#{name}\", :acceptable_exit_codes => (0..254))\n     #(teardown) delete disk image\n-    on(agent, \"rm /tmp/#{name}\", :acceptable_exit_codes => (0..254))\n+    if agent['platform'] =~ /aix/\n+      on(agent, \"yes | rmlv #{name}\", :acceptable_exit_codes => (0..254))\n+    else\n+      on(agent, \"rm /tmp/#{name}\", :acceptable_exit_codes => (0..254))\n+    end\n     #(teardown) delete mount point\n     on(agent, \"rm -fr /#{name}\", :acceptable_exit_codes => (0..254))\n+    #(teardown) restore the fstab file\n+    on(agent, \"mv /tmp/fs_backup_file #{fs_file}\", :acceptable_exit_codes => (0..254))\n   end\n \n   #------- SETUP -------#\n-  step \"(setup) backup fstab file\"\n-  on(agent, \"cp #{fstab} /tmp/fstab\", :acceptable_exit_codes => [0,1])\n-\n-  step \"(setup) create disk image\"\n-  on(agent, \"dd if=/dev/zero of=/tmp/#{name} count=10240\", :acceptable_exit_codes => [0,1])\n-  on(agent, \"yes | mkfs -t ext3 -q /tmp/#{name}\")\n+  step \"(setup) backup #{fs_file} file\"\n+  on(agent, \"cp #{fs_file} /tmp/fs_backup_file\", :acceptable_exit_codes => [0,1])\n \n   step \"(setup) create mount point\"\n   on(agent, \"mkdir /#{name}\", :acceptable_exit_codes => [0,1])\n \n+  step \"(setup) create new filesystem to be mounted\"\n+  create_filesystem(agent, name)\n+\n   #------- TESTS -------#\n   step \"create a mount with puppet (mounted)\"\n-  args = ['ensure=mounted',\n-          'fstype=ext3',\n-          'options=loop',\n-          \"device='/tmp/#{name}'\"\n-         ]\n+  if agent['platform'] =~ /aix/\n+    args = ['ensure=mounted',\n+            \"fstype=#{fs_type}\",\n+            \"options='log=/dev/hd8'\",","path":"acceptance/tests/resource/mount/mounted.rb","position":62,"original_position":62,"commit_id":"2a73bd1da3a03b6c6df3c170dc3d72122252c19f","original_commit_id":"2a73bd1da3a03b6c6df3c170dc3d72122252c19f","user":{"login":"branan","id":37594,"avatar_url":"https://avatars.githubusercontent.com/u/37594?v=3","gravatar_id":"","url":"https://api.github.com/users/branan","html_url":"https://github.com/branan","followers_url":"https://api.github.com/users/branan/followers","following_url":"https://api.github.com/users/branan/following{/other_user}","gists_url":"https://api.github.com/users/branan/gists{/gist_id}","starred_url":"https://api.github.com/users/branan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/branan/subscriptions","organizations_url":"https://api.github.com/users/branan/orgs","repos_url":"https://api.github.com/users/branan/repos","events_url":"https://api.github.com/users/branan/events{/privacy}","received_events_url":"https://api.github.com/users/branan/received_events","type":"User","site_admin":false},"body":"Can we determine this programmatically instead of hard coding it? I don't want this test to fail if we ever rebuild our AIX infra or something","created_at":"2015-10-27T17:03:15Z","updated_at":"2015-10-27T17:03:15Z","html_url":"https://github.com/puppetlabs/puppet/pull/4379#discussion_r43152061","pull_request_url":"https://api.github.com/repos/puppetlabs/puppet/pulls/4379","_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/puppet/pulls/comments/43152061"},"html":{"href":"https://github.com/puppetlabs/puppet/pull/4379#discussion_r43152061"},"pull_request":{"href":"https://api.github.com/repos/puppetlabs/puppet/pulls/4379"}}},"pull_request":{"url":"https://api.github.com/repos/puppetlabs/puppet/pulls/4379","id":48898997,"html_url":"https://github.com/puppetlabs/puppet/pull/4379","diff_url":"https://github.com/puppetlabs/puppet/pull/4379.diff","patch_url":"https://github.com/puppetlabs/puppet/pull/4379.patch","issue_url":"https://api.github.com/repos/puppetlabs/puppet/issues/4379","number":4379,"state":"open","locked":false,"title":"(PUP-5339) Update mount tests to work in AIX","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":"(PUP-5339) Add mount_utils acceptance helper library\r\n\r\nThis commit adds new helpers to assist with dealing with mountpoints\r\nand fstab on testing hosts. It is used in the suite of mount resource tests.\r\n\r\n(PUP-5339) Update mount tests to work in AIX\r\n\r\nThis commit updates each of the mount resource tests to work in\r\nAIX. The main difference between AIX and regular Linuxes is that\r\nwe need to use crfs to properly create a filesystem. Slight\r\nmodifications have been made to deal with the small differences\r\nin setup before running puppet.","created_at":"2015-10-27T16:50:13Z","updated_at":"2015-10-27T17:03:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"992e782fe99966eeec6b0a766445147d18b50616","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/puppetlabs/puppet/pulls/4379/commits","review_comments_url":"https://api.github.com/repos/puppetlabs/puppet/pulls/4379/comments","review_comment_url":"https://api.github.com/repos/puppetlabs/puppet/pulls/comments{/number}","comments_url":"https://api.github.com/repos/puppetlabs/puppet/issues/4379/comments","statuses_url":"https://api.github.com/repos/puppetlabs/puppet/statuses/2a73bd1da3a03b6c6df3c170dc3d72122252c19f","head":{"label":"whopper:PUP-5339/master/aix_mount_tests","ref":"PUP-5339/master/aix_mount_tests","sha":"2a73bd1da3a03b6c6df3c170dc3d72122252c19f","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-10-27T16:51:43Z","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":53853,"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:master","ref":"master","sha":"c98fbf24e2eab36ae4788c22403363240e00c1ee","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-10-27T06:15:15Z","pushed_at":"2015-10-27T16:51:44Z","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://puppetlabs.com/puppet/what-is-puppet","size":140298,"stargazers_count":3603,"watchers_count":3603,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1500,"mirror_url":null,"open_issues_count":32,"forks":1500,"open_issues":32,"watchers":3603,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/puppet/pulls/4379"},"html":{"href":"https://github.com/puppetlabs/puppet/pull/4379"},"issue":{"href":"https://api.github.com/repos/puppetlabs/puppet/issues/4379"},"comments":{"href":"https://api.github.com/repos/puppetlabs/puppet/issues/4379/comments"},"review_comments":{"href":"https://api.github.com/repos/puppetlabs/puppet/pulls/4379/comments"},"review_comment":{"href":"https://api.github.com/repos/puppetlabs/puppet/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/puppetlabs/puppet/pulls/4379/commits"},"statuses":{"href":"https://api.github.com/repos/puppetlabs/puppet/statuses/2a73bd1da3a03b6c6df3c170dc3d72122252c19f"}}}}