{"action":"created","comment":{"url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/pulls/comments/177965312","pull_request_review_id":107938955,"id":177965312,"diff_hunk":"@@ -10,50 +10,55 @@\n logger = wrap_logger(logging.getLogger(__name__))\n \n \n-def execute_ras_sql(sql_script_file_path, database_uri=Config.DATABASE_URI):\n+def execute_ras_sql(sql_script_file_path=None, sql_string=None, database_uri=Config.DATABASE_URI):","path":"controllers/database_controller.py","position":null,"original_position":5,"commit_id":"b233bf656dc2e051732a901ba2f66e6c8e034f54","original_commit_id":"aef805d6b31c6a6359333815571a80cef0d52364","user":{"login":"jcox-dev","id":28348457,"avatar_url":"https://avatars0.githubusercontent.com/u/28348457?v=4","gravatar_id":"","url":"https://api.github.com/users/jcox-dev","html_url":"https://github.com/jcox-dev","followers_url":"https://api.github.com/users/jcox-dev/followers","following_url":"https://api.github.com/users/jcox-dev/following{/other_user}","gists_url":"https://api.github.com/users/jcox-dev/gists{/gist_id}","starred_url":"https://api.github.com/users/jcox-dev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcox-dev/subscriptions","organizations_url":"https://api.github.com/users/jcox-dev/orgs","repos_url":"https://api.github.com/users/jcox-dev/repos","events_url":"https://api.github.com/users/jcox-dev/events{/privacy}","received_events_url":"https://api.github.com/users/jcox-dev/received_events","type":"User","site_admin":false},"body":"👍  ","created_at":"2018-03-29T06:44:42Z","updated_at":"2018-03-29T06:44:42Z","html_url":"https://github.com/ONSdigital/rasrm-acceptance-tests/pull/94#discussion_r177965312","pull_request_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/pulls/94","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/pulls/comments/177965312"},"html":{"href":"https://github.com/ONSdigital/rasrm-acceptance-tests/pull/94#discussion_r177965312"},"pull_request":{"href":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/pulls/94"}}},"pull_request":{"url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/pulls/94","id":178018603,"html_url":"https://github.com/ONSdigital/rasrm-acceptance-tests/pull/94","diff_url":"https://github.com/ONSdigital/rasrm-acceptance-tests/pull/94.diff","patch_url":"https://github.com/ONSdigital/rasrm-acceptance-tests/pull/94.patch","issue_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/issues/94","number":94,"state":"open","locked":false,"title":"Refactor initial test setup","user":{"login":"andrewmil","id":22077099,"avatar_url":"https://avatars3.githubusercontent.com/u/22077099?v=4","gravatar_id":"","url":"https://api.github.com/users/andrewmil","html_url":"https://github.com/andrewmil","followers_url":"https://api.github.com/users/andrewmil/followers","following_url":"https://api.github.com/users/andrewmil/following{/other_user}","gists_url":"https://api.github.com/users/andrewmil/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewmil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewmil/subscriptions","organizations_url":"https://api.github.com/users/andrewmil/orgs","repos_url":"https://api.github.com/users/andrewmil/repos","events_url":"https://api.github.com/users/andrewmil/events{/privacy}","received_events_url":"https://api.github.com/users/andrewmil/received_events","type":"User","site_admin":false},"body":"General refactor of the initial setup of data for the acceptance tests, i.e. what happens during the `make setup` step and what is run before the tests in `environment.py`\r\n\r\nThis PR aims to:\r\n- Make it easier to add more collection exercises for future tests\r\n- Stop using the UI to add initial test data, if the UI is to fail we want it to be during the tests for that functionality\r\n- Reuse more code when executing collection exercises\r\n- Standardise sql execution (somewhat)\r\n\r\nTo test:\r\nRun the tests, there's been no changes with how to start/setup the tests","created_at":"2018-03-28T12:13:37Z","updated_at":"2018-03-29T06:44:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0cc3b0a6299105d90eba020f9ba6446a0568d56f","assignee":null,"assignees":[],"requested_reviewers":[{"login":"rjweeks","id":3774390,"avatar_url":"https://avatars1.githubusercontent.com/u/3774390?v=4","gravatar_id":"","url":"https://api.github.com/users/rjweeks","html_url":"https://github.com/rjweeks","followers_url":"https://api.github.com/users/rjweeks/followers","following_url":"https://api.github.com/users/rjweeks/following{/other_user}","gists_url":"https://api.github.com/users/rjweeks/gists{/gist_id}","starred_url":"https://api.github.com/users/rjweeks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rjweeks/subscriptions","organizations_url":"https://api.github.com/users/rjweeks/orgs","repos_url":"https://api.github.com/users/rjweeks/repos","events_url":"https://api.github.com/users/rjweeks/events{/privacy}","received_events_url":"https://api.github.com/users/rjweeks/received_events","type":"User","site_admin":false},{"login":"jwgwalton","id":7936236,"avatar_url":"https://avatars3.githubusercontent.com/u/7936236?v=4","gravatar_id":"","url":"https://api.github.com/users/jwgwalton","html_url":"https://github.com/jwgwalton","followers_url":"https://api.github.com/users/jwgwalton/followers","following_url":"https://api.github.com/users/jwgwalton/following{/other_user}","gists_url":"https://api.github.com/users/jwgwalton/gists{/gist_id}","starred_url":"https://api.github.com/users/jwgwalton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwgwalton/subscriptions","organizations_url":"https://api.github.com/users/jwgwalton/orgs","repos_url":"https://api.github.com/users/jwgwalton/repos","events_url":"https://api.github.com/users/jwgwalton/events{/privacy}","received_events_url":"https://api.github.com/users/jwgwalton/received_events","type":"User","site_admin":false},{"login":"gemmai95","id":10745032,"avatar_url":"https://avatars0.githubusercontent.com/u/10745032?v=4","gravatar_id":"","url":"https://api.github.com/users/gemmai95","html_url":"https://github.com/gemmai95","followers_url":"https://api.github.com/users/gemmai95/followers","following_url":"https://api.github.com/users/gemmai95/following{/other_user}","gists_url":"https://api.github.com/users/gemmai95/gists{/gist_id}","starred_url":"https://api.github.com/users/gemmai95/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gemmai95/subscriptions","organizations_url":"https://api.github.com/users/gemmai95/orgs","repos_url":"https://api.github.com/users/gemmai95/repos","events_url":"https://api.github.com/users/gemmai95/events{/privacy}","received_events_url":"https://api.github.com/users/gemmai95/received_events","type":"User","site_admin":false},{"login":"rhiGriff","id":22023945,"avatar_url":"https://avatars2.githubusercontent.com/u/22023945?v=4","gravatar_id":"","url":"https://api.github.com/users/rhiGriff","html_url":"https://github.com/rhiGriff","followers_url":"https://api.github.com/users/rhiGriff/followers","following_url":"https://api.github.com/users/rhiGriff/following{/other_user}","gists_url":"https://api.github.com/users/rhiGriff/gists{/gist_id}","starred_url":"https://api.github.com/users/rhiGriff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhiGriff/subscriptions","organizations_url":"https://api.github.com/users/rhiGriff/orgs","repos_url":"https://api.github.com/users/rhiGriff/repos","events_url":"https://api.github.com/users/rhiGriff/events{/privacy}","received_events_url":"https://api.github.com/users/rhiGriff/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/pulls/94/commits","review_comments_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/pulls/94/comments","review_comment_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/issues/94/comments","statuses_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/statuses/b233bf656dc2e051732a901ba2f66e6c8e034f54","head":{"label":"ONSdigital:clean-up-acceptance-tests-initialisation","ref":"clean-up-acceptance-tests-initialisation","sha":"b233bf656dc2e051732a901ba2f66e6c8e034f54","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":107403966,"name":"rasrm-acceptance-tests","full_name":"ONSdigital/rasrm-acceptance-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/rasrm-acceptance-tests","description":"Integration tests for RAS services","fork":false,"url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests","forks_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/forks","keys_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/teams","hooks_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/hooks","issue_events_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/issues/events{/number}","events_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/events","assignees_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/assignees{/user}","branches_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/branches{/branch}","tags_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/tags","blobs_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/git/refs{/sha}","trees_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/statuses/{sha}","languages_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/languages","stargazers_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/stargazers","contributors_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/contributors","subscribers_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/subscribers","subscription_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/subscription","commits_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/commits{/sha}","git_commits_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/git/commits{/sha}","comments_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/comments{/number}","issue_comment_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/issues/comments{/number}","contents_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/contents/{+path}","compare_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/merges","archive_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/downloads","issues_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/issues{/number}","pulls_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/pulls{/number}","milestones_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/milestones{/number}","notifications_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/labels{/name}","releases_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/releases{/id}","deployments_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/deployments","created_at":"2017-10-18T12:16:47Z","updated_at":"2018-03-23T15:29:56Z","pushed_at":"2018-03-28T16:12:00Z","git_url":"git://github.com/ONSdigital/rasrm-acceptance-tests.git","ssh_url":"git@github.com:ONSdigital/rasrm-acceptance-tests.git","clone_url":"https://github.com/ONSdigital/rasrm-acceptance-tests.git","svn_url":"https://github.com/ONSdigital/rasrm-acceptance-tests","homepage":null,"size":418,"stargazers_count":2,"watchers_count":2,"language":"PLpgSQL","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":8,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":8,"watchers":2,"default_branch":"master"}},"base":{"label":"ONSdigital:master","ref":"master","sha":"863045d1be6f3cd0aab807b585e9dc37bc308bae","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":107403966,"name":"rasrm-acceptance-tests","full_name":"ONSdigital/rasrm-acceptance-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/rasrm-acceptance-tests","description":"Integration tests for RAS services","fork":false,"url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests","forks_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/forks","keys_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/teams","hooks_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/hooks","issue_events_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/issues/events{/number}","events_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/events","assignees_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/assignees{/user}","branches_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/branches{/branch}","tags_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/tags","blobs_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/git/refs{/sha}","trees_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/statuses/{sha}","languages_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/languages","stargazers_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/stargazers","contributors_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/contributors","subscribers_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/subscribers","subscription_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/subscription","commits_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/commits{/sha}","git_commits_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/git/commits{/sha}","comments_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/comments{/number}","issue_comment_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/issues/comments{/number}","contents_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/contents/{+path}","compare_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/merges","archive_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/downloads","issues_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/issues{/number}","pulls_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/pulls{/number}","milestones_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/milestones{/number}","notifications_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/labels{/name}","releases_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/releases{/id}","deployments_url":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/deployments","created_at":"2017-10-18T12:16:47Z","updated_at":"2018-03-23T15:29:56Z","pushed_at":"2018-03-28T16:12:00Z","git_url":"git://github.com/ONSdigital/rasrm-acceptance-tests.git","ssh_url":"git@github.com:ONSdigital/rasrm-acceptance-tests.git","clone_url":"https://github.com/ONSdigital/rasrm-acceptance-tests.git","svn_url":"https://github.com/ONSdigital/rasrm-acceptance-tests","homepage":null,"size":418,"stargazers_count":2,"watchers_count":2,"language":"PLpgSQL","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":8,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":8,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/pulls/94"},"html":{"href":"https://github.com/ONSdigital/rasrm-acceptance-tests/pull/94"},"issue":{"href":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/issues/94"},"comments":{"href":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/issues/94/comments"},"review_comments":{"href":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/pulls/94/comments"},"review_comment":{"href":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/pulls/94/commits"},"statuses":{"href":"https://api.github.com/repos/ONSdigital/rasrm-acceptance-tests/statuses/b233bf656dc2e051732a901ba2f66e6c8e034f54"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"jcox-dev"}}