{"action":"created","comment":{"url":"https://api.github.com/repos/yast/yast-storage-ng/pulls/comments/61092429","id":61092429,"diff_hunk":"@@ -183,8 +184,65 @@ def find_vol(mount_point, volumes)\n         context \"with a partitions-based proposal\" do\n           let(:use_lvm) { false }\n \n-          it \"does not require any particular volume\" do\n-            expect(checker.needed_partitions).to be_empty\n+          context \"and MS-DOS partition table\" do\n+            let(:grub_partitions) { {} }\n+\n+            before do\n+              allow(dev_sda).to receive(:partition_table).and_return(pt_msdos)\n+            end\n+\n+            context \"with sufficently large MBR gap\" do\n+              it \"does not require any particular volume\" do\n+                expect(checker.needed_partitions).to be_empty\n+              end\n+            end\n+\n+            context \"with too small MBR gap\" do\n+              before do\n+                allow(analyzer).to receive(:mbr_gap).and_return(dev_sda.name => Yast::Storage::DiskSize.KiB(16))\n+              end\n+\n+              it \"raises an exception\" do\n+                expect { checker.needed_partitions }.to raise_error Yast::Storage::BootRequirementsChecker::Error\n+              end\n+            end\n+\n+            context \"with no MBR gap\" do\n+              before do\n+                allow(analyzer).to receive(:mbr_gap).and_return(dev_sda.name => Yast::Storage::DiskSize.KiB(0))\n+              end\n+\n+              it \"raises an exception\" do\n+                expect { checker.needed_partitions }.to raise_error Yast::Storage::BootRequirementsChecker::Error\n+              end\n+            end\n+\n+          end\n+\n+          context \"and GPT partition table\" do\n+            before do\n+              allow(dev_sda).to receive(:partition_table).and_return(pt_gpt)\n+            end\n+\n+            context \"if there is no GRUB partition\" do\n+              let(:grub_partitions) { {} }\n+\n+              it \"requires a new GRUB partition\" do\n+                expect(checker.needed_partitions).to include(\n+                  an_object_with_fields(partition_id: ::Storage::ID_GPT_BIOS, reuse: nil)\n+                )\n+              end\n+            end\n+\n+            context \"if there is already a GRUB partition\" do\n+              let(:grub_partitions) { { dev_sda.name => [analyzer_part(dev_sda.name + \"2\")] } }\n+\n+              it \"does not propose a new GRUB partition\" do","path":"test/boot_requirements_checker_test.rb","position":85,"original_position":77,"commit_id":"4d3c4e9cfbe960212bd743b3ba9f2335d125629b","original_commit_id":"6dc6ab5ce1f09fe6107a8d2f19c070c26cbae1c8","user":{"login":"wfeldt","id":927244,"avatar_url":"https://avatars.githubusercontent.com/u/927244?v=3","gravatar_id":"","url":"https://api.github.com/users/wfeldt","html_url":"https://github.com/wfeldt","followers_url":"https://api.github.com/users/wfeldt/followers","following_url":"https://api.github.com/users/wfeldt/following{/other_user}","gists_url":"https://api.github.com/users/wfeldt/gists{/gist_id}","starred_url":"https://api.github.com/users/wfeldt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wfeldt/subscriptions","organizations_url":"https://api.github.com/users/wfeldt/orgs","repos_url":"https://api.github.com/users/wfeldt/repos","events_url":"https://api.github.com/users/wfeldt/events{/privacy}","received_events_url":"https://api.github.com/users/wfeldt/received_events","type":"User","site_admin":false},"body":"I was thinking that we probably should also do this reuse stuff here and then we'd have to look for a partition with reuse flag. But the checker code atm doesn't do this and I didn't want to change it in this pr, so I coded it this way.","created_at":"2016-04-26T14:13:52Z","updated_at":"2016-04-26T14:13:52Z","html_url":"https://github.com/yast/yast-storage-ng/pull/57#discussion_r61092429","pull_request_url":"https://api.github.com/repos/yast/yast-storage-ng/pulls/57","_links":{"self":{"href":"https://api.github.com/repos/yast/yast-storage-ng/pulls/comments/61092429"},"html":{"href":"https://github.com/yast/yast-storage-ng/pull/57#discussion_r61092429"},"pull_request":{"href":"https://api.github.com/repos/yast/yast-storage-ng/pulls/57"}}},"pull_request":{"url":"https://api.github.com/repos/yast/yast-storage-ng/pulls/57","id":67886129,"html_url":"https://github.com/yast/yast-storage-ng/pull/57","diff_url":"https://github.com/yast/yast-storage-ng/pull/57.diff","patch_url":"https://github.com/yast/yast-storage-ng/pull/57.patch","issue_url":"https://api.github.com/repos/yast/yast-storage-ng/issues/57","number":57,"state":"open","locked":false,"title":"added tests for legacy boot requirements","user":{"login":"wfeldt","id":927244,"avatar_url":"https://avatars.githubusercontent.com/u/927244?v=3","gravatar_id":"","url":"https://api.github.com/users/wfeldt","html_url":"https://github.com/wfeldt","followers_url":"https://api.github.com/users/wfeldt/followers","following_url":"https://api.github.com/users/wfeldt/following{/other_user}","gists_url":"https://api.github.com/users/wfeldt/gists{/gist_id}","starred_url":"https://api.github.com/users/wfeldt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wfeldt/subscriptions","organizations_url":"https://api.github.com/users/wfeldt/orgs","repos_url":"https://api.github.com/users/wfeldt/repos","events_url":"https://api.github.com/users/wfeldt/events{/privacy}","received_events_url":"https://api.github.com/users/wfeldt/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-04-26T13:32:40Z","updated_at":"2016-04-26T14:13:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dbbec0a6b1fc042bbc988351c8dc7e733c667bfa","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/yast/yast-storage-ng/pulls/57/commits","review_comments_url":"https://api.github.com/repos/yast/yast-storage-ng/pulls/57/comments","review_comment_url":"https://api.github.com/repos/yast/yast-storage-ng/pulls/comments{/number}","comments_url":"https://api.github.com/repos/yast/yast-storage-ng/issues/57/comments","statuses_url":"https://api.github.com/repos/yast/yast-storage-ng/statuses/4d3c4e9cfbe960212bd743b3ba9f2335d125629b","head":{"label":"yast:checker_2","ref":"checker_2","sha":"4d3c4e9cfbe960212bd743b3ba9f2335d125629b","user":{"login":"yast","id":909990,"avatar_url":"https://avatars.githubusercontent.com/u/909990?v=3","gravatar_id":"","url":"https://api.github.com/users/yast","html_url":"https://github.com/yast","followers_url":"https://api.github.com/users/yast/followers","following_url":"https://api.github.com/users/yast/following{/other_user}","gists_url":"https://api.github.com/users/yast/gists{/gist_id}","starred_url":"https://api.github.com/users/yast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yast/subscriptions","organizations_url":"https://api.github.com/users/yast/orgs","repos_url":"https://api.github.com/users/yast/repos","events_url":"https://api.github.com/users/yast/events{/privacy}","received_events_url":"https://api.github.com/users/yast/received_events","type":"Organization","site_admin":false},"repo":{"id":46064409,"name":"yast-storage-ng","full_name":"yast/yast-storage-ng","owner":{"login":"yast","id":909990,"avatar_url":"https://avatars.githubusercontent.com/u/909990?v=3","gravatar_id":"","url":"https://api.github.com/users/yast","html_url":"https://github.com/yast","followers_url":"https://api.github.com/users/yast/followers","following_url":"https://api.github.com/users/yast/following{/other_user}","gists_url":"https://api.github.com/users/yast/gists{/gist_id}","starred_url":"https://api.github.com/users/yast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yast/subscriptions","organizations_url":"https://api.github.com/users/yast/orgs","repos_url":"https://api.github.com/users/yast/repos","events_url":"https://api.github.com/users/yast/events{/privacy}","received_events_url":"https://api.github.com/users/yast/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/yast/yast-storage-ng","description":"Rewrite of https://github.com/yast/yast-storage","fork":false,"url":"https://api.github.com/repos/yast/yast-storage-ng","forks_url":"https://api.github.com/repos/yast/yast-storage-ng/forks","keys_url":"https://api.github.com/repos/yast/yast-storage-ng/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yast/yast-storage-ng/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yast/yast-storage-ng/teams","hooks_url":"https://api.github.com/repos/yast/yast-storage-ng/hooks","issue_events_url":"https://api.github.com/repos/yast/yast-storage-ng/issues/events{/number}","events_url":"https://api.github.com/repos/yast/yast-storage-ng/events","assignees_url":"https://api.github.com/repos/yast/yast-storage-ng/assignees{/user}","branches_url":"https://api.github.com/repos/yast/yast-storage-ng/branches{/branch}","tags_url":"https://api.github.com/repos/yast/yast-storage-ng/tags","blobs_url":"https://api.github.com/repos/yast/yast-storage-ng/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yast/yast-storage-ng/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yast/yast-storage-ng/git/refs{/sha}","trees_url":"https://api.github.com/repos/yast/yast-storage-ng/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yast/yast-storage-ng/statuses/{sha}","languages_url":"https://api.github.com/repos/yast/yast-storage-ng/languages","stargazers_url":"https://api.github.com/repos/yast/yast-storage-ng/stargazers","contributors_url":"https://api.github.com/repos/yast/yast-storage-ng/contributors","subscribers_url":"https://api.github.com/repos/yast/yast-storage-ng/subscribers","subscription_url":"https://api.github.com/repos/yast/yast-storage-ng/subscription","commits_url":"https://api.github.com/repos/yast/yast-storage-ng/commits{/sha}","git_commits_url":"https://api.github.com/repos/yast/yast-storage-ng/git/commits{/sha}","comments_url":"https://api.github.com/repos/yast/yast-storage-ng/comments{/number}","issue_comment_url":"https://api.github.com/repos/yast/yast-storage-ng/issues/comments{/number}","contents_url":"https://api.github.com/repos/yast/yast-storage-ng/contents/{+path}","compare_url":"https://api.github.com/repos/yast/yast-storage-ng/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yast/yast-storage-ng/merges","archive_url":"https://api.github.com/repos/yast/yast-storage-ng/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yast/yast-storage-ng/downloads","issues_url":"https://api.github.com/repos/yast/yast-storage-ng/issues{/number}","pulls_url":"https://api.github.com/repos/yast/yast-storage-ng/pulls{/number}","milestones_url":"https://api.github.com/repos/yast/yast-storage-ng/milestones{/number}","notifications_url":"https://api.github.com/repos/yast/yast-storage-ng/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yast/yast-storage-ng/labels{/name}","releases_url":"https://api.github.com/repos/yast/yast-storage-ng/releases{/id}","deployments_url":"https://api.github.com/repos/yast/yast-storage-ng/deployments","created_at":"2015-11-12T16:09:03Z","updated_at":"2016-03-08T15:33:19Z","pushed_at":"2016-04-26T14:06:20Z","git_url":"git://github.com/yast/yast-storage-ng.git","ssh_url":"git@github.com:yast/yast-storage-ng.git","clone_url":"https://github.com/yast/yast-storage-ng.git","svn_url":"https://github.com/yast/yast-storage-ng","homepage":"http://yast.github.io/","size":482,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":2,"forks":5,"open_issues":2,"watchers":1,"default_branch":"master"}},"base":{"label":"yast:master","ref":"master","sha":"54372ff5b1624cfa616fbf33d3ad302cea396501","user":{"login":"yast","id":909990,"avatar_url":"https://avatars.githubusercontent.com/u/909990?v=3","gravatar_id":"","url":"https://api.github.com/users/yast","html_url":"https://github.com/yast","followers_url":"https://api.github.com/users/yast/followers","following_url":"https://api.github.com/users/yast/following{/other_user}","gists_url":"https://api.github.com/users/yast/gists{/gist_id}","starred_url":"https://api.github.com/users/yast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yast/subscriptions","organizations_url":"https://api.github.com/users/yast/orgs","repos_url":"https://api.github.com/users/yast/repos","events_url":"https://api.github.com/users/yast/events{/privacy}","received_events_url":"https://api.github.com/users/yast/received_events","type":"Organization","site_admin":false},"repo":{"id":46064409,"name":"yast-storage-ng","full_name":"yast/yast-storage-ng","owner":{"login":"yast","id":909990,"avatar_url":"https://avatars.githubusercontent.com/u/909990?v=3","gravatar_id":"","url":"https://api.github.com/users/yast","html_url":"https://github.com/yast","followers_url":"https://api.github.com/users/yast/followers","following_url":"https://api.github.com/users/yast/following{/other_user}","gists_url":"https://api.github.com/users/yast/gists{/gist_id}","starred_url":"https://api.github.com/users/yast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yast/subscriptions","organizations_url":"https://api.github.com/users/yast/orgs","repos_url":"https://api.github.com/users/yast/repos","events_url":"https://api.github.com/users/yast/events{/privacy}","received_events_url":"https://api.github.com/users/yast/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/yast/yast-storage-ng","description":"Rewrite of https://github.com/yast/yast-storage","fork":false,"url":"https://api.github.com/repos/yast/yast-storage-ng","forks_url":"https://api.github.com/repos/yast/yast-storage-ng/forks","keys_url":"https://api.github.com/repos/yast/yast-storage-ng/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yast/yast-storage-ng/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yast/yast-storage-ng/teams","hooks_url":"https://api.github.com/repos/yast/yast-storage-ng/hooks","issue_events_url":"https://api.github.com/repos/yast/yast-storage-ng/issues/events{/number}","events_url":"https://api.github.com/repos/yast/yast-storage-ng/events","assignees_url":"https://api.github.com/repos/yast/yast-storage-ng/assignees{/user}","branches_url":"https://api.github.com/repos/yast/yast-storage-ng/branches{/branch}","tags_url":"https://api.github.com/repos/yast/yast-storage-ng/tags","blobs_url":"https://api.github.com/repos/yast/yast-storage-ng/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yast/yast-storage-ng/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yast/yast-storage-ng/git/refs{/sha}","trees_url":"https://api.github.com/repos/yast/yast-storage-ng/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yast/yast-storage-ng/statuses/{sha}","languages_url":"https://api.github.com/repos/yast/yast-storage-ng/languages","stargazers_url":"https://api.github.com/repos/yast/yast-storage-ng/stargazers","contributors_url":"https://api.github.com/repos/yast/yast-storage-ng/contributors","subscribers_url":"https://api.github.com/repos/yast/yast-storage-ng/subscribers","subscription_url":"https://api.github.com/repos/yast/yast-storage-ng/subscription","commits_url":"https://api.github.com/repos/yast/yast-storage-ng/commits{/sha}","git_commits_url":"https://api.github.com/repos/yast/yast-storage-ng/git/commits{/sha}","comments_url":"https://api.github.com/repos/yast/yast-storage-ng/comments{/number}","issue_comment_url":"https://api.github.com/repos/yast/yast-storage-ng/issues/comments{/number}","contents_url":"https://api.github.com/repos/yast/yast-storage-ng/contents/{+path}","compare_url":"https://api.github.com/repos/yast/yast-storage-ng/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yast/yast-storage-ng/merges","archive_url":"https://api.github.com/repos/yast/yast-storage-ng/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yast/yast-storage-ng/downloads","issues_url":"https://api.github.com/repos/yast/yast-storage-ng/issues{/number}","pulls_url":"https://api.github.com/repos/yast/yast-storage-ng/pulls{/number}","milestones_url":"https://api.github.com/repos/yast/yast-storage-ng/milestones{/number}","notifications_url":"https://api.github.com/repos/yast/yast-storage-ng/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yast/yast-storage-ng/labels{/name}","releases_url":"https://api.github.com/repos/yast/yast-storage-ng/releases{/id}","deployments_url":"https://api.github.com/repos/yast/yast-storage-ng/deployments","created_at":"2015-11-12T16:09:03Z","updated_at":"2016-03-08T15:33:19Z","pushed_at":"2016-04-26T14:06:20Z","git_url":"git://github.com/yast/yast-storage-ng.git","ssh_url":"git@github.com:yast/yast-storage-ng.git","clone_url":"https://github.com/yast/yast-storage-ng.git","svn_url":"https://github.com/yast/yast-storage-ng","homepage":"http://yast.github.io/","size":482,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":2,"forks":5,"open_issues":2,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/yast/yast-storage-ng/pulls/57"},"html":{"href":"https://github.com/yast/yast-storage-ng/pull/57"},"issue":{"href":"https://api.github.com/repos/yast/yast-storage-ng/issues/57"},"comments":{"href":"https://api.github.com/repos/yast/yast-storage-ng/issues/57/comments"},"review_comments":{"href":"https://api.github.com/repos/yast/yast-storage-ng/pulls/57/comments"},"review_comment":{"href":"https://api.github.com/repos/yast/yast-storage-ng/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/yast/yast-storage-ng/pulls/57/commits"},"statuses":{"href":"https://api.github.com/repos/yast/yast-storage-ng/statuses/4d3c4e9cfbe960212bd743b3ba9f2335d125629b"}}}}