{"action":"created","comment":{"url":"https://api.github.com/repos/CanalTP/gormungandr/pulls/comments/194782246","pull_request_review_id":128018251,"id":194782246,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NDc4MjI0Ng==","diff_hunk":"@@ -0,0 +1,131 @@\n+package schedules\n+\n+import (\n+\t\"encoding/json\"\n+\t\"flag\"\n+\t\"fmt\"\n+\t\"net\"\n+\t_ \"net/http\"\n+\t\"net/http/httptest\"\n+\t\"os\"\n+\t\"testing\"\n+\t\"time\"\n+\n+\t\"github.com/CanalTP/gonavitia\"\n+\t\"github.com/CanalTP/gormungandr\"\n+\t\"github.com/CanalTP/gormungandr/internal/checker\"\n+\t\"github.com/gin-gonic/gin\"\n+\tlog \"github.com/sirupsen/logrus\"\n+\t\"github.com/stretchr/testify/assert\"\n+\t\"github.com/stretchr/testify/require\"\n+\t\"gopkg.in/ory-am/dockertest.v3\"\n+)\n+\n+var kraken *gormungandr.Kraken\n+\n+func init() {\n+\tgin.SetMode(gin.TestMode)\n+}\n+\n+func TestMain(m *testing.M) {\n+\tflag.Parse() //required to get Short() from testing\n+\tif testing.Short() {\n+\t\tlog.Warn(\"skipping test Docker in short mode.\")\n+\t\tos.Exit(m.Run())\n+\t}\n+\tpool, err := dockertest.NewPool(\"\")\n+\tif err != nil {\n+\t\tlog.Fatalf(\"Could not connect to docker: %s\", err)\n+\t}\n+\toptions := dockertest.RunOptions{\n+\t\tRepository: \"navitia/mock-kraken\",\n+\t\tTag:        \"latest\",\n+\t\tEnv:        []string{\"KRAKEN_GENERAL_log_level=DEBUG\"},\n+\t\tCmd:        []string{\"./departure_board_test\", \"--GENERAL.zmq_socket\", \"tcp://*:30000\"},\n+\t}\n+\tresource, err := pool.RunWithOptions(&options)\n+\tif err != nil {\n+\t\tlog.Fatalf(\"Could not start resource: %s\", err)\n+\t}\n+\tconStr := \"\"\n+\t// exponential backoff-retry, because the application in the container might not be ready to accept connections yet\n+\tpool.MaxWait = 30 * time.Second\n+\tif err = pool.Retry(func() error {\n+\t\tvar err2 error\n+\t\tvar conn net.Conn\n+\t\tconStr = fmt.Sprintf(\"localhost:%s\", resource.GetPort(\"30000/tcp\"))\n+\t\tconn, err2 = net.Dial(\"tcp\", conStr)\n+\t\tif err2 != nil {\n+\t\t\treturn err2\n+\t\t}\n+\t\tconn.Close()\n+\t\treturn nil\n+\t}); err != nil {\n+\t\tlog.Fatalf(\"Could not connect to docker: %s\", err)\n+\t}\n+\tkraken = gormungandr.NewKraken(\"default\", fmt.Sprint(\"tcp://\", conStr), 1*time.Second)\n+\n+\t//Run tests\n+\tcode := m.Run()\n+\n+\t// You can't defer this because os.Exit doesn't care for defer\n+\tif err := pool.Purge(resource); err != nil {\n+\t\tlog.Fatalf(\"Could not purge resource: %s\", err)\n+\t}\n+\n+\tos.Exit(code)\n+}\n+\n+func TestRouteSchedules(t *testing.T) {\n+\tif testing.Short() {\n+\t\tt.Skip(\"skipping test Docker in short mode.\")\n+\t}\n+\t//t.Parallel()","path":"internal/schedules/api_integration_test.go","position":83,"original_position":83,"commit_id":"c49946ff53ce1a17aaf6c32bd539a7df08cf7fd3","original_commit_id":"c49946ff53ce1a17aaf6c32bd539a7df08cf7fd3","user":{"login":"kinnou02","id":448185,"node_id":"MDQ6VXNlcjQ0ODE4NQ==","avatar_url":"https://avatars1.githubusercontent.com/u/448185?v=4","gravatar_id":"","url":"https://api.github.com/users/kinnou02","html_url":"https://github.com/kinnou02","followers_url":"https://api.github.com/users/kinnou02/followers","following_url":"https://api.github.com/users/kinnou02/following{/other_user}","gists_url":"https://api.github.com/users/kinnou02/gists{/gist_id}","starred_url":"https://api.github.com/users/kinnou02/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kinnou02/subscriptions","organizations_url":"https://api.github.com/users/kinnou02/orgs","repos_url":"https://api.github.com/users/kinnou02/repos","events_url":"https://api.github.com/users/kinnou02/events{/privacy}","received_events_url":"https://api.github.com/users/kinnou02/received_events","type":"User","site_admin":false},"body":"I disabled it to fix something and I forgot to put it back.\r\nFor now it won't change anything as there is only one test and I do not known to what extend we can paralelize call to the mocked kraken, not sure they are multithread and I do not want to have the same problems that jormun tests that sometime timeouts because the CI is slow like a snail!\r\n\r\nI will add more tests later on, so I will have te opportunity to try it.","created_at":"2018-06-12T15:23:11Z","updated_at":"2018-06-12T15:23:12Z","html_url":"https://github.com/CanalTP/gormungandr/pull/74#discussion_r194782246","pull_request_url":"https://api.github.com/repos/CanalTP/gormungandr/pulls/74","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/CanalTP/gormungandr/pulls/comments/194782246"},"html":{"href":"https://github.com/CanalTP/gormungandr/pull/74#discussion_r194782246"},"pull_request":{"href":"https://api.github.com/repos/CanalTP/gormungandr/pulls/74"}},"in_reply_to_id":194741088},"pull_request":{"url":"https://api.github.com/repos/CanalTP/gormungandr/pulls/74","id":193957781,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkzOTU3Nzgx","html_url":"https://github.com/CanalTP/gormungandr/pull/74","diff_url":"https://github.com/CanalTP/gormungandr/pull/74.diff","patch_url":"https://github.com/CanalTP/gormungandr/pull/74.patch","issue_url":"https://api.github.com/repos/CanalTP/gormungandr/issues/74","number":74,"state":"open","locked":false,"title":"Integration test","user":{"login":"kinnou02","id":448185,"node_id":"MDQ6VXNlcjQ0ODE4NQ==","avatar_url":"https://avatars1.githubusercontent.com/u/448185?v=4","gravatar_id":"","url":"https://api.github.com/users/kinnou02","html_url":"https://github.com/kinnou02","followers_url":"https://api.github.com/users/kinnou02/followers","following_url":"https://api.github.com/users/kinnou02/following{/other_user}","gists_url":"https://api.github.com/users/kinnou02/gists{/gist_id}","starred_url":"https://api.github.com/users/kinnou02/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kinnou02/subscriptions","organizations_url":"https://api.github.com/users/kinnou02/orgs","repos_url":"https://api.github.com/users/kinnou02/repos","events_url":"https://api.github.com/users/kinnou02/events{/privacy}","received_events_url":"https://api.github.com/users/kinnou02/received_events","type":"User","site_admin":false},"body":"Use the docker image that contains the mock kraken to port the tests from jormungandr.","created_at":"2018-06-11T11:55:11Z","updated_at":"2018-06-12T15:23:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"154f6796d37d8e7432e605eb72b77959724d968d","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/CanalTP/gormungandr/pulls/74/commits","review_comments_url":"https://api.github.com/repos/CanalTP/gormungandr/pulls/74/comments","review_comment_url":"https://api.github.com/repos/CanalTP/gormungandr/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CanalTP/gormungandr/issues/74/comments","statuses_url":"https://api.github.com/repos/CanalTP/gormungandr/statuses/c49946ff53ce1a17aaf6c32bd539a7df08cf7fd3","head":{"label":"kinnou02:integration-test","ref":"integration-test","sha":"c49946ff53ce1a17aaf6c32bd539a7df08cf7fd3","user":{"login":"kinnou02","id":448185,"node_id":"MDQ6VXNlcjQ0ODE4NQ==","avatar_url":"https://avatars1.githubusercontent.com/u/448185?v=4","gravatar_id":"","url":"https://api.github.com/users/kinnou02","html_url":"https://github.com/kinnou02","followers_url":"https://api.github.com/users/kinnou02/followers","following_url":"https://api.github.com/users/kinnou02/following{/other_user}","gists_url":"https://api.github.com/users/kinnou02/gists{/gist_id}","starred_url":"https://api.github.com/users/kinnou02/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kinnou02/subscriptions","organizations_url":"https://api.github.com/users/kinnou02/orgs","repos_url":"https://api.github.com/users/kinnou02/repos","events_url":"https://api.github.com/users/kinnou02/events{/privacy}","received_events_url":"https://api.github.com/users/kinnou02/received_events","type":"User","site_admin":false},"repo":{"id":128363965,"node_id":"MDEwOlJlcG9zaXRvcnkxMjgzNjM5NjU=","name":"gormungandr","full_name":"kinnou02/gormungandr","owner":{"login":"kinnou02","id":448185,"node_id":"MDQ6VXNlcjQ0ODE4NQ==","avatar_url":"https://avatars1.githubusercontent.com/u/448185?v=4","gravatar_id":"","url":"https://api.github.com/users/kinnou02","html_url":"https://github.com/kinnou02","followers_url":"https://api.github.com/users/kinnou02/followers","following_url":"https://api.github.com/users/kinnou02/following{/other_user}","gists_url":"https://api.github.com/users/kinnou02/gists{/gist_id}","starred_url":"https://api.github.com/users/kinnou02/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kinnou02/subscriptions","organizations_url":"https://api.github.com/users/kinnou02/orgs","repos_url":"https://api.github.com/users/kinnou02/repos","events_url":"https://api.github.com/users/kinnou02/events{/privacy}","received_events_url":"https://api.github.com/users/kinnou02/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kinnou02/gormungandr","description":null,"fork":true,"url":"https://api.github.com/repos/kinnou02/gormungandr","forks_url":"https://api.github.com/repos/kinnou02/gormungandr/forks","keys_url":"https://api.github.com/repos/kinnou02/gormungandr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kinnou02/gormungandr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kinnou02/gormungandr/teams","hooks_url":"https://api.github.com/repos/kinnou02/gormungandr/hooks","issue_events_url":"https://api.github.com/repos/kinnou02/gormungandr/issues/events{/number}","events_url":"https://api.github.com/repos/kinnou02/gormungandr/events","assignees_url":"https://api.github.com/repos/kinnou02/gormungandr/assignees{/user}","branches_url":"https://api.github.com/repos/kinnou02/gormungandr/branches{/branch}","tags_url":"https://api.github.com/repos/kinnou02/gormungandr/tags","blobs_url":"https://api.github.com/repos/kinnou02/gormungandr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kinnou02/gormungandr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kinnou02/gormungandr/git/refs{/sha}","trees_url":"https://api.github.com/repos/kinnou02/gormungandr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kinnou02/gormungandr/statuses/{sha}","languages_url":"https://api.github.com/repos/kinnou02/gormungandr/languages","stargazers_url":"https://api.github.com/repos/kinnou02/gormungandr/stargazers","contributors_url":"https://api.github.com/repos/kinnou02/gormungandr/contributors","subscribers_url":"https://api.github.com/repos/kinnou02/gormungandr/subscribers","subscription_url":"https://api.github.com/repos/kinnou02/gormungandr/subscription","commits_url":"https://api.github.com/repos/kinnou02/gormungandr/commits{/sha}","git_commits_url":"https://api.github.com/repos/kinnou02/gormungandr/git/commits{/sha}","comments_url":"https://api.github.com/repos/kinnou02/gormungandr/comments{/number}","issue_comment_url":"https://api.github.com/repos/kinnou02/gormungandr/issues/comments{/number}","contents_url":"https://api.github.com/repos/kinnou02/gormungandr/contents/{+path}","compare_url":"https://api.github.com/repos/kinnou02/gormungandr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kinnou02/gormungandr/merges","archive_url":"https://api.github.com/repos/kinnou02/gormungandr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kinnou02/gormungandr/downloads","issues_url":"https://api.github.com/repos/kinnou02/gormungandr/issues{/number}","pulls_url":"https://api.github.com/repos/kinnou02/gormungandr/pulls{/number}","milestones_url":"https://api.github.com/repos/kinnou02/gormungandr/milestones{/number}","notifications_url":"https://api.github.com/repos/kinnou02/gormungandr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kinnou02/gormungandr/labels{/name}","releases_url":"https://api.github.com/repos/kinnou02/gormungandr/releases{/id}","deployments_url":"https://api.github.com/repos/kinnou02/gormungandr/deployments","created_at":"2018-04-06T07:31:20Z","updated_at":"2018-04-06T07:31:22Z","pushed_at":"2018-06-12T13:29:08Z","git_url":"git://github.com/kinnou02/gormungandr.git","ssh_url":"git@github.com:kinnou02/gormungandr.git","clone_url":"https://github.com/kinnou02/gormungandr.git","svn_url":"https://github.com/kinnou02/gormungandr","homepage":null,"size":132,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"CanalTP:master","ref":"master","sha":"3f2a9e5d4794a8703b29673117191772d37349bc","user":{"login":"CanalTP","id":2743985,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI3NDM5ODU=","avatar_url":"https://avatars2.githubusercontent.com/u/2743985?v=4","gravatar_id":"","url":"https://api.github.com/users/CanalTP","html_url":"https://github.com/CanalTP","followers_url":"https://api.github.com/users/CanalTP/followers","following_url":"https://api.github.com/users/CanalTP/following{/other_user}","gists_url":"https://api.github.com/users/CanalTP/gists{/gist_id}","starred_url":"https://api.github.com/users/CanalTP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CanalTP/subscriptions","organizations_url":"https://api.github.com/users/CanalTP/orgs","repos_url":"https://api.github.com/users/CanalTP/repos","events_url":"https://api.github.com/users/CanalTP/events{/privacy}","received_events_url":"https://api.github.com/users/CanalTP/received_events","type":"Organization","site_admin":false},"repo":{"id":128354043,"node_id":"MDEwOlJlcG9zaXRvcnkxMjgzNTQwNDM=","name":"gormungandr","full_name":"CanalTP/gormungandr","owner":{"login":"CanalTP","id":2743985,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI3NDM5ODU=","avatar_url":"https://avatars2.githubusercontent.com/u/2743985?v=4","gravatar_id":"","url":"https://api.github.com/users/CanalTP","html_url":"https://github.com/CanalTP","followers_url":"https://api.github.com/users/CanalTP/followers","following_url":"https://api.github.com/users/CanalTP/following{/other_user}","gists_url":"https://api.github.com/users/CanalTP/gists{/gist_id}","starred_url":"https://api.github.com/users/CanalTP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CanalTP/subscriptions","organizations_url":"https://api.github.com/users/CanalTP/orgs","repos_url":"https://api.github.com/users/CanalTP/repos","events_url":"https://api.github.com/users/CanalTP/events{/privacy}","received_events_url":"https://api.github.com/users/CanalTP/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CanalTP/gormungandr","description":null,"fork":false,"url":"https://api.github.com/repos/CanalTP/gormungandr","forks_url":"https://api.github.com/repos/CanalTP/gormungandr/forks","keys_url":"https://api.github.com/repos/CanalTP/gormungandr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CanalTP/gormungandr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CanalTP/gormungandr/teams","hooks_url":"https://api.github.com/repos/CanalTP/gormungandr/hooks","issue_events_url":"https://api.github.com/repos/CanalTP/gormungandr/issues/events{/number}","events_url":"https://api.github.com/repos/CanalTP/gormungandr/events","assignees_url":"https://api.github.com/repos/CanalTP/gormungandr/assignees{/user}","branches_url":"https://api.github.com/repos/CanalTP/gormungandr/branches{/branch}","tags_url":"https://api.github.com/repos/CanalTP/gormungandr/tags","blobs_url":"https://api.github.com/repos/CanalTP/gormungandr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CanalTP/gormungandr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CanalTP/gormungandr/git/refs{/sha}","trees_url":"https://api.github.com/repos/CanalTP/gormungandr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CanalTP/gormungandr/statuses/{sha}","languages_url":"https://api.github.com/repos/CanalTP/gormungandr/languages","stargazers_url":"https://api.github.com/repos/CanalTP/gormungandr/stargazers","contributors_url":"https://api.github.com/repos/CanalTP/gormungandr/contributors","subscribers_url":"https://api.github.com/repos/CanalTP/gormungandr/subscribers","subscription_url":"https://api.github.com/repos/CanalTP/gormungandr/subscription","commits_url":"https://api.github.com/repos/CanalTP/gormungandr/commits{/sha}","git_commits_url":"https://api.github.com/repos/CanalTP/gormungandr/git/commits{/sha}","comments_url":"https://api.github.com/repos/CanalTP/gormungandr/comments{/number}","issue_comment_url":"https://api.github.com/repos/CanalTP/gormungandr/issues/comments{/number}","contents_url":"https://api.github.com/repos/CanalTP/gormungandr/contents/{+path}","compare_url":"https://api.github.com/repos/CanalTP/gormungandr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CanalTP/gormungandr/merges","archive_url":"https://api.github.com/repos/CanalTP/gormungandr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CanalTP/gormungandr/downloads","issues_url":"https://api.github.com/repos/CanalTP/gormungandr/issues{/number}","pulls_url":"https://api.github.com/repos/CanalTP/gormungandr/pulls{/number}","milestones_url":"https://api.github.com/repos/CanalTP/gormungandr/milestones{/number}","notifications_url":"https://api.github.com/repos/CanalTP/gormungandr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CanalTP/gormungandr/labels{/name}","releases_url":"https://api.github.com/repos/CanalTP/gormungandr/releases{/id}","deployments_url":"https://api.github.com/repos/CanalTP/gormungandr/deployments","created_at":"2018-04-06T06:10:13Z","updated_at":"2018-06-11T13:24:21Z","pushed_at":"2018-06-12T13:29:34Z","git_url":"git://github.com/CanalTP/gormungandr.git","ssh_url":"git@github.com:CanalTP/gormungandr.git","clone_url":"https://github.com/CanalTP/gormungandr.git","svn_url":"https://github.com/CanalTP/gormungandr","homepage":null,"size":113,"stargazers_count":1,"watchers_count":1,"language":"Go","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":18,"license":null,"forks":2,"open_issues":18,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CanalTP/gormungandr/pulls/74"},"html":{"href":"https://github.com/CanalTP/gormungandr/pull/74"},"issue":{"href":"https://api.github.com/repos/CanalTP/gormungandr/issues/74"},"comments":{"href":"https://api.github.com/repos/CanalTP/gormungandr/issues/74/comments"},"review_comments":{"href":"https://api.github.com/repos/CanalTP/gormungandr/pulls/74/comments"},"review_comment":{"href":"https://api.github.com/repos/CanalTP/gormungandr/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CanalTP/gormungandr/pulls/74/commits"},"statuses":{"href":"https://api.github.com/repos/CanalTP/gormungandr/statuses/c49946ff53ce1a17aaf6c32bd539a7df08cf7fd3"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"kinnou02"}}