{"action":"created","comment":{"url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/pulls/comments/194472281","pull_request_review_id":127649097,"id":194472281,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NDQ3MjI4MQ==","diff_hunk":"@@ -0,0 +1,454 @@\n+import os\n+import shutil\n+import time\n+import subprocess\n+import re\n+import pytest\n+\n+from subprocess import Popen, PIPE\n+from keywords.ClusterKeywords import ClusterKeywords\n+from keywords.exceptions import LogScanningError, CollectionError\n+from keywords.SyncGateway import sync_gateway_config_path_for_mode, get_sync_gateway_version\n+from keywords.utils import log_info, host_for_url\n+from libraries.testkit.cluster import Cluster\n+from utilities.cluster_config_utils import load_cluster_config_json\n+from utilities.cluster_config_utils import persist_cluster_config_environment_prop, copy_to_temp_conf\n+from utilities.scan_logs import scan_for_pattern\n+from keywords.MobileRestClient import MobileRestClient\n+from keywords import document, attachment\n+from libraries.provision.ansible_runner import AnsibleRunner\n+\n+\n+@pytest.mark.sanity\n+@pytest.mark.syncgateway\n+@pytest.mark.logredaction\n+@pytest.mark.parametrize(\"sg_conf_name, redaction_level\", [\n+    (\"log_redaction\", \"partial\"),\n+    (\"log_redaction\", \"none\")\n+])\n+def test_log_redaction_config(params_from_base_test_setup, remove_tmp_sg_redaction_logs, sg_conf_name, redaction_level):\n+    \"\"\"\n+    @summary\n+    1. Have sync_gateway config file with logging level as partial/none\n+    2. Restart sync_gateway\n+    3. Create user in sync_gateway\n+    4. Create docs with xattrs\n+    5. Verify data which is partial sensitive is tagged with 'ud' tags for partial\n+    and no ud tags if it is configured with None\n+    \"\"\"\n+    cluster_config = params_from_base_test_setup[\"cluster_config\"]\n+    mode = params_from_base_test_setup[\"mode\"]\n+    cluster_helper = ClusterKeywords(cluster_config)\n+    cluster_hosts = cluster_helper.get_cluster_topology(cluster_config)\n+    sg_admin_url = cluster_hosts[\"sync_gateways\"][0][\"admin\"]\n+    sg_url = cluster_hosts[\"sync_gateways\"][0][\"public\"]\n+    sg_ip = host_for_url(sg_admin_url)\n+    sg_db = \"db\"\n+    num_of_docs = 10\n+\n+    if get_sync_gateway_version(sg_ip)[0] < \"2.1\":\n+        pytest.skip(\"log redaction feature not available for version < 2.1 \")\n+\n+    sg_conf = sync_gateway_config_path_for_mode(sg_conf_name, mode)\n+\n+    log_info(\"Using cluster_conf: {}\".format(cluster_config))\n+    log_info(\"Using sg_conf: {}\".format(sg_conf))\n+\n+    # Modifying log redaction level to partial\n+    temp_cluster_config = copy_to_temp_conf(cluster_config, mode)\n+    print \"added redact level in config .... \"\n+    persist_cluster_config_environment_prop(temp_cluster_config, 'redactlevel', redaction_level, property_name_check=False)\n+    cluster = Cluster(config=temp_cluster_config)\n+    cluster.reset(sg_config_path=sg_conf)\n+\n+    # 3. Create user in sync_gateway","path":"testsuites/syncgateway/functional/tests/test_log_redaction.py","position":64,"original_position":64,"commit_id":"88917ce8761353d87609f1b538e8ba8d4452e4ec","original_commit_id":"88917ce8761353d87609f1b538e8ba8d4452e4ec","user":{"login":"hrajput89","id":18100038,"node_id":"MDQ6VXNlcjE4MTAwMDM4","avatar_url":"https://avatars3.githubusercontent.com/u/18100038?v=4","gravatar_id":"","url":"https://api.github.com/users/hrajput89","html_url":"https://github.com/hrajput89","followers_url":"https://api.github.com/users/hrajput89/followers","following_url":"https://api.github.com/users/hrajput89/following{/other_user}","gists_url":"https://api.github.com/users/hrajput89/gists{/gist_id}","starred_url":"https://api.github.com/users/hrajput89/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hrajput89/subscriptions","organizations_url":"https://api.github.com/users/hrajput89/orgs","repos_url":"https://api.github.com/users/hrajput89/repos","events_url":"https://api.github.com/users/hrajput89/events{/privacy}","received_events_url":"https://api.github.com/users/hrajput89/received_events","type":"User","site_admin":false},"body":"may be change the no.s or remove it. It confuses reader as 1 and 2 are not available in comments. Same for below comments","created_at":"2018-06-11T16:50:23Z","updated_at":"2018-06-11T16:58:04Z","html_url":"https://github.com/couchbaselabs/mobile-testkit/pull/1528#discussion_r194472281","pull_request_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/pulls/1528","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/couchbaselabs/mobile-testkit/pulls/comments/194472281"},"html":{"href":"https://github.com/couchbaselabs/mobile-testkit/pull/1528#discussion_r194472281"},"pull_request":{"href":"https://api.github.com/repos/couchbaselabs/mobile-testkit/pulls/1528"}}},"pull_request":{"url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/pulls/1528","id":193741865,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkzNzQxODY1","html_url":"https://github.com/couchbaselabs/mobile-testkit/pull/1528","diff_url":"https://github.com/couchbaselabs/mobile-testkit/pull/1528.diff","patch_url":"https://github.com/couchbaselabs/mobile-testkit/pull/1528.patch","issue_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/issues/1528","number":1528,"state":"open","locked":false,"title":"sg log redaction and sg collect info tests","user":{"login":"sridevi-15","id":17035128,"node_id":"MDQ6VXNlcjE3MDM1MTI4","avatar_url":"https://avatars3.githubusercontent.com/u/17035128?v=4","gravatar_id":"","url":"https://api.github.com/users/sridevi-15","html_url":"https://github.com/sridevi-15","followers_url":"https://api.github.com/users/sridevi-15/followers","following_url":"https://api.github.com/users/sridevi-15/following{/other_user}","gists_url":"https://api.github.com/users/sridevi-15/gists{/gist_id}","starred_url":"https://api.github.com/users/sridevi-15/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sridevi-15/subscriptions","organizations_url":"https://api.github.com/users/sridevi-15/orgs","repos_url":"https://api.github.com/users/sridevi-15/repos","events_url":"https://api.github.com/users/sridevi-15/events{/privacy}","received_events_url":"https://api.github.com/users/sridevi-15/received_events","type":"User","site_admin":false},"body":"#### Fixes #.\r\n\r\n- [x] Ran `flake8`\r\n- [x] Ran `run_repo_tests.sh`\r\n\r\n#### Changes proposed in this pull request:\r\n\r\n- sg log redaction tests\r\n- sg collect tool tests\r\n- sg collect rest api tests\r\n\r\n","created_at":"2018-06-08T23:11:11Z","updated_at":"2018-06-11T16:58:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cf69f41eaabb1f40307069f830a76bbf4a124ef3","assignee":null,"assignees":[],"requested_reviewers":[{"login":"raghusarangapani","id":24398601,"node_id":"MDQ6VXNlcjI0Mzk4NjAx","avatar_url":"https://avatars2.githubusercontent.com/u/24398601?v=4","gravatar_id":"","url":"https://api.github.com/users/raghusarangapani","html_url":"https://github.com/raghusarangapani","followers_url":"https://api.github.com/users/raghusarangapani/followers","following_url":"https://api.github.com/users/raghusarangapani/following{/other_user}","gists_url":"https://api.github.com/users/raghusarangapani/gists{/gist_id}","starred_url":"https://api.github.com/users/raghusarangapani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raghusarangapani/subscriptions","organizations_url":"https://api.github.com/users/raghusarangapani/orgs","repos_url":"https://api.github.com/users/raghusarangapani/repos","events_url":"https://api.github.com/users/raghusarangapani/events{/privacy}","received_events_url":"https://api.github.com/users/raghusarangapani/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/pulls/1528/commits","review_comments_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/pulls/1528/comments","review_comment_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/issues/1528/comments","statuses_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/statuses/88917ce8761353d87609f1b538e8ba8d4452e4ec","head":{"label":"couchbaselabs:feature/sg-redact-tests","ref":"feature/sg-redact-tests","sha":"88917ce8761353d87609f1b538e8ba8d4452e4ec","user":{"login":"couchbaselabs","id":636956,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYzNjk1Ng==","avatar_url":"https://avatars2.githubusercontent.com/u/636956?v=4","gravatar_id":"","url":"https://api.github.com/users/couchbaselabs","html_url":"https://github.com/couchbaselabs","followers_url":"https://api.github.com/users/couchbaselabs/followers","following_url":"https://api.github.com/users/couchbaselabs/following{/other_user}","gists_url":"https://api.github.com/users/couchbaselabs/gists{/gist_id}","starred_url":"https://api.github.com/users/couchbaselabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/couchbaselabs/subscriptions","organizations_url":"https://api.github.com/users/couchbaselabs/orgs","repos_url":"https://api.github.com/users/couchbaselabs/repos","events_url":"https://api.github.com/users/couchbaselabs/events{/privacy}","received_events_url":"https://api.github.com/users/couchbaselabs/received_events","type":"Organization","site_admin":false},"repo":{"id":45864773,"node_id":"MDEwOlJlcG9zaXRvcnk0NTg2NDc3Mw==","name":"mobile-testkit","full_name":"couchbaselabs/mobile-testkit","owner":{"login":"couchbaselabs","id":636956,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYzNjk1Ng==","avatar_url":"https://avatars2.githubusercontent.com/u/636956?v=4","gravatar_id":"","url":"https://api.github.com/users/couchbaselabs","html_url":"https://github.com/couchbaselabs","followers_url":"https://api.github.com/users/couchbaselabs/followers","following_url":"https://api.github.com/users/couchbaselabs/following{/other_user}","gists_url":"https://api.github.com/users/couchbaselabs/gists{/gist_id}","starred_url":"https://api.github.com/users/couchbaselabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/couchbaselabs/subscriptions","organizations_url":"https://api.github.com/users/couchbaselabs/orgs","repos_url":"https://api.github.com/users/couchbaselabs/repos","events_url":"https://api.github.com/users/couchbaselabs/events{/privacy}","received_events_url":"https://api.github.com/users/couchbaselabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/couchbaselabs/mobile-testkit","description":"Mobile QE Test Framework","fork":false,"url":"https://api.github.com/repos/couchbaselabs/mobile-testkit","forks_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/forks","keys_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/teams","hooks_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/hooks","issue_events_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/issues/events{/number}","events_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/events","assignees_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/assignees{/user}","branches_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/branches{/branch}","tags_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/tags","blobs_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/git/refs{/sha}","trees_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/statuses/{sha}","languages_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/languages","stargazers_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/stargazers","contributors_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/contributors","subscribers_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/subscribers","subscription_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/subscription","commits_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/commits{/sha}","git_commits_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/git/commits{/sha}","comments_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/comments{/number}","issue_comment_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/issues/comments{/number}","contents_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/contents/{+path}","compare_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/merges","archive_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/downloads","issues_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/issues{/number}","pulls_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/pulls{/number}","milestones_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/milestones{/number}","notifications_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/labels{/name}","releases_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/releases{/id}","deployments_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/deployments","created_at":"2015-11-09T20:28:01Z","updated_at":"2018-06-08T21:13:29Z","pushed_at":"2018-06-09T02:53:46Z","git_url":"git://github.com/couchbaselabs/mobile-testkit.git","ssh_url":"git@github.com:couchbaselabs/mobile-testkit.git","clone_url":"https://github.com/couchbaselabs/mobile-testkit.git","svn_url":"https://github.com/couchbaselabs/mobile-testkit","homepage":"","size":389286,"stargazers_count":10,"watchers_count":10,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"archived":false,"open_issues_count":332,"license":null,"forks":7,"open_issues":332,"watchers":10,"default_branch":"master"}},"base":{"label":"couchbaselabs:master","ref":"master","sha":"672a8619837f9e6b13752205135cc83b1df6b7cd","user":{"login":"couchbaselabs","id":636956,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYzNjk1Ng==","avatar_url":"https://avatars2.githubusercontent.com/u/636956?v=4","gravatar_id":"","url":"https://api.github.com/users/couchbaselabs","html_url":"https://github.com/couchbaselabs","followers_url":"https://api.github.com/users/couchbaselabs/followers","following_url":"https://api.github.com/users/couchbaselabs/following{/other_user}","gists_url":"https://api.github.com/users/couchbaselabs/gists{/gist_id}","starred_url":"https://api.github.com/users/couchbaselabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/couchbaselabs/subscriptions","organizations_url":"https://api.github.com/users/couchbaselabs/orgs","repos_url":"https://api.github.com/users/couchbaselabs/repos","events_url":"https://api.github.com/users/couchbaselabs/events{/privacy}","received_events_url":"https://api.github.com/users/couchbaselabs/received_events","type":"Organization","site_admin":false},"repo":{"id":45864773,"node_id":"MDEwOlJlcG9zaXRvcnk0NTg2NDc3Mw==","name":"mobile-testkit","full_name":"couchbaselabs/mobile-testkit","owner":{"login":"couchbaselabs","id":636956,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYzNjk1Ng==","avatar_url":"https://avatars2.githubusercontent.com/u/636956?v=4","gravatar_id":"","url":"https://api.github.com/users/couchbaselabs","html_url":"https://github.com/couchbaselabs","followers_url":"https://api.github.com/users/couchbaselabs/followers","following_url":"https://api.github.com/users/couchbaselabs/following{/other_user}","gists_url":"https://api.github.com/users/couchbaselabs/gists{/gist_id}","starred_url":"https://api.github.com/users/couchbaselabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/couchbaselabs/subscriptions","organizations_url":"https://api.github.com/users/couchbaselabs/orgs","repos_url":"https://api.github.com/users/couchbaselabs/repos","events_url":"https://api.github.com/users/couchbaselabs/events{/privacy}","received_events_url":"https://api.github.com/users/couchbaselabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/couchbaselabs/mobile-testkit","description":"Mobile QE Test Framework","fork":false,"url":"https://api.github.com/repos/couchbaselabs/mobile-testkit","forks_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/forks","keys_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/teams","hooks_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/hooks","issue_events_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/issues/events{/number}","events_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/events","assignees_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/assignees{/user}","branches_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/branches{/branch}","tags_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/tags","blobs_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/git/refs{/sha}","trees_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/statuses/{sha}","languages_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/languages","stargazers_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/stargazers","contributors_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/contributors","subscribers_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/subscribers","subscription_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/subscription","commits_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/commits{/sha}","git_commits_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/git/commits{/sha}","comments_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/comments{/number}","issue_comment_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/issues/comments{/number}","contents_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/contents/{+path}","compare_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/merges","archive_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/downloads","issues_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/issues{/number}","pulls_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/pulls{/number}","milestones_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/milestones{/number}","notifications_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/labels{/name}","releases_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/releases{/id}","deployments_url":"https://api.github.com/repos/couchbaselabs/mobile-testkit/deployments","created_at":"2015-11-09T20:28:01Z","updated_at":"2018-06-08T21:13:29Z","pushed_at":"2018-06-09T02:53:46Z","git_url":"git://github.com/couchbaselabs/mobile-testkit.git","ssh_url":"git@github.com:couchbaselabs/mobile-testkit.git","clone_url":"https://github.com/couchbaselabs/mobile-testkit.git","svn_url":"https://github.com/couchbaselabs/mobile-testkit","homepage":"","size":389286,"stargazers_count":10,"watchers_count":10,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"archived":false,"open_issues_count":332,"license":null,"forks":7,"open_issues":332,"watchers":10,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/couchbaselabs/mobile-testkit/pulls/1528"},"html":{"href":"https://github.com/couchbaselabs/mobile-testkit/pull/1528"},"issue":{"href":"https://api.github.com/repos/couchbaselabs/mobile-testkit/issues/1528"},"comments":{"href":"https://api.github.com/repos/couchbaselabs/mobile-testkit/issues/1528/comments"},"review_comments":{"href":"https://api.github.com/repos/couchbaselabs/mobile-testkit/pulls/1528/comments"},"review_comment":{"href":"https://api.github.com/repos/couchbaselabs/mobile-testkit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/couchbaselabs/mobile-testkit/pulls/1528/commits"},"statuses":{"href":"https://api.github.com/repos/couchbaselabs/mobile-testkit/statuses/88917ce8761353d87609f1b538e8ba8d4452e4ec"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"hrajput89"}}