{"action":"created","comment":{"url":"https://api.github.com/repos/ONSdigital/dp-api-tests/pulls/comments/187907454","pull_request_review_id":119778924,"id":187907454,"diff_hunk":"@@ -0,0 +1,153 @@\n+package datasetAPI\n+\n+import (\n+\t\"net/http\"\n+\t\"os\"\n+\t\"testing\"\n+\n+\tmgo \"gopkg.in/mgo.v2\"\n+\n+\t\"github.com/ONSdigital/dp-api-tests/testDataSetup/mongo\"\n+\t\"github.com/ONSdigital/go-ns/log\"\n+\t\"github.com/gavv/httpexpect\"\n+\tuuid \"github.com/satori/go.uuid\"\n+\t. \"github.com/smartystreets/goconvey/convey\"\n+)\n+\n+// This test may be slow due to iterating over results in dataset\n+// (which could be many)\n+func TestSuccessfulGetAListOfDatasets(t *testing.T) {\n+\n+\tdatasetID := uuid.NewV4().String()\n+\n+\tvar docs []*mongo.Doc\n+\n+\tpublishedDatasetDoc := &mongo.Doc{\n+\t\tDatabase:   cfg.MongoDB,\n+\t\tCollection: \"datasets\",\n+\t\tKey:        \"_id\",\n+\t\tValue:      datasetID,\n+\t\tUpdate:     ValidPublishedWithUpdatesDatasetData(datasetID),\n+\t}\n+\n+\tunpublishedDatasetDoc := &mongo.Doc{\n+\t\tDatabase:   cfg.MongoDB,\n+\t\tCollection: \"datasets\",\n+\t\tKey:        \"_id\",\n+\t\tValue:      \"133\",\n+\t\tUpdate:     validAssociatedDatasetData(datasetID),","path":"web/datasetAPI/get_datasets_test.go","position":38,"original_position":38,"commit_id":"2a979350af180133ee4508bbb95f549436aecbe4","original_commit_id":"2a979350af180133ee4508bbb95f549436aecbe4","user":{"login":"nshumoogum","id":7114615,"avatar_url":"https://avatars0.githubusercontent.com/u/7114615?v=4","gravatar_id":"","url":"https://api.github.com/users/nshumoogum","html_url":"https://github.com/nshumoogum","followers_url":"https://api.github.com/users/nshumoogum/followers","following_url":"https://api.github.com/users/nshumoogum/following{/other_user}","gists_url":"https://api.github.com/users/nshumoogum/gists{/gist_id}","starred_url":"https://api.github.com/users/nshumoogum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nshumoogum/subscriptions","organizations_url":"https://api.github.com/users/nshumoogum/orgs","repos_url":"https://api.github.com/users/nshumoogum/repos","events_url":"https://api.github.com/users/nshumoogum/events{/privacy}","received_events_url":"https://api.github.com/users/nshumoogum/received_events","type":"User","site_admin":false},"body":"yes, i've made this a variable to be reused and is not hardcoded to `133`","created_at":"2018-05-14T10:42:40Z","updated_at":"2018-05-14T10:42:40Z","html_url":"https://github.com/ONSdigital/dp-api-tests/pull/68#discussion_r187907454","pull_request_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/pulls/68","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/ONSdigital/dp-api-tests/pulls/comments/187907454"},"html":{"href":"https://github.com/ONSdigital/dp-api-tests/pull/68#discussion_r187907454"},"pull_request":{"href":"https://api.github.com/repos/ONSdigital/dp-api-tests/pulls/68"}},"in_reply_to_id":187872237},"pull_request":{"url":"https://api.github.com/repos/ONSdigital/dp-api-tests/pulls/68","id":187426175,"html_url":"https://github.com/ONSdigital/dp-api-tests/pull/68","diff_url":"https://github.com/ONSdigital/dp-api-tests/pull/68.diff","patch_url":"https://github.com/ONSdigital/dp-api-tests/pull/68.patch","issue_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/issues/68","number":68,"state":"open","locked":false,"title":"Feature/split dataset api tests","user":{"login":"nshumoogum","id":7114615,"avatar_url":"https://avatars0.githubusercontent.com/u/7114615?v=4","gravatar_id":"","url":"https://api.github.com/users/nshumoogum","html_url":"https://github.com/nshumoogum","followers_url":"https://api.github.com/users/nshumoogum/followers","following_url":"https://api.github.com/users/nshumoogum/following{/other_user}","gists_url":"https://api.github.com/users/nshumoogum/gists{/gist_id}","starred_url":"https://api.github.com/users/nshumoogum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nshumoogum/subscriptions","organizations_url":"https://api.github.com/users/nshumoogum/orgs","repos_url":"https://api.github.com/users/nshumoogum/repos","events_url":"https://api.github.com/users/nshumoogum/events{/privacy}","received_events_url":"https://api.github.com/users/nshumoogum/received_events","type":"User","site_admin":false},"body":"### What\r\n\r\nSplit out dataset api tests into web and publishing to be run against web and publishing subnets respectively.\r\n\r\n### How to review\r\n\r\nCheck tests pass against `feature/published-no-collection-id` branch on `dp-dataset-api`, remember to run `make acceptance-web` or `make acceptance-publishing` to start service in web or publishing respectively. You will also need `dp-auth-api-stub` running for publishing tests to pass.\r\n\r\n### Who can review\r\n\r\nTeam B\r\n","created_at":"2018-05-11T10:29:23Z","updated_at":"2018-05-14T10:42:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d72b697c63d7c255f550e4bc978cbedc5eb1144d","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/pulls/68/commits","review_comments_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/pulls/68/comments","review_comment_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/issues/68/comments","statuses_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/statuses/2a979350af180133ee4508bbb95f549436aecbe4","head":{"label":"ONSdigital:feature/split-dataset-api-tests","ref":"feature/split-dataset-api-tests","sha":"2a979350af180133ee4508bbb95f549436aecbe4","user":{"login":"ONSdigital","id":6865137,"avatar_url":"https://avatars0.githubusercontent.com/u/6865137?v=4","gravatar_id":"","url":"https://api.github.com/users/ONSdigital","html_url":"https://github.com/ONSdigital","followers_url":"https://api.github.com/users/ONSdigital/followers","following_url":"https://api.github.com/users/ONSdigital/following{/other_user}","gists_url":"https://api.github.com/users/ONSdigital/gists{/gist_id}","starred_url":"https://api.github.com/users/ONSdigital/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ONSdigital/subscriptions","organizations_url":"https://api.github.com/users/ONSdigital/orgs","repos_url":"https://api.github.com/users/ONSdigital/repos","events_url":"https://api.github.com/users/ONSdigital/events{/privacy}","received_events_url":"https://api.github.com/users/ONSdigital/received_events","type":"Organization","site_admin":false},"repo":{"id":102735561,"name":"dp-api-tests","full_name":"ONSdigital/dp-api-tests","owner":{"login":"ONSdigital","id":6865137,"avatar_url":"https://avatars0.githubusercontent.com/u/6865137?v=4","gravatar_id":"","url":"https://api.github.com/users/ONSdigital","html_url":"https://github.com/ONSdigital","followers_url":"https://api.github.com/users/ONSdigital/followers","following_url":"https://api.github.com/users/ONSdigital/following{/other_user}","gists_url":"https://api.github.com/users/ONSdigital/gists{/gist_id}","starred_url":"https://api.github.com/users/ONSdigital/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ONSdigital/subscriptions","organizations_url":"https://api.github.com/users/ONSdigital/orgs","repos_url":"https://api.github.com/users/ONSdigital/repos","events_url":"https://api.github.com/users/ONSdigital/events{/privacy}","received_events_url":"https://api.github.com/users/ONSdigital/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ONSdigital/dp-api-tests","description":"Automated API acceptance tests ","fork":false,"url":"https://api.github.com/repos/ONSdigital/dp-api-tests","forks_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/forks","keys_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/teams","hooks_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/hooks","issue_events_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/issues/events{/number}","events_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/events","assignees_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/assignees{/user}","branches_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/branches{/branch}","tags_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/tags","blobs_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/git/refs{/sha}","trees_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/statuses/{sha}","languages_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/languages","stargazers_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/stargazers","contributors_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/contributors","subscribers_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/subscribers","subscription_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/subscription","commits_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/commits{/sha}","git_commits_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/git/commits{/sha}","comments_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/comments{/number}","issue_comment_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/issues/comments{/number}","contents_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/contents/{+path}","compare_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/merges","archive_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/downloads","issues_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/issues{/number}","pulls_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/pulls{/number}","milestones_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/milestones{/number}","notifications_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/labels{/name}","releases_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/releases{/id}","deployments_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/deployments","created_at":"2017-09-07T12:40:49Z","updated_at":"2018-05-14T09:08:24Z","pushed_at":"2018-05-14T09:08:29Z","git_url":"git://github.com/ONSdigital/dp-api-tests.git","ssh_url":"git@github.com:ONSdigital/dp-api-tests.git","clone_url":"https://github.com/ONSdigital/dp-api-tests.git","svn_url":"https://github.com/ONSdigital/dp-api-tests","homepage":null,"size":2156,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":2,"watchers":0,"default_branch":"cmd-develop"}},"base":{"label":"ONSdigital:cmd-develop","ref":"cmd-develop","sha":"2f86a33ab7ada831fea8e6ded001bac93ff83b0b","user":{"login":"ONSdigital","id":6865137,"avatar_url":"https://avatars0.githubusercontent.com/u/6865137?v=4","gravatar_id":"","url":"https://api.github.com/users/ONSdigital","html_url":"https://github.com/ONSdigital","followers_url":"https://api.github.com/users/ONSdigital/followers","following_url":"https://api.github.com/users/ONSdigital/following{/other_user}","gists_url":"https://api.github.com/users/ONSdigital/gists{/gist_id}","starred_url":"https://api.github.com/users/ONSdigital/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ONSdigital/subscriptions","organizations_url":"https://api.github.com/users/ONSdigital/orgs","repos_url":"https://api.github.com/users/ONSdigital/repos","events_url":"https://api.github.com/users/ONSdigital/events{/privacy}","received_events_url":"https://api.github.com/users/ONSdigital/received_events","type":"Organization","site_admin":false},"repo":{"id":102735561,"name":"dp-api-tests","full_name":"ONSdigital/dp-api-tests","owner":{"login":"ONSdigital","id":6865137,"avatar_url":"https://avatars0.githubusercontent.com/u/6865137?v=4","gravatar_id":"","url":"https://api.github.com/users/ONSdigital","html_url":"https://github.com/ONSdigital","followers_url":"https://api.github.com/users/ONSdigital/followers","following_url":"https://api.github.com/users/ONSdigital/following{/other_user}","gists_url":"https://api.github.com/users/ONSdigital/gists{/gist_id}","starred_url":"https://api.github.com/users/ONSdigital/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ONSdigital/subscriptions","organizations_url":"https://api.github.com/users/ONSdigital/orgs","repos_url":"https://api.github.com/users/ONSdigital/repos","events_url":"https://api.github.com/users/ONSdigital/events{/privacy}","received_events_url":"https://api.github.com/users/ONSdigital/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ONSdigital/dp-api-tests","description":"Automated API acceptance tests ","fork":false,"url":"https://api.github.com/repos/ONSdigital/dp-api-tests","forks_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/forks","keys_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/teams","hooks_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/hooks","issue_events_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/issues/events{/number}","events_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/events","assignees_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/assignees{/user}","branches_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/branches{/branch}","tags_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/tags","blobs_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/git/refs{/sha}","trees_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/statuses/{sha}","languages_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/languages","stargazers_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/stargazers","contributors_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/contributors","subscribers_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/subscribers","subscription_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/subscription","commits_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/commits{/sha}","git_commits_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/git/commits{/sha}","comments_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/comments{/number}","issue_comment_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/issues/comments{/number}","contents_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/contents/{+path}","compare_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/merges","archive_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/downloads","issues_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/issues{/number}","pulls_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/pulls{/number}","milestones_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/milestones{/number}","notifications_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/labels{/name}","releases_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/releases{/id}","deployments_url":"https://api.github.com/repos/ONSdigital/dp-api-tests/deployments","created_at":"2017-09-07T12:40:49Z","updated_at":"2018-05-14T09:08:24Z","pushed_at":"2018-05-14T09:08:29Z","git_url":"git://github.com/ONSdigital/dp-api-tests.git","ssh_url":"git@github.com:ONSdigital/dp-api-tests.git","clone_url":"https://github.com/ONSdigital/dp-api-tests.git","svn_url":"https://github.com/ONSdigital/dp-api-tests","homepage":null,"size":2156,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":2,"watchers":0,"default_branch":"cmd-develop"}},"_links":{"self":{"href":"https://api.github.com/repos/ONSdigital/dp-api-tests/pulls/68"},"html":{"href":"https://github.com/ONSdigital/dp-api-tests/pull/68"},"issue":{"href":"https://api.github.com/repos/ONSdigital/dp-api-tests/issues/68"},"comments":{"href":"https://api.github.com/repos/ONSdigital/dp-api-tests/issues/68/comments"},"review_comments":{"href":"https://api.github.com/repos/ONSdigital/dp-api-tests/pulls/68/comments"},"review_comment":{"href":"https://api.github.com/repos/ONSdigital/dp-api-tests/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ONSdigital/dp-api-tests/pulls/68/commits"},"statuses":{"href":"https://api.github.com/repos/ONSdigital/dp-api-tests/statuses/2a979350af180133ee4508bbb95f549436aecbe4"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"nshumoogum"}}