{"action":"created","comment":{"url":"https://api.github.com/repos/mendersoftware/inventory/pulls/comments/81150320","pull_request_review_id":2151108,"id":81150320,"diff_hunk":"@@ -634,6 +645,14 @@ func TestMongoUpsertAttributes(t *testing.T) {\n \t\t\tt.Errorf(\"attributes mismatch, have: %v\\nwant: %v\", dev.Attributes, tc.outAttrs)\n \t\t}\n \n+\t\t//check timestamp validity\n+\t\t//note that mongo stores time with lower precision- custom comparison\n+\t\tassert.Equal(t, createdTs.Unix(), dev.CreatedTs.Unix())","path":"datastore_mongo_test.go","position":82,"original_position":82,"commit_id":"6de7b451cdfd0279f7409b021f4a5f8d77d321c6","original_commit_id":"6de7b451cdfd0279f7409b021f4a5f8d77d321c6","user":{"login":"bboozzoo","id":41870,"avatar_url":"https://avatars.githubusercontent.com/u/41870?v=3","gravatar_id":"","url":"https://api.github.com/users/bboozzoo","html_url":"https://github.com/bboozzoo","followers_url":"https://api.github.com/users/bboozzoo/followers","following_url":"https://api.github.com/users/bboozzoo/following{/other_user}","gists_url":"https://api.github.com/users/bboozzoo/gists{/gist_id}","starred_url":"https://api.github.com/users/bboozzoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bboozzoo/subscriptions","organizations_url":"https://api.github.com/users/bboozzoo/orgs","repos_url":"https://api.github.com/users/bboozzoo/repos","events_url":"https://api.github.com/users/bboozzoo/events{/privacy}","received_events_url":"https://api.github.com/users/bboozzoo/received_events","type":"User","site_admin":false},"body":"I used `assert.WithinDuration()` with 1s delta to workaround precision issues. You should be able to replace both asserts with that. Make sure to leave the comment about precision loss.","created_at":"2016-09-29T14:32:24Z","updated_at":"2016-09-29T14:34:33Z","html_url":"https://github.com/mendersoftware/inventory/pull/35#discussion_r81150320","pull_request_url":"https://api.github.com/repos/mendersoftware/inventory/pulls/35","_links":{"self":{"href":"https://api.github.com/repos/mendersoftware/inventory/pulls/comments/81150320"},"html":{"href":"https://github.com/mendersoftware/inventory/pull/35#discussion_r81150320"},"pull_request":{"href":"https://api.github.com/repos/mendersoftware/inventory/pulls/35"}}},"pull_request":{"url":"https://api.github.com/repos/mendersoftware/inventory/pulls/35","id":87322542,"html_url":"https://github.com/mendersoftware/inventory/pull/35","diff_url":"https://github.com/mendersoftware/inventory/pull/35.diff","patch_url":"https://github.com/mendersoftware/inventory/pull/35.patch","issue_url":"https://api.github.com/repos/mendersoftware/inventory/issues/35","number":35,"state":"open","locked":false,"title":"datastore_mongo: set updated_ts on UpsertAttributes","user":{"login":"mchalski","id":18258178,"avatar_url":"https://avatars.githubusercontent.com/u/18258178?v=3","gravatar_id":"","url":"https://api.github.com/users/mchalski","html_url":"https://github.com/mchalski","followers_url":"https://api.github.com/users/mchalski/followers","following_url":"https://api.github.com/users/mchalski/following{/other_user}","gists_url":"https://api.github.com/users/mchalski/gists{/gist_id}","starred_url":"https://api.github.com/users/mchalski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mchalski/subscriptions","organizations_url":"https://api.github.com/users/mchalski/orgs","repos_url":"https://api.github.com/users/mchalski/repos","events_url":"https://api.github.com/users/mchalski/events{/privacy}","received_events_url":"https://api.github.com/users/mchalski/received_events","type":"User","site_admin":false},"body":"also, selectively set created_ts.\r\n\r\nIssues: MEN-649\r\n\r\nSigned-off-by: mchalczynski <marcin.chalczynski@rndity.com>\r\n\r\n@maciejmrowiec @kjaskiewiczz @bboozzoo @marekswiecznik ","created_at":"2016-09-29T14:19:50Z","updated_at":"2016-09-29T14:34:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"75b23b0ca45c478ef90840e0b7bddb4a62034a16","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/mendersoftware/inventory/pulls/35/commits","review_comments_url":"https://api.github.com/repos/mendersoftware/inventory/pulls/35/comments","review_comment_url":"https://api.github.com/repos/mendersoftware/inventory/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mendersoftware/inventory/issues/35/comments","statuses_url":"https://api.github.com/repos/mendersoftware/inventory/statuses/6de7b451cdfd0279f7409b021f4a5f8d77d321c6","head":{"label":"mchalski:fix_updated_ts","ref":"fix_updated_ts","sha":"6de7b451cdfd0279f7409b021f4a5f8d77d321c6","user":{"login":"mchalski","id":18258178,"avatar_url":"https://avatars.githubusercontent.com/u/18258178?v=3","gravatar_id":"","url":"https://api.github.com/users/mchalski","html_url":"https://github.com/mchalski","followers_url":"https://api.github.com/users/mchalski/followers","following_url":"https://api.github.com/users/mchalski/following{/other_user}","gists_url":"https://api.github.com/users/mchalski/gists{/gist_id}","starred_url":"https://api.github.com/users/mchalski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mchalski/subscriptions","organizations_url":"https://api.github.com/users/mchalski/orgs","repos_url":"https://api.github.com/users/mchalski/repos","events_url":"https://api.github.com/users/mchalski/events{/privacy}","received_events_url":"https://api.github.com/users/mchalski/received_events","type":"User","site_admin":false},"repo":{"id":69574365,"name":"inventory","full_name":"mchalski/inventory","owner":{"login":"mchalski","id":18258178,"avatar_url":"https://avatars.githubusercontent.com/u/18258178?v=3","gravatar_id":"","url":"https://api.github.com/users/mchalski","html_url":"https://github.com/mchalski","followers_url":"https://api.github.com/users/mchalski/followers","following_url":"https://api.github.com/users/mchalski/following{/other_user}","gists_url":"https://api.github.com/users/mchalski/gists{/gist_id}","starred_url":"https://api.github.com/users/mchalski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mchalski/subscriptions","organizations_url":"https://api.github.com/users/mchalski/orgs","repos_url":"https://api.github.com/users/mchalski/repos","events_url":"https://api.github.com/users/mchalski/events{/privacy}","received_events_url":"https://api.github.com/users/mchalski/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mchalski/inventory","description":"Microservice for managing inventory data for IIoT devices within Mender ecosystem.","fork":true,"url":"https://api.github.com/repos/mchalski/inventory","forks_url":"https://api.github.com/repos/mchalski/inventory/forks","keys_url":"https://api.github.com/repos/mchalski/inventory/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mchalski/inventory/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mchalski/inventory/teams","hooks_url":"https://api.github.com/repos/mchalski/inventory/hooks","issue_events_url":"https://api.github.com/repos/mchalski/inventory/issues/events{/number}","events_url":"https://api.github.com/repos/mchalski/inventory/events","assignees_url":"https://api.github.com/repos/mchalski/inventory/assignees{/user}","branches_url":"https://api.github.com/repos/mchalski/inventory/branches{/branch}","tags_url":"https://api.github.com/repos/mchalski/inventory/tags","blobs_url":"https://api.github.com/repos/mchalski/inventory/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mchalski/inventory/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mchalski/inventory/git/refs{/sha}","trees_url":"https://api.github.com/repos/mchalski/inventory/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mchalski/inventory/statuses/{sha}","languages_url":"https://api.github.com/repos/mchalski/inventory/languages","stargazers_url":"https://api.github.com/repos/mchalski/inventory/stargazers","contributors_url":"https://api.github.com/repos/mchalski/inventory/contributors","subscribers_url":"https://api.github.com/repos/mchalski/inventory/subscribers","subscription_url":"https://api.github.com/repos/mchalski/inventory/subscription","commits_url":"https://api.github.com/repos/mchalski/inventory/commits{/sha}","git_commits_url":"https://api.github.com/repos/mchalski/inventory/git/commits{/sha}","comments_url":"https://api.github.com/repos/mchalski/inventory/comments{/number}","issue_comment_url":"https://api.github.com/repos/mchalski/inventory/issues/comments{/number}","contents_url":"https://api.github.com/repos/mchalski/inventory/contents/{+path}","compare_url":"https://api.github.com/repos/mchalski/inventory/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mchalski/inventory/merges","archive_url":"https://api.github.com/repos/mchalski/inventory/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mchalski/inventory/downloads","issues_url":"https://api.github.com/repos/mchalski/inventory/issues{/number}","pulls_url":"https://api.github.com/repos/mchalski/inventory/pulls{/number}","milestones_url":"https://api.github.com/repos/mchalski/inventory/milestones{/number}","notifications_url":"https://api.github.com/repos/mchalski/inventory/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mchalski/inventory/labels{/name}","releases_url":"https://api.github.com/repos/mchalski/inventory/releases{/id}","deployments_url":"https://api.github.com/repos/mchalski/inventory/deployments","created_at":"2016-09-29T14:16:09Z","updated_at":"2016-09-29T14:16:10Z","pushed_at":"2016-09-29T14:18:28Z","git_url":"git://github.com/mchalski/inventory.git","ssh_url":"git@github.com:mchalski/inventory.git","clone_url":"https://github.com/mchalski/inventory.git","svn_url":"https://github.com/mchalski/inventory","homepage":null,"size":1080,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mendersoftware:master","ref":"master","sha":"35afa0456e91e76f13b6400c4f5f50b847c77d0f","user":{"login":"mendersoftware","id":15040539,"avatar_url":"https://avatars.githubusercontent.com/u/15040539?v=3","gravatar_id":"","url":"https://api.github.com/users/mendersoftware","html_url":"https://github.com/mendersoftware","followers_url":"https://api.github.com/users/mendersoftware/followers","following_url":"https://api.github.com/users/mendersoftware/following{/other_user}","gists_url":"https://api.github.com/users/mendersoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/mendersoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mendersoftware/subscriptions","organizations_url":"https://api.github.com/users/mendersoftware/orgs","repos_url":"https://api.github.com/users/mendersoftware/repos","events_url":"https://api.github.com/users/mendersoftware/events{/privacy}","received_events_url":"https://api.github.com/users/mendersoftware/received_events","type":"Organization","site_admin":false},"repo":{"id":65368241,"name":"inventory","full_name":"mendersoftware/inventory","owner":{"login":"mendersoftware","id":15040539,"avatar_url":"https://avatars.githubusercontent.com/u/15040539?v=3","gravatar_id":"","url":"https://api.github.com/users/mendersoftware","html_url":"https://github.com/mendersoftware","followers_url":"https://api.github.com/users/mendersoftware/followers","following_url":"https://api.github.com/users/mendersoftware/following{/other_user}","gists_url":"https://api.github.com/users/mendersoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/mendersoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mendersoftware/subscriptions","organizations_url":"https://api.github.com/users/mendersoftware/orgs","repos_url":"https://api.github.com/users/mendersoftware/repos","events_url":"https://api.github.com/users/mendersoftware/events{/privacy}","received_events_url":"https://api.github.com/users/mendersoftware/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mendersoftware/inventory","description":"Microservice for managing inventory data for IIoT devices within Mender ecosystem.","fork":false,"url":"https://api.github.com/repos/mendersoftware/inventory","forks_url":"https://api.github.com/repos/mendersoftware/inventory/forks","keys_url":"https://api.github.com/repos/mendersoftware/inventory/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mendersoftware/inventory/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mendersoftware/inventory/teams","hooks_url":"https://api.github.com/repos/mendersoftware/inventory/hooks","issue_events_url":"https://api.github.com/repos/mendersoftware/inventory/issues/events{/number}","events_url":"https://api.github.com/repos/mendersoftware/inventory/events","assignees_url":"https://api.github.com/repos/mendersoftware/inventory/assignees{/user}","branches_url":"https://api.github.com/repos/mendersoftware/inventory/branches{/branch}","tags_url":"https://api.github.com/repos/mendersoftware/inventory/tags","blobs_url":"https://api.github.com/repos/mendersoftware/inventory/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mendersoftware/inventory/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mendersoftware/inventory/git/refs{/sha}","trees_url":"https://api.github.com/repos/mendersoftware/inventory/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mendersoftware/inventory/statuses/{sha}","languages_url":"https://api.github.com/repos/mendersoftware/inventory/languages","stargazers_url":"https://api.github.com/repos/mendersoftware/inventory/stargazers","contributors_url":"https://api.github.com/repos/mendersoftware/inventory/contributors","subscribers_url":"https://api.github.com/repos/mendersoftware/inventory/subscribers","subscription_url":"https://api.github.com/repos/mendersoftware/inventory/subscription","commits_url":"https://api.github.com/repos/mendersoftware/inventory/commits{/sha}","git_commits_url":"https://api.github.com/repos/mendersoftware/inventory/git/commits{/sha}","comments_url":"https://api.github.com/repos/mendersoftware/inventory/comments{/number}","issue_comment_url":"https://api.github.com/repos/mendersoftware/inventory/issues/comments{/number}","contents_url":"https://api.github.com/repos/mendersoftware/inventory/contents/{+path}","compare_url":"https://api.github.com/repos/mendersoftware/inventory/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mendersoftware/inventory/merges","archive_url":"https://api.github.com/repos/mendersoftware/inventory/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mendersoftware/inventory/downloads","issues_url":"https://api.github.com/repos/mendersoftware/inventory/issues{/number}","pulls_url":"https://api.github.com/repos/mendersoftware/inventory/pulls{/number}","milestones_url":"https://api.github.com/repos/mendersoftware/inventory/milestones{/number}","notifications_url":"https://api.github.com/repos/mendersoftware/inventory/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mendersoftware/inventory/labels{/name}","releases_url":"https://api.github.com/repos/mendersoftware/inventory/releases{/id}","deployments_url":"https://api.github.com/repos/mendersoftware/inventory/deployments","created_at":"2016-08-10T09:14:13Z","updated_at":"2016-09-29T12:37:32Z","pushed_at":"2016-09-29T14:19:50Z","git_url":"git://github.com/mendersoftware/inventory.git","ssh_url":"git@github.com:mendersoftware/inventory.git","clone_url":"https://github.com/mendersoftware/inventory.git","svn_url":"https://github.com/mendersoftware/inventory","homepage":null,"size":1080,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mendersoftware/inventory/pulls/35"},"html":{"href":"https://github.com/mendersoftware/inventory/pull/35"},"issue":{"href":"https://api.github.com/repos/mendersoftware/inventory/issues/35"},"comments":{"href":"https://api.github.com/repos/mendersoftware/inventory/issues/35/comments"},"review_comments":{"href":"https://api.github.com/repos/mendersoftware/inventory/pulls/35/comments"},"review_comment":{"href":"https://api.github.com/repos/mendersoftware/inventory/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mendersoftware/inventory/pulls/35/commits"},"statuses":{"href":"https://api.github.com/repos/mendersoftware/inventory/statuses/6de7b451cdfd0279f7409b021f4a5f8d77d321c6"}}}}
{"actor":{"display_login":"bboozzoo"}}