{"action":"created","issue":{"url":"https://api.github.com/repos/singularityware/singularity/issues/1765","repository_url":"https://api.github.com/repos/singularityware/singularity","labels_url":"https://api.github.com/repos/singularityware/singularity/issues/1765/labels{/name}","comments_url":"https://api.github.com/repos/singularityware/singularity/issues/1765/comments","events_url":"https://api.github.com/repos/singularityware/singularity/issues/1765/events","html_url":"https://github.com/singularityware/singularity/pull/1765","id":342077835,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAyMDY0MzM2","number":1765,"title":"Privileged Test Framework","user":{"login":"tri-adam","id":9903835,"node_id":"MDQ6VXNlcjk5MDM4MzU=","avatar_url":"https://avatars2.githubusercontent.com/u/9903835?v=4","gravatar_id":"","url":"https://api.github.com/users/tri-adam","html_url":"https://github.com/tri-adam","followers_url":"https://api.github.com/users/tri-adam/followers","following_url":"https://api.github.com/users/tri-adam/following{/other_user}","gists_url":"https://api.github.com/users/tri-adam/gists{/gist_id}","starred_url":"https://api.github.com/users/tri-adam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tri-adam/subscriptions","organizations_url":"https://api.github.com/users/tri-adam/orgs","repos_url":"https://api.github.com/users/tri-adam/repos","events_url":"https://api.github.com/users/tri-adam/events{/privacy}","received_events_url":"https://api.github.com/users/tri-adam/received_events","type":"User","site_admin":false},"labels":[{"id":775894486,"node_id":"MDU6TGFiZWw3NzU4OTQ0ODY=","url":"https://api.github.com/repos/singularityware/singularity/labels/Release%203.0","name":"Release 3.0","color":"398bef","default":false}],"state":"open","locked":false,"assignee":{"login":"tri-adam","id":9903835,"node_id":"MDQ6VXNlcjk5MDM4MzU=","avatar_url":"https://avatars2.githubusercontent.com/u/9903835?v=4","gravatar_id":"","url":"https://api.github.com/users/tri-adam","html_url":"https://github.com/tri-adam","followers_url":"https://api.github.com/users/tri-adam/followers","following_url":"https://api.github.com/users/tri-adam/following{/other_user}","gists_url":"https://api.github.com/users/tri-adam/gists{/gist_id}","starred_url":"https://api.github.com/users/tri-adam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tri-adam/subscriptions","organizations_url":"https://api.github.com/users/tri-adam/orgs","repos_url":"https://api.github.com/users/tri-adam/repos","events_url":"https://api.github.com/users/tri-adam/events{/privacy}","received_events_url":"https://api.github.com/users/tri-adam/received_events","type":"User","site_admin":false},"assignees":[{"login":"tri-adam","id":9903835,"node_id":"MDQ6VXNlcjk5MDM4MzU=","avatar_url":"https://avatars2.githubusercontent.com/u/9903835?v=4","gravatar_id":"","url":"https://api.github.com/users/tri-adam","html_url":"https://github.com/tri-adam","followers_url":"https://api.github.com/users/tri-adam/followers","following_url":"https://api.github.com/users/tri-adam/following{/other_user}","gists_url":"https://api.github.com/users/tri-adam/gists{/gist_id}","starred_url":"https://api.github.com/users/tri-adam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tri-adam/subscriptions","organizations_url":"https://api.github.com/users/tri-adam/orgs","repos_url":"https://api.github.com/users/tri-adam/repos","events_url":"https://api.github.com/users/tri-adam/events{/privacy}","received_events_url":"https://api.github.com/users/tri-adam/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2018-07-17T20:45:07Z","updated_at":"2018-07-18T15:02:03Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/singularityware/singularity/pulls/1765","html_url":"https://github.com/singularityware/singularity/pull/1765","diff_url":"https://github.com/singularityware/singularity/pull/1765.diff","patch_url":"https://github.com/singularityware/singularity/pull/1765.patch"},"body":"Adding new package in `src/pkg/test`, which defines the following fuctions:\r\n- `DropPrivilege()` and `ResetPrivilege()` - use in a test case that is to run without privileges. The former is used to drop privilege, the latter to reset to the original privilege. Note that tests using these two functions function as normal when run as an unprivileged user (for example, from VS Code.)\r\n- `EnsurePrivilege()` - use in a test case that is to run with privilege. Calls `testing.Fatal` if not run with elevated privilege. Does nothing otherwise.\r\n- `test.WithoutPrivilege()` - takes a test function and returns a test function that will run without elevated privilege. Useful for table-driven tests where `t.Run()` is called.\r\n- `test.WithPrivilege()` - takes a test function and returns a test function that will run with elevated privilege. Useful for table-driven tests where `t.Run()` is called.\r\n\r\nExisting tests have been updated to run with/without privilege as necessary."},"comment":{"url":"https://api.github.com/repos/singularityware/singularity/issues/comments/405962968","html_url":"https://github.com/singularityware/singularity/pull/1765#issuecomment-405962968","issue_url":"https://api.github.com/repos/singularityware/singularity/issues/1765","id":405962968,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNTk2Mjk2OA==","user":{"login":"tri-adam","id":9903835,"node_id":"MDQ6VXNlcjk5MDM4MzU=","avatar_url":"https://avatars2.githubusercontent.com/u/9903835?v=4","gravatar_id":"","url":"https://api.github.com/users/tri-adam","html_url":"https://github.com/tri-adam","followers_url":"https://api.github.com/users/tri-adam/followers","following_url":"https://api.github.com/users/tri-adam/following{/other_user}","gists_url":"https://api.github.com/users/tri-adam/gists{/gist_id}","starred_url":"https://api.github.com/users/tri-adam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tri-adam/subscriptions","organizations_url":"https://api.github.com/users/tri-adam/orgs","repos_url":"https://api.github.com/users/tri-adam/repos","events_url":"https://api.github.com/users/tri-adam/events{/privacy}","received_events_url":"https://api.github.com/users/tri-adam/received_events","type":"User","site_admin":false},"created_at":"2018-07-18T15:02:03Z","updated_at":"2018-07-18T15:02:03Z","author_association":"CONTRIBUTOR","body":"Oh, great idea. Will do! "}}
{"actor":{"display_login":"tri-adam"}}