{"action":"created","comment":{"url":"https://api.github.com/repos/jembi/openhim-core-js/pulls/comments/26368292","id":26368292,"diff_hunk":"@@ -28,3 +40,65 @@ describe \"Auditing Integration Tests\", ->\n \n         # async test :(\n         setTimeout checkAudits, 1000\n+\n+  describe \"TLS Audit Server\", ->\n+\n+    it \"should send TLS audit messages and save (valid)\", (done) ->\n+\n+      options =\n+        cert: fs.readFileSync \"test/resources/trust-tls/cert1.pem\"\n+        key:  fs.readFileSync \"test/resources/trust-tls/key1.pem\"\n+        ca: [ fs.readFileSync \"test/resources/server-tls/cert.pem\" ]\n+\n+      normalSocket = new (net.Socket)\n+      client = new (tls.TLSSocket)(normalSocket)\n+      client.connect 5051, 'localhost', options, ->\n+        messagePrependlength = testAuditMessage.length + ' ' + testAuditMessage\n+        client.write messagePrependlength\n+","path":"test/integration/auditingIntegrationTests.coffee","position":50,"original_position":50,"commit_id":"43ffd36e36537a898b94ce69ca214fe0b7706e26","original_commit_id":"43ffd36e36537a898b94ce69ca214fe0b7706e26","user":{"login":"rcrichton","id":266576,"avatar_url":"https://avatars.githubusercontent.com/u/266576?v=3","gravatar_id":"","url":"https://api.github.com/users/rcrichton","html_url":"https://github.com/rcrichton","followers_url":"https://api.github.com/users/rcrichton/followers","following_url":"https://api.github.com/users/rcrichton/following{/other_user}","gists_url":"https://api.github.com/users/rcrichton/gists{/gist_id}","starred_url":"https://api.github.com/users/rcrichton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rcrichton/subscriptions","organizations_url":"https://api.github.com/users/rcrichton/orgs","repos_url":"https://api.github.com/users/rcrichton/repos","events_url":"https://api.github.com/users/rcrichton/events{/privacy}","received_events_url":"https://api.github.com/users/rcrichton/received_events","type":"User","site_admin":false},"body":"Have you tried a `client.end()` here. It may make all the difference.\r\n\r\nAlso, you aren't waiting for the data to be written to the socket here so maybe that is an issue? Perhaps try end the sockets the listen for the `end` event then only check for audits. You may be looking for audits before they have been saved.","created_at":"2015-03-13T07:14:10Z","updated_at":"2015-03-13T07:14:10Z","html_url":"https://github.com/jembi/openhim-core-js/pull/437#discussion_r26368292","pull_request_url":"https://api.github.com/repos/jembi/openhim-core-js/pulls/437","_links":{"self":{"href":"https://api.github.com/repos/jembi/openhim-core-js/pulls/comments/26368292"},"html":{"href":"https://github.com/jembi/openhim-core-js/pull/437#discussion_r26368292"},"pull_request":{"href":"https://api.github.com/repos/jembi/openhim-core-js/pulls/437"}}},"pull_request":{"url":"https://api.github.com/repos/jembi/openhim-core-js/pulls/437","id":31044697,"html_url":"https://github.com/jembi/openhim-core-js/pull/437","diff_url":"https://github.com/jembi/openhim-core-js/pull/437.diff","patch_url":"https://github.com/jembi/openhim-core-js/pull/437.patch","issue_url":"https://api.github.com/repos/jembi/openhim-core-js/issues/437","number":437,"state":"open","locked":false,"title":"OHM-66: Added ATNA TLS/TCP interface with test - TLS Tests still failing","user":{"login":"BMartinos","id":7311421,"avatar_url":"https://avatars.githubusercontent.com/u/7311421?v=3","gravatar_id":"","url":"https://api.github.com/users/BMartinos","html_url":"https://github.com/BMartinos","followers_url":"https://api.github.com/users/BMartinos/followers","following_url":"https://api.github.com/users/BMartinos/following{/other_user}","gists_url":"https://api.github.com/users/BMartinos/gists{/gist_id}","starred_url":"https://api.github.com/users/BMartinos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BMartinos/subscriptions","organizations_url":"https://api.github.com/users/BMartinos/orgs","repos_url":"https://api.github.com/users/BMartinos/repos","events_url":"https://api.github.com/users/BMartinos/events{/privacy}","received_events_url":"https://api.github.com/users/BMartinos/received_events","type":"User","site_admin":false},"body":"This PR relates to issue: https://github.com/jembi/openhim-core-js/issues/374","created_at":"2015-03-12T15:09:10Z","updated_at":"2015-03-13T07:14:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"905c2f5a59446b1c48aa7ef0b01270e95100d9cd","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jembi/openhim-core-js/pulls/437/commits","review_comments_url":"https://api.github.com/repos/jembi/openhim-core-js/pulls/437/comments","review_comment_url":"https://api.github.com/repos/jembi/openhim-core-js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jembi/openhim-core-js/issues/437/comments","statuses_url":"https://api.github.com/repos/jembi/openhim-core-js/statuses/43ffd36e36537a898b94ce69ca214fe0b7706e26","head":{"label":"jembi:atna-interface-tcp-tls","ref":"atna-interface-tcp-tls","sha":"43ffd36e36537a898b94ce69ca214fe0b7706e26","user":{"login":"jembi","id":1931511,"avatar_url":"https://avatars.githubusercontent.com/u/1931511?v=3","gravatar_id":"","url":"https://api.github.com/users/jembi","html_url":"https://github.com/jembi","followers_url":"https://api.github.com/users/jembi/followers","following_url":"https://api.github.com/users/jembi/following{/other_user}","gists_url":"https://api.github.com/users/jembi/gists{/gist_id}","starred_url":"https://api.github.com/users/jembi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jembi/subscriptions","organizations_url":"https://api.github.com/users/jembi/orgs","repos_url":"https://api.github.com/users/jembi/repos","events_url":"https://api.github.com/users/jembi/events{/privacy}","received_events_url":"https://api.github.com/users/jembi/received_events","type":"Organization","site_admin":false},"repo":{"id":16686826,"name":"openhim-core-js","full_name":"jembi/openhim-core-js","owner":{"login":"jembi","id":1931511,"avatar_url":"https://avatars.githubusercontent.com/u/1931511?v=3","gravatar_id":"","url":"https://api.github.com/users/jembi","html_url":"https://github.com/jembi","followers_url":"https://api.github.com/users/jembi/followers","following_url":"https://api.github.com/users/jembi/following{/other_user}","gists_url":"https://api.github.com/users/jembi/gists{/gist_id}","starred_url":"https://api.github.com/users/jembi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jembi/subscriptions","organizations_url":"https://api.github.com/users/jembi/orgs","repos_url":"https://api.github.com/users/jembi/repos","events_url":"https://api.github.com/users/jembi/events{/privacy}","received_events_url":"https://api.github.com/users/jembi/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jembi/openhim-core-js","description":"The open health information mediator core component","fork":false,"url":"https://api.github.com/repos/jembi/openhim-core-js","forks_url":"https://api.github.com/repos/jembi/openhim-core-js/forks","keys_url":"https://api.github.com/repos/jembi/openhim-core-js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jembi/openhim-core-js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jembi/openhim-core-js/teams","hooks_url":"https://api.github.com/repos/jembi/openhim-core-js/hooks","issue_events_url":"https://api.github.com/repos/jembi/openhim-core-js/issues/events{/number}","events_url":"https://api.github.com/repos/jembi/openhim-core-js/events","assignees_url":"https://api.github.com/repos/jembi/openhim-core-js/assignees{/user}","branches_url":"https://api.github.com/repos/jembi/openhim-core-js/branches{/branch}","tags_url":"https://api.github.com/repos/jembi/openhim-core-js/tags","blobs_url":"https://api.github.com/repos/jembi/openhim-core-js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jembi/openhim-core-js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jembi/openhim-core-js/git/refs{/sha}","trees_url":"https://api.github.com/repos/jembi/openhim-core-js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jembi/openhim-core-js/statuses/{sha}","languages_url":"https://api.github.com/repos/jembi/openhim-core-js/languages","stargazers_url":"https://api.github.com/repos/jembi/openhim-core-js/stargazers","contributors_url":"https://api.github.com/repos/jembi/openhim-core-js/contributors","subscribers_url":"https://api.github.com/repos/jembi/openhim-core-js/subscribers","subscription_url":"https://api.github.com/repos/jembi/openhim-core-js/subscription","commits_url":"https://api.github.com/repos/jembi/openhim-core-js/commits{/sha}","git_commits_url":"https://api.github.com/repos/jembi/openhim-core-js/git/commits{/sha}","comments_url":"https://api.github.com/repos/jembi/openhim-core-js/comments{/number}","issue_comment_url":"https://api.github.com/repos/jembi/openhim-core-js/issues/comments{/number}","contents_url":"https://api.github.com/repos/jembi/openhim-core-js/contents/{+path}","compare_url":"https://api.github.com/repos/jembi/openhim-core-js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jembi/openhim-core-js/merges","archive_url":"https://api.github.com/repos/jembi/openhim-core-js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jembi/openhim-core-js/downloads","issues_url":"https://api.github.com/repos/jembi/openhim-core-js/issues{/number}","pulls_url":"https://api.github.com/repos/jembi/openhim-core-js/pulls{/number}","milestones_url":"https://api.github.com/repos/jembi/openhim-core-js/milestones{/number}","notifications_url":"https://api.github.com/repos/jembi/openhim-core-js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jembi/openhim-core-js/labels{/name}","releases_url":"https://api.github.com/repos/jembi/openhim-core-js/releases{/id}","created_at":"2014-02-10T06:41:52Z","updated_at":"2015-03-10T13:32:50Z","pushed_at":"2015-03-12T15:07:54Z","git_url":"git://github.com/jembi/openhim-core-js.git","ssh_url":"git@github.com:jembi/openhim-core-js.git","clone_url":"https://github.com/jembi/openhim-core-js.git","svn_url":"https://github.com/jembi/openhim-core-js","homepage":"","size":7399,"stargazers_count":3,"watchers_count":3,"language":"CoffeeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":34,"forks":3,"open_issues":34,"watchers":3,"default_branch":"master"}},"base":{"label":"jembi:master","ref":"master","sha":"c39ff759418f02be6706f1eb8db2bc716c9bd8c4","user":{"login":"jembi","id":1931511,"avatar_url":"https://avatars.githubusercontent.com/u/1931511?v=3","gravatar_id":"","url":"https://api.github.com/users/jembi","html_url":"https://github.com/jembi","followers_url":"https://api.github.com/users/jembi/followers","following_url":"https://api.github.com/users/jembi/following{/other_user}","gists_url":"https://api.github.com/users/jembi/gists{/gist_id}","starred_url":"https://api.github.com/users/jembi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jembi/subscriptions","organizations_url":"https://api.github.com/users/jembi/orgs","repos_url":"https://api.github.com/users/jembi/repos","events_url":"https://api.github.com/users/jembi/events{/privacy}","received_events_url":"https://api.github.com/users/jembi/received_events","type":"Organization","site_admin":false},"repo":{"id":16686826,"name":"openhim-core-js","full_name":"jembi/openhim-core-js","owner":{"login":"jembi","id":1931511,"avatar_url":"https://avatars.githubusercontent.com/u/1931511?v=3","gravatar_id":"","url":"https://api.github.com/users/jembi","html_url":"https://github.com/jembi","followers_url":"https://api.github.com/users/jembi/followers","following_url":"https://api.github.com/users/jembi/following{/other_user}","gists_url":"https://api.github.com/users/jembi/gists{/gist_id}","starred_url":"https://api.github.com/users/jembi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jembi/subscriptions","organizations_url":"https://api.github.com/users/jembi/orgs","repos_url":"https://api.github.com/users/jembi/repos","events_url":"https://api.github.com/users/jembi/events{/privacy}","received_events_url":"https://api.github.com/users/jembi/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jembi/openhim-core-js","description":"The open health information mediator core component","fork":false,"url":"https://api.github.com/repos/jembi/openhim-core-js","forks_url":"https://api.github.com/repos/jembi/openhim-core-js/forks","keys_url":"https://api.github.com/repos/jembi/openhim-core-js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jembi/openhim-core-js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jembi/openhim-core-js/teams","hooks_url":"https://api.github.com/repos/jembi/openhim-core-js/hooks","issue_events_url":"https://api.github.com/repos/jembi/openhim-core-js/issues/events{/number}","events_url":"https://api.github.com/repos/jembi/openhim-core-js/events","assignees_url":"https://api.github.com/repos/jembi/openhim-core-js/assignees{/user}","branches_url":"https://api.github.com/repos/jembi/openhim-core-js/branches{/branch}","tags_url":"https://api.github.com/repos/jembi/openhim-core-js/tags","blobs_url":"https://api.github.com/repos/jembi/openhim-core-js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jembi/openhim-core-js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jembi/openhim-core-js/git/refs{/sha}","trees_url":"https://api.github.com/repos/jembi/openhim-core-js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jembi/openhim-core-js/statuses/{sha}","languages_url":"https://api.github.com/repos/jembi/openhim-core-js/languages","stargazers_url":"https://api.github.com/repos/jembi/openhim-core-js/stargazers","contributors_url":"https://api.github.com/repos/jembi/openhim-core-js/contributors","subscribers_url":"https://api.github.com/repos/jembi/openhim-core-js/subscribers","subscription_url":"https://api.github.com/repos/jembi/openhim-core-js/subscription","commits_url":"https://api.github.com/repos/jembi/openhim-core-js/commits{/sha}","git_commits_url":"https://api.github.com/repos/jembi/openhim-core-js/git/commits{/sha}","comments_url":"https://api.github.com/repos/jembi/openhim-core-js/comments{/number}","issue_comment_url":"https://api.github.com/repos/jembi/openhim-core-js/issues/comments{/number}","contents_url":"https://api.github.com/repos/jembi/openhim-core-js/contents/{+path}","compare_url":"https://api.github.com/repos/jembi/openhim-core-js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jembi/openhim-core-js/merges","archive_url":"https://api.github.com/repos/jembi/openhim-core-js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jembi/openhim-core-js/downloads","issues_url":"https://api.github.com/repos/jembi/openhim-core-js/issues{/number}","pulls_url":"https://api.github.com/repos/jembi/openhim-core-js/pulls{/number}","milestones_url":"https://api.github.com/repos/jembi/openhim-core-js/milestones{/number}","notifications_url":"https://api.github.com/repos/jembi/openhim-core-js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jembi/openhim-core-js/labels{/name}","releases_url":"https://api.github.com/repos/jembi/openhim-core-js/releases{/id}","created_at":"2014-02-10T06:41:52Z","updated_at":"2015-03-10T13:32:50Z","pushed_at":"2015-03-12T15:07:54Z","git_url":"git://github.com/jembi/openhim-core-js.git","ssh_url":"git@github.com:jembi/openhim-core-js.git","clone_url":"https://github.com/jembi/openhim-core-js.git","svn_url":"https://github.com/jembi/openhim-core-js","homepage":"","size":7399,"stargazers_count":3,"watchers_count":3,"language":"CoffeeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":34,"forks":3,"open_issues":34,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jembi/openhim-core-js/pulls/437"},"html":{"href":"https://github.com/jembi/openhim-core-js/pull/437"},"issue":{"href":"https://api.github.com/repos/jembi/openhim-core-js/issues/437"},"comments":{"href":"https://api.github.com/repos/jembi/openhim-core-js/issues/437/comments"},"review_comments":{"href":"https://api.github.com/repos/jembi/openhim-core-js/pulls/437/comments"},"review_comment":{"href":"https://api.github.com/repos/jembi/openhim-core-js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jembi/openhim-core-js/pulls/437/commits"},"statuses":{"href":"https://api.github.com/repos/jembi/openhim-core-js/statuses/43ffd36e36537a898b94ce69ca214fe0b7706e26"}}}}