{"action":"created","comment":{"url":"https://api.github.com/repos/Kinto/kinto-integration-tests/pulls/comments/186975475","pull_request_review_id":118656240,"id":186975475,"diff_hunk":"@@ -0,0 +1,58 @@\n+import os\n+import pytest\n+\n+from kinto_http import Client\n+from kinto_http.patch_type import JSONPatch\n+\n+\n+@pytest.mark.settings\n+@pytest.mark.skipif(\n+    pytest.config.getoption(\"env\") != \"stage\",\n+    reason=\"Test only runs on staging\"\n+)\n+def test_create_collection_in_main_bucket(conf, env):\n+    # Create a record inside the 'main-workspace' bucket and then\n+    # request that a specific user review it\n+    client = Client(\n+        server_url=conf.get(env, \"writer_server\"),\n+        auth=(os.getenv(\"RS_USER_1_LOGIN\"), os.getenv(\"RS_USER_1_PASSWD\"))\n+    )\n+    data = {\"qa\": \"testing\"}\n+    client.create_collection(id=\"qatest\", if_not_exists=True, bucket=\"main-workspace\")\n+    cr_response = client.create_record(data=data, collection=\"qatest\", bucket=\"main-workspace\")\n+    new_record_id = cr_response[\"data\"][\"id\"]\n+    changes = JSONPatch(\n+        [dict(op=\"add\", path=\"/data/members/0\", value=\"kinto_rs_2\")]\n+    )\n+    client.patch_group(\n+        id=\"qatest-reviewers\",\n+        bucket=\"main-workspace\",\n+        changes=changes\n+    )\n+\n+    # Now request a review of these changes\n+    client.patch_collection(\n+        id=\"qatest\",\n+        bucket=\"main-workspace\",\n+        data={\"status\": \"to-review\"}\n+    )\n+    pre_sign_info = client.get_collection(id=\"qatest\", bucket=\"main-workspace\")\n+\n+    # Create a second client to act as the reviewer and approve the reqqust\n+    reviewer_client = Client(\n+        server_url=conf.get(env, \"writer_server\"),\n+        auth=(os.getenv(\"RS_USER_2_LOGIN\"), os.getenv(\"RS_USER_2_PASSWD\"))\n+    )\n+    reviewer_client.patch_collection(\n+        id=\"qatest\",\n+        bucket=\"main-workspace\",\n+        data={\"status\": \"to-sign\"}\n+    )\n+\n+    # If last_signature_date has changed, we know the signing successfully happened\n+    post_sign_info = client.get_collection(id=\"qatest\", bucket=\"main-workspace\")\n+    assert pre_sign_info[\"data\"][\"last_signature_date\"] != post_sign_info[\"data\"][\"last_signature_date\"]\n+\n+    # Clean up after ourselves\n+    dr_response = client.delete_record(id=new_record_id, collection=\"qatest\", bucket=\"main-workspace\")\n+    assert dr_response[\"deleted\"] is True","path":"config-tests/test_remote_settings.py","position":58,"original_position":58,"commit_id":"fbb102b3b598cef2e725af427d8c9d7cd4d36607","original_commit_id":"fbb102b3b598cef2e725af427d8c9d7cd4d36607","user":{"login":"leplatrem","id":546692,"avatar_url":"https://avatars2.githubusercontent.com/u/546692?v=4","gravatar_id":"","url":"https://api.github.com/users/leplatrem","html_url":"https://github.com/leplatrem","followers_url":"https://api.github.com/users/leplatrem/followers","following_url":"https://api.github.com/users/leplatrem/following{/other_user}","gists_url":"https://api.github.com/users/leplatrem/gists{/gist_id}","starred_url":"https://api.github.com/users/leplatrem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leplatrem/subscriptions","organizations_url":"https://api.github.com/users/leplatrem/orgs","repos_url":"https://api.github.com/users/leplatrem/repos","events_url":"https://api.github.com/users/leplatrem/events{/privacy}","received_events_url":"https://api.github.com/users/leplatrem/received_events","type":"User","site_admin":false},"body":"Technically here you would have to review + approve so that the destination collection gets cleaned-up too","created_at":"2018-05-09T08:56:41Z","updated_at":"2018-05-09T09:01:13Z","html_url":"https://github.com/Kinto/kinto-integration-tests/pull/96#discussion_r186975475","pull_request_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/pulls/96","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/Kinto/kinto-integration-tests/pulls/comments/186975475"},"html":{"href":"https://github.com/Kinto/kinto-integration-tests/pull/96#discussion_r186975475"},"pull_request":{"href":"https://api.github.com/repos/Kinto/kinto-integration-tests/pulls/96"}}},"pull_request":{"url":"https://api.github.com/repos/Kinto/kinto-integration-tests/pulls/96","id":186749464,"html_url":"https://github.com/Kinto/kinto-integration-tests/pull/96","diff_url":"https://github.com/Kinto/kinto-integration-tests/pull/96.diff","patch_url":"https://github.com/Kinto/kinto-integration-tests/pull/96.patch","issue_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/issues/96","number":96,"state":"open","locked":false,"title":"Added a new test for the 'main' bucket for remote settings","user":{"login":"chartjes","id":28321,"avatar_url":"https://avatars3.githubusercontent.com/u/28321?v=4","gravatar_id":"","url":"https://api.github.com/users/chartjes","html_url":"https://github.com/chartjes","followers_url":"https://api.github.com/users/chartjes/followers","following_url":"https://api.github.com/users/chartjes/following{/other_user}","gists_url":"https://api.github.com/users/chartjes/gists{/gist_id}","starred_url":"https://api.github.com/users/chartjes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chartjes/subscriptions","organizations_url":"https://api.github.com/users/chartjes/orgs","repos_url":"https://api.github.com/users/chartjes/repos","events_url":"https://api.github.com/users/chartjes/events{/privacy}","received_events_url":"https://api.github.com/users/chartjes/received_events","type":"User","site_admin":false},"body":"This test does the following:\r\n\r\n* creates a record in a collection in the 'main-workspace' bucket\r\n* requests that it be reviewed\r\n* okays the review\r\n* cleans up after itself\r\n\r\nr? @leplatrem for the testing method\r\nr? @davehunt for the changes to the Jenkinsfile to support uploading a \"secret\" file to the kinto.stage build","created_at":"2018-05-08T20:39:33Z","updated_at":"2018-05-09T09:01:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/pulls/96/commits","review_comments_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/pulls/96/comments","review_comment_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/issues/96/comments","statuses_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/statuses/fbb102b3b598cef2e725af427d8c9d7cd4d36607","head":{"label":"Kinto:ch-remote-settings","ref":"ch-remote-settings","sha":"fbb102b3b598cef2e725af427d8c9d7cd4d36607","user":{"login":"Kinto","id":13413813,"avatar_url":"https://avatars2.githubusercontent.com/u/13413813?v=4","gravatar_id":"","url":"https://api.github.com/users/Kinto","html_url":"https://github.com/Kinto","followers_url":"https://api.github.com/users/Kinto/followers","following_url":"https://api.github.com/users/Kinto/following{/other_user}","gists_url":"https://api.github.com/users/Kinto/gists{/gist_id}","starred_url":"https://api.github.com/users/Kinto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kinto/subscriptions","organizations_url":"https://api.github.com/users/Kinto/orgs","repos_url":"https://api.github.com/users/Kinto/repos","events_url":"https://api.github.com/users/Kinto/events{/privacy}","received_events_url":"https://api.github.com/users/Kinto/received_events","type":"Organization","site_admin":false},"repo":{"id":80060555,"name":"kinto-integration-tests","full_name":"Kinto/kinto-integration-tests","owner":{"login":"Kinto","id":13413813,"avatar_url":"https://avatars2.githubusercontent.com/u/13413813?v=4","gravatar_id":"","url":"https://api.github.com/users/Kinto","html_url":"https://github.com/Kinto","followers_url":"https://api.github.com/users/Kinto/followers","following_url":"https://api.github.com/users/Kinto/following{/other_user}","gists_url":"https://api.github.com/users/Kinto/gists{/gist_id}","starred_url":"https://api.github.com/users/Kinto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kinto/subscriptions","organizations_url":"https://api.github.com/users/Kinto/orgs","repos_url":"https://api.github.com/users/Kinto/repos","events_url":"https://api.github.com/users/Kinto/events{/privacy}","received_events_url":"https://api.github.com/users/Kinto/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Kinto/kinto-integration-tests","description":"kinto-settings integration tests","fork":false,"url":"https://api.github.com/repos/Kinto/kinto-integration-tests","forks_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/forks","keys_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/teams","hooks_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/hooks","issue_events_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/issues/events{/number}","events_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/events","assignees_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/assignees{/user}","branches_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/branches{/branch}","tags_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/tags","blobs_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/git/refs{/sha}","trees_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/statuses/{sha}","languages_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/languages","stargazers_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/stargazers","contributors_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/contributors","subscribers_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/subscribers","subscription_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/subscription","commits_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/commits{/sha}","git_commits_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/git/commits{/sha}","comments_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/comments{/number}","issue_comment_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/issues/comments{/number}","contents_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/contents/{+path}","compare_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/merges","archive_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/downloads","issues_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/issues{/number}","pulls_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/pulls{/number}","milestones_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/milestones{/number}","notifications_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/labels{/name}","releases_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/releases{/id}","deployments_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/deployments","created_at":"2017-01-25T21:39:27Z","updated_at":"2018-05-07T18:09:12Z","pushed_at":"2018-05-08T20:39:34Z","git_url":"git://github.com/Kinto/kinto-integration-tests.git","ssh_url":"git@github.com:Kinto/kinto-integration-tests.git","clone_url":"https://github.com/Kinto/kinto-integration-tests.git","svn_url":"https://github.com/Kinto/kinto-integration-tests","homepage":"","size":194,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":9,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":3,"open_issues":9,"watchers":1,"default_branch":"master"}},"base":{"label":"Kinto:master","ref":"master","sha":"ad8a4730a0ae7515b75a5e1047318e47d6756af8","user":{"login":"Kinto","id":13413813,"avatar_url":"https://avatars2.githubusercontent.com/u/13413813?v=4","gravatar_id":"","url":"https://api.github.com/users/Kinto","html_url":"https://github.com/Kinto","followers_url":"https://api.github.com/users/Kinto/followers","following_url":"https://api.github.com/users/Kinto/following{/other_user}","gists_url":"https://api.github.com/users/Kinto/gists{/gist_id}","starred_url":"https://api.github.com/users/Kinto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kinto/subscriptions","organizations_url":"https://api.github.com/users/Kinto/orgs","repos_url":"https://api.github.com/users/Kinto/repos","events_url":"https://api.github.com/users/Kinto/events{/privacy}","received_events_url":"https://api.github.com/users/Kinto/received_events","type":"Organization","site_admin":false},"repo":{"id":80060555,"name":"kinto-integration-tests","full_name":"Kinto/kinto-integration-tests","owner":{"login":"Kinto","id":13413813,"avatar_url":"https://avatars2.githubusercontent.com/u/13413813?v=4","gravatar_id":"","url":"https://api.github.com/users/Kinto","html_url":"https://github.com/Kinto","followers_url":"https://api.github.com/users/Kinto/followers","following_url":"https://api.github.com/users/Kinto/following{/other_user}","gists_url":"https://api.github.com/users/Kinto/gists{/gist_id}","starred_url":"https://api.github.com/users/Kinto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kinto/subscriptions","organizations_url":"https://api.github.com/users/Kinto/orgs","repos_url":"https://api.github.com/users/Kinto/repos","events_url":"https://api.github.com/users/Kinto/events{/privacy}","received_events_url":"https://api.github.com/users/Kinto/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Kinto/kinto-integration-tests","description":"kinto-settings integration tests","fork":false,"url":"https://api.github.com/repos/Kinto/kinto-integration-tests","forks_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/forks","keys_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/teams","hooks_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/hooks","issue_events_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/issues/events{/number}","events_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/events","assignees_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/assignees{/user}","branches_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/branches{/branch}","tags_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/tags","blobs_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/git/refs{/sha}","trees_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/statuses/{sha}","languages_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/languages","stargazers_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/stargazers","contributors_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/contributors","subscribers_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/subscribers","subscription_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/subscription","commits_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/commits{/sha}","git_commits_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/git/commits{/sha}","comments_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/comments{/number}","issue_comment_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/issues/comments{/number}","contents_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/contents/{+path}","compare_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/merges","archive_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/downloads","issues_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/issues{/number}","pulls_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/pulls{/number}","milestones_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/milestones{/number}","notifications_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/labels{/name}","releases_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/releases{/id}","deployments_url":"https://api.github.com/repos/Kinto/kinto-integration-tests/deployments","created_at":"2017-01-25T21:39:27Z","updated_at":"2018-05-07T18:09:12Z","pushed_at":"2018-05-08T20:39:34Z","git_url":"git://github.com/Kinto/kinto-integration-tests.git","ssh_url":"git@github.com:Kinto/kinto-integration-tests.git","clone_url":"https://github.com/Kinto/kinto-integration-tests.git","svn_url":"https://github.com/Kinto/kinto-integration-tests","homepage":"","size":194,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":9,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":3,"open_issues":9,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Kinto/kinto-integration-tests/pulls/96"},"html":{"href":"https://github.com/Kinto/kinto-integration-tests/pull/96"},"issue":{"href":"https://api.github.com/repos/Kinto/kinto-integration-tests/issues/96"},"comments":{"href":"https://api.github.com/repos/Kinto/kinto-integration-tests/issues/96/comments"},"review_comments":{"href":"https://api.github.com/repos/Kinto/kinto-integration-tests/pulls/96/comments"},"review_comment":{"href":"https://api.github.com/repos/Kinto/kinto-integration-tests/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Kinto/kinto-integration-tests/pulls/96/commits"},"statuses":{"href":"https://api.github.com/repos/Kinto/kinto-integration-tests/statuses/fbb102b3b598cef2e725af427d8c9d7cd4d36607"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"leplatrem"}}