{"action":"created","comment":{"url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/pulls/comments/126048155","pull_request_review_id":48497842,"id":126048155,"diff_hunk":"@@ -0,0 +1,49 @@\n+'use strict';\n+\n+require('./test/init.js');\n+\n+var async = require('async');\n+var fs = require('fs');\n+var path = require('path');\n+var _ = require('lodash');\n+\n+var db = global.getDataSource();\n+var schemaName = global.config.schema;\n+var sqlFile = path.resolve(__dirname, 'test', 'tables.dashdb.sql');\n+\n+if (!process.env.CI)\n+  return console.log('Skipping pre-test ...');\n+console.log('> Seeding the database ...');\n+\n+var contents = fs.readFileSync(sqlFile, {encoding: 'utf-8'});\n+var lines = contents.trim().split(';');\n+var createView = 'CREATE OR REPLACE VIEW ' + '\"' + schemaName + '\"' +","path":"pretest.js","position":null,"original_position":20,"commit_id":"4ac503422bd29d2d489d54c2ac6923de32919b95","original_commit_id":"d922d0affe3f3f7550eb1abc1d31eddcfa7f9126","user":{"login":"ssh24","id":15173354,"avatar_url":"https://avatars0.githubusercontent.com/u/15173354?v=3","gravatar_id":"","url":"https://api.github.com/users/ssh24","html_url":"https://github.com/ssh24","followers_url":"https://api.github.com/users/ssh24/followers","following_url":"https://api.github.com/users/ssh24/following{/other_user}","gists_url":"https://api.github.com/users/ssh24/gists{/gist_id}","starred_url":"https://api.github.com/users/ssh24/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ssh24/subscriptions","organizations_url":"https://api.github.com/users/ssh24/orgs","repos_url":"https://api.github.com/users/ssh24/repos","events_url":"https://api.github.com/users/ssh24/events{/privacy}","received_events_url":"https://api.github.com/users/ssh24/received_events","type":"User","site_admin":false},"body":"Ah, This is great!","created_at":"2017-07-07T00:34:28Z","updated_at":"2017-07-07T00:34:28Z","html_url":"https://github.com/strongloop/loopback-connector-dashdb/pull/50#discussion_r126048155","pull_request_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/pulls/50","_links":{"self":{"href":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/pulls/comments/126048155"},"html":{"href":"https://github.com/strongloop/loopback-connector-dashdb/pull/50#discussion_r126048155"},"pull_request":{"href":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/pulls/50"}}},"pull_request":{"url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/pulls/50","id":128832723,"html_url":"https://github.com/strongloop/loopback-connector-dashdb/pull/50","diff_url":"https://github.com/strongloop/loopback-connector-dashdb/pull/50.diff","patch_url":"https://github.com/strongloop/loopback-connector-dashdb/pull/50.patch","issue_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/issues/50","number":50,"state":"open","locked":false,"title":"Fix dashdb ci","user":{"login":"ssh24","id":15173354,"avatar_url":"https://avatars0.githubusercontent.com/u/15173354?v=3","gravatar_id":"","url":"https://api.github.com/users/ssh24","html_url":"https://github.com/ssh24","followers_url":"https://api.github.com/users/ssh24/followers","following_url":"https://api.github.com/users/ssh24/following{/other_user}","gists_url":"https://api.github.com/users/ssh24/gists{/gist_id}","starred_url":"https://api.github.com/users/ssh24/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ssh24/subscriptions","organizations_url":"https://api.github.com/users/ssh24/orgs","repos_url":"https://api.github.com/users/ssh24/repos","events_url":"https://api.github.com/users/ssh24/events{/privacy}","received_events_url":"https://api.github.com/users/ssh24/received_events","type":"User","site_admin":false},"body":"### Description\r\n\r\nWe now have a dockerized dashdb hosted in a softlayer VM. This PR is to replace the old VM which does not pre-seed the database and causes data pollution. This PR:\r\n- Creates a **schema** for every jenkins build, seeds the database on that schema and after the tests are done cleans the schema up and throws it away.\r\n- Fixes some broken tests.\r\n- Cleans up the default sql file to get rid of statements that are not needed.\r\n\r\n**Please note:** The windows build for dashdb is turned off due to this. The softlayer VM is hosted on an IBM network and hence the windows machines (hosted outside of IBM network) cannot connect to it.\r\n\r\nconnect to https://github.com/strongloop-internal/scrum-apex/issues/248","created_at":"2017-07-04T16:12:18Z","updated_at":"2017-07-07T00:34:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ac757fe23a9ed59f7c20902435ec666a4d7d770c","assignee":{"login":"ssh24","id":15173354,"avatar_url":"https://avatars0.githubusercontent.com/u/15173354?v=3","gravatar_id":"","url":"https://api.github.com/users/ssh24","html_url":"https://github.com/ssh24","followers_url":"https://api.github.com/users/ssh24/followers","following_url":"https://api.github.com/users/ssh24/following{/other_user}","gists_url":"https://api.github.com/users/ssh24/gists{/gist_id}","starred_url":"https://api.github.com/users/ssh24/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ssh24/subscriptions","organizations_url":"https://api.github.com/users/ssh24/orgs","repos_url":"https://api.github.com/users/ssh24/repos","events_url":"https://api.github.com/users/ssh24/events{/privacy}","received_events_url":"https://api.github.com/users/ssh24/received_events","type":"User","site_admin":false},"assignees":[{"login":"ssh24","id":15173354,"avatar_url":"https://avatars0.githubusercontent.com/u/15173354?v=3","gravatar_id":"","url":"https://api.github.com/users/ssh24","html_url":"https://github.com/ssh24","followers_url":"https://api.github.com/users/ssh24/followers","following_url":"https://api.github.com/users/ssh24/following{/other_user}","gists_url":"https://api.github.com/users/ssh24/gists{/gist_id}","starred_url":"https://api.github.com/users/ssh24/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ssh24/subscriptions","organizations_url":"https://api.github.com/users/ssh24/orgs","repos_url":"https://api.github.com/users/ssh24/repos","events_url":"https://api.github.com/users/ssh24/events{/privacy}","received_events_url":"https://api.github.com/users/ssh24/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/pulls/50/commits","review_comments_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/pulls/50/comments","review_comment_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/pulls/comments{/number}","comments_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/issues/50/comments","statuses_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/statuses/4ac503422bd29d2d489d54c2ac6923de32919b95","head":{"label":"strongloop:fix/dashdb-ci","ref":"fix/dashdb-ci","sha":"4ac503422bd29d2d489d54c2ac6923de32919b95","user":{"login":"strongloop","id":3020012,"avatar_url":"https://avatars2.githubusercontent.com/u/3020012?v=3","gravatar_id":"","url":"https://api.github.com/users/strongloop","html_url":"https://github.com/strongloop","followers_url":"https://api.github.com/users/strongloop/followers","following_url":"https://api.github.com/users/strongloop/following{/other_user}","gists_url":"https://api.github.com/users/strongloop/gists{/gist_id}","starred_url":"https://api.github.com/users/strongloop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strongloop/subscriptions","organizations_url":"https://api.github.com/users/strongloop/orgs","repos_url":"https://api.github.com/users/strongloop/repos","events_url":"https://api.github.com/users/strongloop/events{/privacy}","received_events_url":"https://api.github.com/users/strongloop/received_events","type":"Organization","site_admin":false},"repo":{"id":59030535,"name":"loopback-connector-dashdb","full_name":"strongloop/loopback-connector-dashdb","owner":{"login":"strongloop","id":3020012,"avatar_url":"https://avatars2.githubusercontent.com/u/3020012?v=3","gravatar_id":"","url":"https://api.github.com/users/strongloop","html_url":"https://github.com/strongloop","followers_url":"https://api.github.com/users/strongloop/followers","following_url":"https://api.github.com/users/strongloop/following{/other_user}","gists_url":"https://api.github.com/users/strongloop/gists{/gist_id}","starred_url":"https://api.github.com/users/strongloop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strongloop/subscriptions","organizations_url":"https://api.github.com/users/strongloop/orgs","repos_url":"https://api.github.com/users/strongloop/repos","events_url":"https://api.github.com/users/strongloop/events{/privacy}","received_events_url":"https://api.github.com/users/strongloop/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/strongloop/loopback-connector-dashdb","description":"Loopback connector for dashDB","fork":false,"url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb","forks_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/forks","keys_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/teams","hooks_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/hooks","issue_events_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/issues/events{/number}","events_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/events","assignees_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/assignees{/user}","branches_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/branches{/branch}","tags_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/tags","blobs_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/git/refs{/sha}","trees_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/statuses/{sha}","languages_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/languages","stargazers_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/stargazers","contributors_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/contributors","subscribers_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/subscribers","subscription_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/subscription","commits_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/commits{/sha}","git_commits_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/git/commits{/sha}","comments_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/comments{/number}","issue_comment_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/issues/comments{/number}","contents_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/contents/{+path}","compare_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/merges","archive_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/downloads","issues_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/issues{/number}","pulls_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/pulls{/number}","milestones_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/milestones{/number}","notifications_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/labels{/name}","releases_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/releases{/id}","deployments_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/deployments","created_at":"2016-05-17T14:37:09Z","updated_at":"2017-07-05T12:45:52Z","pushed_at":"2017-07-07T00:33:30Z","git_url":"git://github.com/strongloop/loopback-connector-dashdb.git","ssh_url":"git@github.com:strongloop/loopback-connector-dashdb.git","clone_url":"https://github.com/strongloop/loopback-connector-dashdb.git","svn_url":"https://github.com/strongloop/loopback-connector-dashdb","homepage":null,"size":97,"stargazers_count":2,"watchers_count":2,"language":"PLSQL","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":4,"forks":1,"open_issues":4,"watchers":2,"default_branch":"master"}},"base":{"label":"strongloop:master","ref":"master","sha":"5f1402d47734ababa652fd02c6215d26b859aa62","user":{"login":"strongloop","id":3020012,"avatar_url":"https://avatars2.githubusercontent.com/u/3020012?v=3","gravatar_id":"","url":"https://api.github.com/users/strongloop","html_url":"https://github.com/strongloop","followers_url":"https://api.github.com/users/strongloop/followers","following_url":"https://api.github.com/users/strongloop/following{/other_user}","gists_url":"https://api.github.com/users/strongloop/gists{/gist_id}","starred_url":"https://api.github.com/users/strongloop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strongloop/subscriptions","organizations_url":"https://api.github.com/users/strongloop/orgs","repos_url":"https://api.github.com/users/strongloop/repos","events_url":"https://api.github.com/users/strongloop/events{/privacy}","received_events_url":"https://api.github.com/users/strongloop/received_events","type":"Organization","site_admin":false},"repo":{"id":59030535,"name":"loopback-connector-dashdb","full_name":"strongloop/loopback-connector-dashdb","owner":{"login":"strongloop","id":3020012,"avatar_url":"https://avatars2.githubusercontent.com/u/3020012?v=3","gravatar_id":"","url":"https://api.github.com/users/strongloop","html_url":"https://github.com/strongloop","followers_url":"https://api.github.com/users/strongloop/followers","following_url":"https://api.github.com/users/strongloop/following{/other_user}","gists_url":"https://api.github.com/users/strongloop/gists{/gist_id}","starred_url":"https://api.github.com/users/strongloop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strongloop/subscriptions","organizations_url":"https://api.github.com/users/strongloop/orgs","repos_url":"https://api.github.com/users/strongloop/repos","events_url":"https://api.github.com/users/strongloop/events{/privacy}","received_events_url":"https://api.github.com/users/strongloop/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/strongloop/loopback-connector-dashdb","description":"Loopback connector for dashDB","fork":false,"url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb","forks_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/forks","keys_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/teams","hooks_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/hooks","issue_events_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/issues/events{/number}","events_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/events","assignees_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/assignees{/user}","branches_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/branches{/branch}","tags_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/tags","blobs_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/git/refs{/sha}","trees_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/statuses/{sha}","languages_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/languages","stargazers_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/stargazers","contributors_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/contributors","subscribers_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/subscribers","subscription_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/subscription","commits_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/commits{/sha}","git_commits_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/git/commits{/sha}","comments_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/comments{/number}","issue_comment_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/issues/comments{/number}","contents_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/contents/{+path}","compare_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/merges","archive_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/downloads","issues_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/issues{/number}","pulls_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/pulls{/number}","milestones_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/milestones{/number}","notifications_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/labels{/name}","releases_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/releases{/id}","deployments_url":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/deployments","created_at":"2016-05-17T14:37:09Z","updated_at":"2017-07-05T12:45:52Z","pushed_at":"2017-07-07T00:33:30Z","git_url":"git://github.com/strongloop/loopback-connector-dashdb.git","ssh_url":"git@github.com:strongloop/loopback-connector-dashdb.git","clone_url":"https://github.com/strongloop/loopback-connector-dashdb.git","svn_url":"https://github.com/strongloop/loopback-connector-dashdb","homepage":null,"size":97,"stargazers_count":2,"watchers_count":2,"language":"PLSQL","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":4,"forks":1,"open_issues":4,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/pulls/50"},"html":{"href":"https://github.com/strongloop/loopback-connector-dashdb/pull/50"},"issue":{"href":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/issues/50"},"comments":{"href":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/issues/50/comments"},"review_comments":{"href":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/pulls/50/comments"},"review_comment":{"href":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/pulls/50/commits"},"statuses":{"href":"https://api.github.com/repos/strongloop/loopback-connector-dashdb/statuses/4ac503422bd29d2d489d54c2ac6923de32919b95"}}}}
{"actor":{"display_login":"ssh24"}}