{"action":"created","comment":{"url":"https://api.github.com/repos/beameio/beame-sdk/pulls/comments/245283053","pull_request_review_id":189348321,"id":245283053,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0NTI4MzA1Mw==","diff_hunk":"@@ -0,0 +1,99 @@\n+\"use strict\";\n+\n+const assert = require('assert');\n+const simple = require('simple-mock');\n+const commonUtils = require('../../src/utils/CommonUtils');\n+const store = new (require(\"../../src/services/BeameStoreV2\"))();\n+\n+const local_fqdn = process.env.BEAME_TESTS_LOCAL_FQDN;\n+if (!local_fqdn) {\n+\tconsole.error(`local fqdn is required`);\n+\tprocess.exit(1)\n+}\n+\n+const cred = store.getCredential(local_fqdn);\n+if (!cred) {\n+\tthrow new Error(`Credential for ${local_fqdn} not found`);\n+}\n+\n+function mockRetryFn() {\n+\treturn simple.mock(commonUtils, \"retry\").callFn(async function (func, retries = 5) {\n+\t\tlet error = \"\";\n+\t\tfor (let i = 1; i <= retries; ++i) { // retry\n+\t\t\ttry {\n+\t\t\t\treturn await func();\n+\t\t\t} catch (e) {\n+\t\t\t\terror = e;\n+\t\t\t\tconsole.log(`Call failed with error '${error}'. Retry [${i}/${retries}]`);\n+\t\t\t}\n+\t\t}\n+\t\tthrow error;\n+\t});\n+}\n+\n+describe('Test ocsp check', function () {\n+\tthis.timeout(10000);\n+\n+\tbeforeEach(() => process.env.BEAME_THROW_OCSP = \"\");\n+\tafterEach(() => simple.restore());\n+\n+\tconst runs = [\n+\t\t{desc: '[Without Proxy] ', external_ocsp_fqdn: \"\", function_name: \"checkOcspStatusWithoutExternalOcsp\" },\n+\t\t{desc: '[With Proxy] ', external_ocsp_fqdn: \"iep9bs1p7cj3cmit.tl5h1ipgobrdqsj6.v1.p.beameio.net\", function_name: \"checkOcspStatusWithExternalOcsp\"}\n+\t];\n+\truns.forEach(function (run) {\n+\n+\t\tit(run.desc + 'without forceCheck', async () => {\n+\t\t\tprocess.env.EXTERNAL_OCSP_FQDN = run.external_ocsp_fqdn;","path":"tests/unit_tests/test_ocsp.js","position":47,"original_position":47,"commit_id":"10317bdd5c22a857c0d5981e29c6c996febcd5a0","original_commit_id":"10317bdd5c22a857c0d5981e29c6c996febcd5a0","user":{"login":"organom","id":3985504,"node_id":"MDQ6VXNlcjM5ODU1MDQ=","avatar_url":"https://avatars3.githubusercontent.com/u/3985504?v=4","gravatar_id":"","url":"https://api.github.com/users/organom","html_url":"https://github.com/organom","followers_url":"https://api.github.com/users/organom/followers","following_url":"https://api.github.com/users/organom/following{/other_user}","gists_url":"https://api.github.com/users/organom/gists{/gist_id}","starred_url":"https://api.github.com/users/organom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/organom/subscriptions","organizations_url":"https://api.github.com/users/organom/orgs","repos_url":"https://api.github.com/users/organom/repos","events_url":"https://api.github.com/users/organom/events{/privacy}","received_events_url":"https://api.github.com/users/organom/received_events","type":"User","site_admin":false},"body":"unfortunately not. I tried that by having the beforeeach inside the run, but it was not changing the value inside it per run. I could invest more time trying to understand why and if we can go around that behaviour. Is it worth it?","created_at":"2019-01-04T12:15:43Z","updated_at":"2019-01-04T12:15:44Z","html_url":"https://github.com/beameio/beame-sdk/pull/32#discussion_r245283053","pull_request_url":"https://api.github.com/repos/beameio/beame-sdk/pulls/32","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/beameio/beame-sdk/pulls/comments/245283053"},"html":{"href":"https://github.com/beameio/beame-sdk/pull/32#discussion_r245283053"},"pull_request":{"href":"https://api.github.com/repos/beameio/beame-sdk/pulls/32"}},"in_reply_to_id":245221814},"pull_request":{"url":"https://api.github.com/repos/beameio/beame-sdk/pulls/32","id":241798767,"node_id":"MDExOlB1bGxSZXF1ZXN0MjQxNzk4NzY3","html_url":"https://github.com/beameio/beame-sdk/pull/32","diff_url":"https://github.com/beameio/beame-sdk/pull/32.diff","patch_url":"https://github.com/beameio/beame-sdk/pull/32.patch","issue_url":"https://api.github.com/repos/beameio/beame-sdk/issues/32","number":32,"state":"open","locked":false,"title":"Feature/ocsp retry","user":{"login":"organom","id":3985504,"node_id":"MDQ6VXNlcjM5ODU1MDQ=","avatar_url":"https://avatars3.githubusercontent.com/u/3985504?v=4","gravatar_id":"","url":"https://api.github.com/users/organom","html_url":"https://github.com/organom","followers_url":"https://api.github.com/users/organom/followers","following_url":"https://api.github.com/users/organom/following{/other_user}","gists_url":"https://api.github.com/users/organom/gists{/gist_id}","starred_url":"https://api.github.com/users/organom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/organom/subscriptions","organizations_url":"https://api.github.com/users/organom/orgs","repos_url":"https://api.github.com/users/organom/repos","events_url":"https://api.github.com/users/organom/events{/privacy}","received_events_url":"https://api.github.com/users/organom/received_events","type":"User","site_admin":false},"body":"Add retry to the  ocsp calls - BG-87","created_at":"2019-01-02T17:06:53Z","updated_at":"2019-01-04T12:15:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"079dd7750b51d04667e145765acf5ed02b5a242f","assignee":null,"assignees":[],"requested_reviewers":[{"login":"ilyash","id":937064,"node_id":"MDQ6VXNlcjkzNzA2NA==","avatar_url":"https://avatars0.githubusercontent.com/u/937064?v=4","gravatar_id":"","url":"https://api.github.com/users/ilyash","html_url":"https://github.com/ilyash","followers_url":"https://api.github.com/users/ilyash/followers","following_url":"https://api.github.com/users/ilyash/following{/other_user}","gists_url":"https://api.github.com/users/ilyash/gists{/gist_id}","starred_url":"https://api.github.com/users/ilyash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ilyash/subscriptions","organizations_url":"https://api.github.com/users/ilyash/orgs","repos_url":"https://api.github.com/users/ilyash/repos","events_url":"https://api.github.com/users/ilyash/events{/privacy}","received_events_url":"https://api.github.com/users/ilyash/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/beameio/beame-sdk/pulls/32/commits","review_comments_url":"https://api.github.com/repos/beameio/beame-sdk/pulls/32/comments","review_comment_url":"https://api.github.com/repos/beameio/beame-sdk/pulls/comments{/number}","comments_url":"https://api.github.com/repos/beameio/beame-sdk/issues/32/comments","statuses_url":"https://api.github.com/repos/beameio/beame-sdk/statuses/10317bdd5c22a857c0d5981e29c6c996febcd5a0","head":{"label":"beameio:feature/ocsp-retry","ref":"feature/ocsp-retry","sha":"10317bdd5c22a857c0d5981e29c6c996febcd5a0","user":{"login":"beameio","id":13220017,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMjIwMDE3","avatar_url":"https://avatars0.githubusercontent.com/u/13220017?v=4","gravatar_id":"","url":"https://api.github.com/users/beameio","html_url":"https://github.com/beameio","followers_url":"https://api.github.com/users/beameio/followers","following_url":"https://api.github.com/users/beameio/following{/other_user}","gists_url":"https://api.github.com/users/beameio/gists{/gist_id}","starred_url":"https://api.github.com/users/beameio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beameio/subscriptions","organizations_url":"https://api.github.com/users/beameio/orgs","repos_url":"https://api.github.com/users/beameio/repos","events_url":"https://api.github.com/users/beameio/events{/privacy}","received_events_url":"https://api.github.com/users/beameio/received_events","type":"Organization","site_admin":false},"repo":{"id":61272517,"node_id":"MDEwOlJlcG9zaXRvcnk2MTI3MjUxNw==","name":"beame-sdk","full_name":"beameio/beame-sdk","private":false,"owner":{"login":"beameio","id":13220017,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMjIwMDE3","avatar_url":"https://avatars0.githubusercontent.com/u/13220017?v=4","gravatar_id":"","url":"https://api.github.com/users/beameio","html_url":"https://github.com/beameio","followers_url":"https://api.github.com/users/beameio/followers","following_url":"https://api.github.com/users/beameio/following{/other_user}","gists_url":"https://api.github.com/users/beameio/gists{/gist_id}","starred_url":"https://api.github.com/users/beameio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beameio/subscriptions","organizations_url":"https://api.github.com/users/beameio/orgs","repos_url":"https://api.github.com/users/beameio/repos","events_url":"https://api.github.com/users/beameio/events{/privacy}","received_events_url":"https://api.github.com/users/beameio/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/beameio/beame-sdk","description":"HTTPS Server without a public/static IP. TLS Tunnels with decentralized credentials. ","fork":false,"url":"https://api.github.com/repos/beameio/beame-sdk","forks_url":"https://api.github.com/repos/beameio/beame-sdk/forks","keys_url":"https://api.github.com/repos/beameio/beame-sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/beameio/beame-sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/beameio/beame-sdk/teams","hooks_url":"https://api.github.com/repos/beameio/beame-sdk/hooks","issue_events_url":"https://api.github.com/repos/beameio/beame-sdk/issues/events{/number}","events_url":"https://api.github.com/repos/beameio/beame-sdk/events","assignees_url":"https://api.github.com/repos/beameio/beame-sdk/assignees{/user}","branches_url":"https://api.github.com/repos/beameio/beame-sdk/branches{/branch}","tags_url":"https://api.github.com/repos/beameio/beame-sdk/tags","blobs_url":"https://api.github.com/repos/beameio/beame-sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/beameio/beame-sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/beameio/beame-sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/beameio/beame-sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/beameio/beame-sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/beameio/beame-sdk/languages","stargazers_url":"https://api.github.com/repos/beameio/beame-sdk/stargazers","contributors_url":"https://api.github.com/repos/beameio/beame-sdk/contributors","subscribers_url":"https://api.github.com/repos/beameio/beame-sdk/subscribers","subscription_url":"https://api.github.com/repos/beameio/beame-sdk/subscription","commits_url":"https://api.github.com/repos/beameio/beame-sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/beameio/beame-sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/beameio/beame-sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/beameio/beame-sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/beameio/beame-sdk/contents/{+path}","compare_url":"https://api.github.com/repos/beameio/beame-sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/beameio/beame-sdk/merges","archive_url":"https://api.github.com/repos/beameio/beame-sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/beameio/beame-sdk/downloads","issues_url":"https://api.github.com/repos/beameio/beame-sdk/issues{/number}","pulls_url":"https://api.github.com/repos/beameio/beame-sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/beameio/beame-sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/beameio/beame-sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/beameio/beame-sdk/labels{/name}","releases_url":"https://api.github.com/repos/beameio/beame-sdk/releases{/id}","deployments_url":"https://api.github.com/repos/beameio/beame-sdk/deployments","created_at":"2016-06-16T07:43:29Z","updated_at":"2018-12-26T18:22:15Z","pushed_at":"2019-01-03T22:02:57Z","git_url":"git://github.com/beameio/beame-sdk.git","ssh_url":"git@github.com:beameio/beame-sdk.git","clone_url":"https://github.com/beameio/beame-sdk.git","svn_url":"https://github.com/beameio/beame-sdk","homepage":"https://www.beame.io","size":6505,"stargazers_count":89,"watchers_count":89,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":15,"mirror_url":null,"archived":false,"open_issues_count":12,"license":null,"forks":15,"open_issues":12,"watchers":89,"default_branch":"master"}},"base":{"label":"beameio:master","ref":"master","sha":"d800021144d7bcf0c252da945e2fc6055ed6cd92","user":{"login":"beameio","id":13220017,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMjIwMDE3","avatar_url":"https://avatars0.githubusercontent.com/u/13220017?v=4","gravatar_id":"","url":"https://api.github.com/users/beameio","html_url":"https://github.com/beameio","followers_url":"https://api.github.com/users/beameio/followers","following_url":"https://api.github.com/users/beameio/following{/other_user}","gists_url":"https://api.github.com/users/beameio/gists{/gist_id}","starred_url":"https://api.github.com/users/beameio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beameio/subscriptions","organizations_url":"https://api.github.com/users/beameio/orgs","repos_url":"https://api.github.com/users/beameio/repos","events_url":"https://api.github.com/users/beameio/events{/privacy}","received_events_url":"https://api.github.com/users/beameio/received_events","type":"Organization","site_admin":false},"repo":{"id":61272517,"node_id":"MDEwOlJlcG9zaXRvcnk2MTI3MjUxNw==","name":"beame-sdk","full_name":"beameio/beame-sdk","private":false,"owner":{"login":"beameio","id":13220017,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMjIwMDE3","avatar_url":"https://avatars0.githubusercontent.com/u/13220017?v=4","gravatar_id":"","url":"https://api.github.com/users/beameio","html_url":"https://github.com/beameio","followers_url":"https://api.github.com/users/beameio/followers","following_url":"https://api.github.com/users/beameio/following{/other_user}","gists_url":"https://api.github.com/users/beameio/gists{/gist_id}","starred_url":"https://api.github.com/users/beameio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beameio/subscriptions","organizations_url":"https://api.github.com/users/beameio/orgs","repos_url":"https://api.github.com/users/beameio/repos","events_url":"https://api.github.com/users/beameio/events{/privacy}","received_events_url":"https://api.github.com/users/beameio/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/beameio/beame-sdk","description":"HTTPS Server without a public/static IP. TLS Tunnels with decentralized credentials. ","fork":false,"url":"https://api.github.com/repos/beameio/beame-sdk","forks_url":"https://api.github.com/repos/beameio/beame-sdk/forks","keys_url":"https://api.github.com/repos/beameio/beame-sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/beameio/beame-sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/beameio/beame-sdk/teams","hooks_url":"https://api.github.com/repos/beameio/beame-sdk/hooks","issue_events_url":"https://api.github.com/repos/beameio/beame-sdk/issues/events{/number}","events_url":"https://api.github.com/repos/beameio/beame-sdk/events","assignees_url":"https://api.github.com/repos/beameio/beame-sdk/assignees{/user}","branches_url":"https://api.github.com/repos/beameio/beame-sdk/branches{/branch}","tags_url":"https://api.github.com/repos/beameio/beame-sdk/tags","blobs_url":"https://api.github.com/repos/beameio/beame-sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/beameio/beame-sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/beameio/beame-sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/beameio/beame-sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/beameio/beame-sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/beameio/beame-sdk/languages","stargazers_url":"https://api.github.com/repos/beameio/beame-sdk/stargazers","contributors_url":"https://api.github.com/repos/beameio/beame-sdk/contributors","subscribers_url":"https://api.github.com/repos/beameio/beame-sdk/subscribers","subscription_url":"https://api.github.com/repos/beameio/beame-sdk/subscription","commits_url":"https://api.github.com/repos/beameio/beame-sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/beameio/beame-sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/beameio/beame-sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/beameio/beame-sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/beameio/beame-sdk/contents/{+path}","compare_url":"https://api.github.com/repos/beameio/beame-sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/beameio/beame-sdk/merges","archive_url":"https://api.github.com/repos/beameio/beame-sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/beameio/beame-sdk/downloads","issues_url":"https://api.github.com/repos/beameio/beame-sdk/issues{/number}","pulls_url":"https://api.github.com/repos/beameio/beame-sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/beameio/beame-sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/beameio/beame-sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/beameio/beame-sdk/labels{/name}","releases_url":"https://api.github.com/repos/beameio/beame-sdk/releases{/id}","deployments_url":"https://api.github.com/repos/beameio/beame-sdk/deployments","created_at":"2016-06-16T07:43:29Z","updated_at":"2018-12-26T18:22:15Z","pushed_at":"2019-01-03T22:02:57Z","git_url":"git://github.com/beameio/beame-sdk.git","ssh_url":"git@github.com:beameio/beame-sdk.git","clone_url":"https://github.com/beameio/beame-sdk.git","svn_url":"https://github.com/beameio/beame-sdk","homepage":"https://www.beame.io","size":6505,"stargazers_count":89,"watchers_count":89,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":15,"mirror_url":null,"archived":false,"open_issues_count":12,"license":null,"forks":15,"open_issues":12,"watchers":89,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/beameio/beame-sdk/pulls/32"},"html":{"href":"https://github.com/beameio/beame-sdk/pull/32"},"issue":{"href":"https://api.github.com/repos/beameio/beame-sdk/issues/32"},"comments":{"href":"https://api.github.com/repos/beameio/beame-sdk/issues/32/comments"},"review_comments":{"href":"https://api.github.com/repos/beameio/beame-sdk/pulls/32/comments"},"review_comment":{"href":"https://api.github.com/repos/beameio/beame-sdk/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/beameio/beame-sdk/pulls/32/commits"},"statuses":{"href":"https://api.github.com/repos/beameio/beame-sdk/statuses/10317bdd5c22a857c0d5981e29c6c996febcd5a0"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"organom"}}