{"action":"created","comment":{"url":"https://api.github.com/repos/snapcore/snapd/pulls/comments/87078748","pull_request_review_id":7704111,"id":87078748,"diff_hunk":"@@ -0,0 +1,92 @@\n+// -*- Mode: Go; indent-tabs-mode: t -*-\n+\n+/*\n+ * Copyright (C) 2016 Canonical Ltd\n+ *\n+ * This program is free software: you can redistribute it and/or modify\n+ * it under the terms of the GNU General Public License version 3 as\n+ * published by the Free Software Foundation.\n+ *\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n+ *\n+ */\n+\n+package builtin_test\n+\n+import (\n+\t. \"gopkg.in/check.v1\"\n+\n+\t\"github.com/snapcore/snapd/interfaces\"\n+\t\"github.com/snapcore/snapd/interfaces/builtin\"\n+\t\"github.com/snapcore/snapd/snap\"\n+\t\"github.com/snapcore/snapd/testutil\"\n+)\n+\n+type LxdInterfaceSuite struct {\n+\tiface interfaces.Interface\n+\tslot  *interfaces.Slot\n+\tplug  *interfaces.Plug\n+}\n+\n+var _ = Suite(&LxdInterfaceSuite{\n+\tiface: &builtin.LxdInterface{},\n+\tslot: &interfaces.Slot{\n+\t\tSlotInfo: &snap.SlotInfo{\n+\t\t\tSnap:      &snap.Info{SuggestedName: \"core\", Type: snap.TypeOS},\n+\t\t\tName:      \"lxd\",\n+\t\t\tInterface: \"lxd\",\n+\t\t},\n+\t},\n+\n+\tplug: &interfaces.Plug{\n+\t\tPlugInfo: &snap.PlugInfo{\n+\t\t\tSnap: &snap.Info{\n+\t\t\t\tSuggestedName: \"lxd\",\n+\t\t\t\tSideInfo:      snap.SideInfo{Developer: \"canonical\"},\n+\t\t\t},\n+\t\t\tName:      \"lxd\",\n+\t\t\tInterface: \"lxd\",\n+\t\t},\n+\t},\n+})\n+\n+func (s *LxdInterfaceSuite) TestName(c *C) {\n+\tc.Assert(s.iface.Name(), Equals, \"lxd\")\n+}\n+\n+func (s *LxdInterfaceSuite) TestSanitizeSlot(c *C) {\n+\terr := s.iface.SanitizeSlot(s.slot)\n+\tc.Assert(err, IsNil)\n+}\n+\n+func (s *LxdInterfaceSuite) TestSanitizePlug(c *C) {\n+\terr := s.iface.SanitizePlug(s.plug)\n+\tc.Assert(err, IsNil)\n+}\n+\n+func (s *LxdInterfaceSuite) TestUsedSecuritySystems(c *C) {\n+\t// connected plugs have a non-nil security snippet for apparmor\n+\tsnippet, err := s.iface.ConnectedPlugSnippet(s.plug, s.slot, interfaces.SecurityAppArmor)\n+\tc.Assert(err, IsNil)\n+\tc.Assert(snippet, Not(IsNil))\n+}\n+\n+func (s *LxdInterfaceSuite) TestPermanentSlotPolicyAppArmor(c *C) {\n+\tsnippet, err := s.iface.ConnectedPlugSnippet(s.plug, s.slot, interfaces.SecurityAppArmor)\n+\tc.Assert(err, IsNil)\n+\tc.Check(string(snippet), testutil.Contains, \"/var/snap/lxd/common/lxd/unix.socket rw,\\n\")\n+}","path":"interfaces/builtin/lxd_test.go","position":84,"original_position":84,"commit_id":"5ae897f6b87bd07a1e4a4e8e3fc54f0c7ceb6352","original_commit_id":"5ae897f6b87bd07a1e4a4e8e3fc54f0c7ceb6352","user":{"login":"jdstrand","id":1663079,"avatar_url":"https://avatars.githubusercontent.com/u/1663079?v=3","gravatar_id":"","url":"https://api.github.com/users/jdstrand","html_url":"https://github.com/jdstrand","followers_url":"https://api.github.com/users/jdstrand/followers","following_url":"https://api.github.com/users/jdstrand/following{/other_user}","gists_url":"https://api.github.com/users/jdstrand/gists{/gist_id}","starred_url":"https://api.github.com/users/jdstrand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdstrand/subscriptions","organizations_url":"https://api.github.com/users/jdstrand/orgs","repos_url":"https://api.github.com/users/jdstrand/repos","events_url":"https://api.github.com/users/jdstrand/events{/privacy}","received_events_url":"https://api.github.com/users/jdstrand/received_events","type":"User","site_admin":false},"body":"Can you add another test for TestConnectedPlugPolicySecComp and look for `shutdown` in the same manner that you are searching for an apparmor rule here?","created_at":"2016-11-08T20:40:40Z","updated_at":"2016-11-08T20:42:13Z","html_url":"https://github.com/snapcore/snapd/pull/2225#discussion_r87078748","pull_request_url":"https://api.github.com/repos/snapcore/snapd/pulls/2225","_links":{"self":{"href":"https://api.github.com/repos/snapcore/snapd/pulls/comments/87078748"},"html":{"href":"https://github.com/snapcore/snapd/pull/2225#discussion_r87078748"},"pull_request":{"href":"https://api.github.com/repos/snapcore/snapd/pulls/2225"}}},"pull_request":{"url":"https://api.github.com/repos/snapcore/snapd/pulls/2225","id":91222379,"html_url":"https://github.com/snapcore/snapd/pull/2225","diff_url":"https://github.com/snapcore/snapd/pull/2225.diff","patch_url":"https://github.com/snapcore/snapd/pull/2225.patch","issue_url":"https://api.github.com/repos/snapcore/snapd/issues/2225","number":2225,"state":"open","locked":false,"title":"Implement lxd-client interface exposing the lxd snap","user":{"login":"kalikiana","id":1204189,"avatar_url":"https://avatars.githubusercontent.com/u/1204189?v=3","gravatar_id":"","url":"https://api.github.com/users/kalikiana","html_url":"https://github.com/kalikiana","followers_url":"https://api.github.com/users/kalikiana/followers","following_url":"https://api.github.com/users/kalikiana/following{/other_user}","gists_url":"https://api.github.com/users/kalikiana/gists{/gist_id}","starred_url":"https://api.github.com/users/kalikiana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kalikiana/subscriptions","organizations_url":"https://api.github.com/users/kalikiana/orgs","repos_url":"https://api.github.com/users/kalikiana/repos","events_url":"https://api.github.com/users/kalikiana/events{/privacy}","received_events_url":"https://api.github.com/users/kalikiana/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-10-27T15:18:28Z","updated_at":"2016-11-08T20:42:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f39a49bf350a521c88697cbd16f39c34dae39b00","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/snapcore/snapd/pulls/2225/commits","review_comments_url":"https://api.github.com/repos/snapcore/snapd/pulls/2225/comments","review_comment_url":"https://api.github.com/repos/snapcore/snapd/pulls/comments{/number}","comments_url":"https://api.github.com/repos/snapcore/snapd/issues/2225/comments","statuses_url":"https://api.github.com/repos/snapcore/snapd/statuses/5ae897f6b87bd07a1e4a4e8e3fc54f0c7ceb6352","head":{"label":"kalikiana:lxd-interface","ref":"lxd-interface","sha":"5ae897f6b87bd07a1e4a4e8e3fc54f0c7ceb6352","user":{"login":"kalikiana","id":1204189,"avatar_url":"https://avatars.githubusercontent.com/u/1204189?v=3","gravatar_id":"","url":"https://api.github.com/users/kalikiana","html_url":"https://github.com/kalikiana","followers_url":"https://api.github.com/users/kalikiana/followers","following_url":"https://api.github.com/users/kalikiana/following{/other_user}","gists_url":"https://api.github.com/users/kalikiana/gists{/gist_id}","starred_url":"https://api.github.com/users/kalikiana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kalikiana/subscriptions","organizations_url":"https://api.github.com/users/kalikiana/orgs","repos_url":"https://api.github.com/users/kalikiana/repos","events_url":"https://api.github.com/users/kalikiana/events{/privacy}","received_events_url":"https://api.github.com/users/kalikiana/received_events","type":"User","site_admin":false},"repo":{"id":71438052,"name":"snapd","full_name":"kalikiana/snapd","owner":{"login":"kalikiana","id":1204189,"avatar_url":"https://avatars.githubusercontent.com/u/1204189?v=3","gravatar_id":"","url":"https://api.github.com/users/kalikiana","html_url":"https://github.com/kalikiana","followers_url":"https://api.github.com/users/kalikiana/followers","following_url":"https://api.github.com/users/kalikiana/following{/other_user}","gists_url":"https://api.github.com/users/kalikiana/gists{/gist_id}","starred_url":"https://api.github.com/users/kalikiana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kalikiana/subscriptions","organizations_url":"https://api.github.com/users/kalikiana/orgs","repos_url":"https://api.github.com/users/kalikiana/repos","events_url":"https://api.github.com/users/kalikiana/events{/privacy}","received_events_url":"https://api.github.com/users/kalikiana/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kalikiana/snapd","description":"The snapd and snap tools enable systems to work with .snap files.","fork":true,"url":"https://api.github.com/repos/kalikiana/snapd","forks_url":"https://api.github.com/repos/kalikiana/snapd/forks","keys_url":"https://api.github.com/repos/kalikiana/snapd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kalikiana/snapd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kalikiana/snapd/teams","hooks_url":"https://api.github.com/repos/kalikiana/snapd/hooks","issue_events_url":"https://api.github.com/repos/kalikiana/snapd/issues/events{/number}","events_url":"https://api.github.com/repos/kalikiana/snapd/events","assignees_url":"https://api.github.com/repos/kalikiana/snapd/assignees{/user}","branches_url":"https://api.github.com/repos/kalikiana/snapd/branches{/branch}","tags_url":"https://api.github.com/repos/kalikiana/snapd/tags","blobs_url":"https://api.github.com/repos/kalikiana/snapd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kalikiana/snapd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kalikiana/snapd/git/refs{/sha}","trees_url":"https://api.github.com/repos/kalikiana/snapd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kalikiana/snapd/statuses/{sha}","languages_url":"https://api.github.com/repos/kalikiana/snapd/languages","stargazers_url":"https://api.github.com/repos/kalikiana/snapd/stargazers","contributors_url":"https://api.github.com/repos/kalikiana/snapd/contributors","subscribers_url":"https://api.github.com/repos/kalikiana/snapd/subscribers","subscription_url":"https://api.github.com/repos/kalikiana/snapd/subscription","commits_url":"https://api.github.com/repos/kalikiana/snapd/commits{/sha}","git_commits_url":"https://api.github.com/repos/kalikiana/snapd/git/commits{/sha}","comments_url":"https://api.github.com/repos/kalikiana/snapd/comments{/number}","issue_comment_url":"https://api.github.com/repos/kalikiana/snapd/issues/comments{/number}","contents_url":"https://api.github.com/repos/kalikiana/snapd/contents/{+path}","compare_url":"https://api.github.com/repos/kalikiana/snapd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kalikiana/snapd/merges","archive_url":"https://api.github.com/repos/kalikiana/snapd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kalikiana/snapd/downloads","issues_url":"https://api.github.com/repos/kalikiana/snapd/issues{/number}","pulls_url":"https://api.github.com/repos/kalikiana/snapd/pulls{/number}","milestones_url":"https://api.github.com/repos/kalikiana/snapd/milestones{/number}","notifications_url":"https://api.github.com/repos/kalikiana/snapd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kalikiana/snapd/labels{/name}","releases_url":"https://api.github.com/repos/kalikiana/snapd/releases{/id}","deployments_url":"https://api.github.com/repos/kalikiana/snapd/deployments","created_at":"2016-10-20T07:49:13Z","updated_at":"2016-10-20T07:49:15Z","pushed_at":"2016-11-07T09:26:34Z","git_url":"git://github.com/kalikiana/snapd.git","ssh_url":"git@github.com:kalikiana/snapd.git","clone_url":"https://github.com/kalikiana/snapd.git","svn_url":"https://github.com/kalikiana/snapd","homepage":"","size":38258,"stargazers_count":0,"watchers_count":0,"language":"Go","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":"snapcore:master","ref":"master","sha":"6c41a6173ab87dbdc45f9815b5ea961387daaa37","user":{"login":"snapcore","id":19532717,"avatar_url":"https://avatars.githubusercontent.com/u/19532717?v=3","gravatar_id":"","url":"https://api.github.com/users/snapcore","html_url":"https://github.com/snapcore","followers_url":"https://api.github.com/users/snapcore/followers","following_url":"https://api.github.com/users/snapcore/following{/other_user}","gists_url":"https://api.github.com/users/snapcore/gists{/gist_id}","starred_url":"https://api.github.com/users/snapcore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snapcore/subscriptions","organizations_url":"https://api.github.com/users/snapcore/orgs","repos_url":"https://api.github.com/users/snapcore/repos","events_url":"https://api.github.com/users/snapcore/events{/privacy}","received_events_url":"https://api.github.com/users/snapcore/received_events","type":"Organization","site_admin":false},"repo":{"id":44672744,"name":"snapd","full_name":"snapcore/snapd","owner":{"login":"snapcore","id":19532717,"avatar_url":"https://avatars.githubusercontent.com/u/19532717?v=3","gravatar_id":"","url":"https://api.github.com/users/snapcore","html_url":"https://github.com/snapcore","followers_url":"https://api.github.com/users/snapcore/followers","following_url":"https://api.github.com/users/snapcore/following{/other_user}","gists_url":"https://api.github.com/users/snapcore/gists{/gist_id}","starred_url":"https://api.github.com/users/snapcore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snapcore/subscriptions","organizations_url":"https://api.github.com/users/snapcore/orgs","repos_url":"https://api.github.com/users/snapcore/repos","events_url":"https://api.github.com/users/snapcore/events{/privacy}","received_events_url":"https://api.github.com/users/snapcore/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/snapcore/snapd","description":"The snapd and snap tools enable systems to work with .snap files.","fork":false,"url":"https://api.github.com/repos/snapcore/snapd","forks_url":"https://api.github.com/repos/snapcore/snapd/forks","keys_url":"https://api.github.com/repos/snapcore/snapd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/snapcore/snapd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/snapcore/snapd/teams","hooks_url":"https://api.github.com/repos/snapcore/snapd/hooks","issue_events_url":"https://api.github.com/repos/snapcore/snapd/issues/events{/number}","events_url":"https://api.github.com/repos/snapcore/snapd/events","assignees_url":"https://api.github.com/repos/snapcore/snapd/assignees{/user}","branches_url":"https://api.github.com/repos/snapcore/snapd/branches{/branch}","tags_url":"https://api.github.com/repos/snapcore/snapd/tags","blobs_url":"https://api.github.com/repos/snapcore/snapd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/snapcore/snapd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/snapcore/snapd/git/refs{/sha}","trees_url":"https://api.github.com/repos/snapcore/snapd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/snapcore/snapd/statuses/{sha}","languages_url":"https://api.github.com/repos/snapcore/snapd/languages","stargazers_url":"https://api.github.com/repos/snapcore/snapd/stargazers","contributors_url":"https://api.github.com/repos/snapcore/snapd/contributors","subscribers_url":"https://api.github.com/repos/snapcore/snapd/subscribers","subscription_url":"https://api.github.com/repos/snapcore/snapd/subscription","commits_url":"https://api.github.com/repos/snapcore/snapd/commits{/sha}","git_commits_url":"https://api.github.com/repos/snapcore/snapd/git/commits{/sha}","comments_url":"https://api.github.com/repos/snapcore/snapd/comments{/number}","issue_comment_url":"https://api.github.com/repos/snapcore/snapd/issues/comments{/number}","contents_url":"https://api.github.com/repos/snapcore/snapd/contents/{+path}","compare_url":"https://api.github.com/repos/snapcore/snapd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/snapcore/snapd/merges","archive_url":"https://api.github.com/repos/snapcore/snapd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/snapcore/snapd/downloads","issues_url":"https://api.github.com/repos/snapcore/snapd/issues{/number}","pulls_url":"https://api.github.com/repos/snapcore/snapd/pulls{/number}","milestones_url":"https://api.github.com/repos/snapcore/snapd/milestones{/number}","notifications_url":"https://api.github.com/repos/snapcore/snapd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/snapcore/snapd/labels{/name}","releases_url":"https://api.github.com/repos/snapcore/snapd/releases{/id}","deployments_url":"https://api.github.com/repos/snapcore/snapd/deployments","created_at":"2015-10-21T11:51:46Z","updated_at":"2016-11-08T05:58:08Z","pushed_at":"2016-11-08T19:44:24Z","git_url":"git://github.com/snapcore/snapd.git","ssh_url":"git@github.com:snapcore/snapd.git","clone_url":"https://github.com/snapcore/snapd.git","svn_url":"https://github.com/snapcore/snapd","homepage":"","size":42007,"stargazers_count":429,"watchers_count":429,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":121,"mirror_url":null,"open_issues_count":50,"forks":121,"open_issues":50,"watchers":429,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/snapcore/snapd/pulls/2225"},"html":{"href":"https://github.com/snapcore/snapd/pull/2225"},"issue":{"href":"https://api.github.com/repos/snapcore/snapd/issues/2225"},"comments":{"href":"https://api.github.com/repos/snapcore/snapd/issues/2225/comments"},"review_comments":{"href":"https://api.github.com/repos/snapcore/snapd/pulls/2225/comments"},"review_comment":{"href":"https://api.github.com/repos/snapcore/snapd/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/snapcore/snapd/pulls/2225/commits"},"statuses":{"href":"https://api.github.com/repos/snapcore/snapd/statuses/5ae897f6b87bd07a1e4a4e8e3fc54f0c7ceb6352"}}}}
{"actor":{"display_login":"jdstrand"}}