{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/45326901","id":45326901,"diff_hunk":"@@ -208,82 +189,33 @@ func (t *Tester) setObject(ctx api.Context, obj runtime.Object) error {\n \tif err != nil {\n \t\treturn err\n \t}\n-\tkey = etcdtest.AddPrefix(key)\n-\n-\tcodec, err := getCodec(obj)\n-\tif err != nil {\n-\t\treturn err\n-\t}\n-\t_, err = t.fakeClient.Set(key, runtime.EncodeOrDie(codec, obj), 0)\n-\treturn err\n+\treturn t.storage.Storage.Set(ctx, key, obj, nil, 0)\n }\n \n func (t *Tester) setObjectsForList(objects []runtime.Object) []runtime.Object {\n-\tresult := make([]runtime.Object, len(objects))\n-\tkey := etcdtest.AddPrefix(t.storage.KeyRootFunc(t.tester.TestContext()))\n-\n-\tif len(objects) > 0 {\n-\t\tnodes := make([]*etcd.Node, len(objects))\n-\t\tfor i, obj := range objects {\n-\t\t\tcodec, _ := getCodec(obj)\n-\t\t\tencoded := runtime.EncodeOrDie(codec, obj)\n-\t\t\tdecoded, _ := codec.Decode([]byte(encoded))\n-\t\t\tnodes[i] = &etcd.Node{Value: encoded}\n-\t\t\tresult[i] = decoded\n-\t\t}\n-\t\tt.fakeClient.Data[key] = tools.EtcdResponseWithError{\n-\t\t\tR: &etcd.Response{\n-\t\t\t\tNode: &etcd.Node{\n-\t\t\t\t\tNodes: nodes,\n-\t\t\t\t},\n-\t\t\t},\n-\t\t\tE: nil,\n-\t\t}\n-\t} else {\n-\t\tt.fakeClient.Data[key] = tools.EtcdResponseWithError{\n-\t\t\tR: &etcd.Response{},\n-\t\t\tE: t.fakeClient.NewError(tools.EtcdErrorCodeNotFound),\n-\t\t}\n+\tkey := t.storage.KeyRootFunc(t.tester.TestContext())\n+\tif err := storagetesting.CreateObjList(key, t.storage.Storage, objects); err != nil {\n+\t\treturn nil","path":"pkg/registry/registrytest/etcd.go","position":161,"original_position":161,"commit_id":"9b1de1719791d7f1856ea6243c3a46ea6b6ca874","original_commit_id":"9b1de1719791d7f1856ea6243c3a46ea6b6ca874","user":{"login":"wojtek-t","id":10743879,"avatar_url":"https://avatars.githubusercontent.com/u/10743879?v=3","gravatar_id":"","url":"https://api.github.com/users/wojtek-t","html_url":"https://github.com/wojtek-t","followers_url":"https://api.github.com/users/wojtek-t/followers","following_url":"https://api.github.com/users/wojtek-t/following{/other_user}","gists_url":"https://api.github.com/users/wojtek-t/gists{/gist_id}","starred_url":"https://api.github.com/users/wojtek-t/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wojtek-t/subscriptions","organizations_url":"https://api.github.com/users/wojtek-t/orgs","repos_url":"https://api.github.com/users/wojtek-t/repos","events_url":"https://api.github.com/users/wojtek-t/events{/privacy}","received_events_url":"https://api.github.com/users/wojtek-t/received_events","type":"User","site_admin":false},"body":"oops - no; I was wrong\r\nWe should handle the error somehow - something like:\r\n\r\nt.tester.Errorf(...\")","created_at":"2015-11-19T11:02:53Z","updated_at":"2015-11-19T11:02:53Z","html_url":"https://github.com/kubernetes/kubernetes/pull/17469#discussion_r45326901","pull_request_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/17469","_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/45326901"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/17469#discussion_r45326901"},"pull_request":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/17469"}}},"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/17469","id":51168482,"html_url":"https://github.com/kubernetes/kubernetes/pull/17469","diff_url":"https://github.com/kubernetes/kubernetes/pull/17469.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/17469.patch","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/17469","number":17469,"state":"open","locked":false,"title":"Removal of fakeClient from *registry","user":{"login":"timothysc","id":169553,"avatar_url":"https://avatars.githubusercontent.com/u/169553?v=3","gravatar_id":"","url":"https://api.github.com/users/timothysc","html_url":"https://github.com/timothysc","followers_url":"https://api.github.com/users/timothysc/followers","following_url":"https://api.github.com/users/timothysc/following{/other_user}","gists_url":"https://api.github.com/users/timothysc/gists{/gist_id}","starred_url":"https://api.github.com/users/timothysc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timothysc/subscriptions","organizations_url":"https://api.github.com/users/timothysc/orgs","repos_url":"https://api.github.com/users/timothysc/repos","events_url":"https://api.github.com/users/timothysc/events{/privacy}","received_events_url":"https://api.github.com/users/timothysc/received_events","type":"User","site_admin":false},"body":"per #15349\r\n\r\nThe following PR removes the fakeClient and shifts all references to use storage layers in the registry tests.  \r\n\r\n@wojtek-t should be the reviewer on this one. ","created_at":"2015-11-19T01:30:21Z","updated_at":"2015-11-19T11:02:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"06ecf0d30a4f9512bd6381c9710f49599bcf6679","assignee":{"login":"wojtek-t","id":10743879,"avatar_url":"https://avatars.githubusercontent.com/u/10743879?v=3","gravatar_id":"","url":"https://api.github.com/users/wojtek-t","html_url":"https://github.com/wojtek-t","followers_url":"https://api.github.com/users/wojtek-t/followers","following_url":"https://api.github.com/users/wojtek-t/following{/other_user}","gists_url":"https://api.github.com/users/wojtek-t/gists{/gist_id}","starred_url":"https://api.github.com/users/wojtek-t/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wojtek-t/subscriptions","organizations_url":"https://api.github.com/users/wojtek-t/orgs","repos_url":"https://api.github.com/users/wojtek-t/repos","events_url":"https://api.github.com/users/wojtek-t/events{/privacy}","received_events_url":"https://api.github.com/users/wojtek-t/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/17469/commits","review_comments_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/17469/comments","review_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/17469/comments","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/9b1de1719791d7f1856ea6243c3a46ea6b6ca874","head":{"label":"timothysc:etcd-remove-fakeclient-part4","ref":"etcd-remove-fakeclient-part4","sha":"9b1de1719791d7f1856ea6243c3a46ea6b6ca874","user":{"login":"timothysc","id":169553,"avatar_url":"https://avatars.githubusercontent.com/u/169553?v=3","gravatar_id":"","url":"https://api.github.com/users/timothysc","html_url":"https://github.com/timothysc","followers_url":"https://api.github.com/users/timothysc/followers","following_url":"https://api.github.com/users/timothysc/following{/other_user}","gists_url":"https://api.github.com/users/timothysc/gists{/gist_id}","starred_url":"https://api.github.com/users/timothysc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timothysc/subscriptions","organizations_url":"https://api.github.com/users/timothysc/orgs","repos_url":"https://api.github.com/users/timothysc/repos","events_url":"https://api.github.com/users/timothysc/events{/privacy}","received_events_url":"https://api.github.com/users/timothysc/received_events","type":"User","site_admin":false},"repo":{"id":28345483,"name":"kubernetes","full_name":"timothysc/kubernetes","owner":{"login":"timothysc","id":169553,"avatar_url":"https://avatars.githubusercontent.com/u/169553?v=3","gravatar_id":"","url":"https://api.github.com/users/timothysc","html_url":"https://github.com/timothysc","followers_url":"https://api.github.com/users/timothysc/followers","following_url":"https://api.github.com/users/timothysc/following{/other_user}","gists_url":"https://api.github.com/users/timothysc/gists{/gist_id}","starred_url":"https://api.github.com/users/timothysc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timothysc/subscriptions","organizations_url":"https://api.github.com/users/timothysc/orgs","repos_url":"https://api.github.com/users/timothysc/repos","events_url":"https://api.github.com/users/timothysc/events{/privacy}","received_events_url":"https://api.github.com/users/timothysc/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/timothysc/kubernetes","description":"Container Cluster Manager","fork":true,"url":"https://api.github.com/repos/timothysc/kubernetes","forks_url":"https://api.github.com/repos/timothysc/kubernetes/forks","keys_url":"https://api.github.com/repos/timothysc/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/timothysc/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/timothysc/kubernetes/teams","hooks_url":"https://api.github.com/repos/timothysc/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/timothysc/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/timothysc/kubernetes/events","assignees_url":"https://api.github.com/repos/timothysc/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/timothysc/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/timothysc/kubernetes/tags","blobs_url":"https://api.github.com/repos/timothysc/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/timothysc/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/timothysc/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/timothysc/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/timothysc/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/timothysc/kubernetes/languages","stargazers_url":"https://api.github.com/repos/timothysc/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/timothysc/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/timothysc/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/timothysc/kubernetes/subscription","commits_url":"https://api.github.com/repos/timothysc/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/timothysc/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/timothysc/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/timothysc/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/timothysc/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/timothysc/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/timothysc/kubernetes/merges","archive_url":"https://api.github.com/repos/timothysc/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/timothysc/kubernetes/downloads","issues_url":"https://api.github.com/repos/timothysc/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/timothysc/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/timothysc/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/timothysc/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/timothysc/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/timothysc/kubernetes/releases{/id}","created_at":"2014-12-22T15:52:58Z","updated_at":"2015-03-06T19:21:46Z","pushed_at":"2015-11-19T01:26:32Z","git_url":"git://github.com/timothysc/kubernetes.git","ssh_url":"git@github.com:timothysc/kubernetes.git","clone_url":"https://github.com/timothysc/kubernetes.git","svn_url":"https://github.com/timothysc/kubernetes","homepage":null,"size":133501,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"kubernetes:master","ref":"master","sha":"742243bb4adc9dc83411354566667259bcd7d7ee","user":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars.githubusercontent.com/u/13629408?v=3","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"repo":{"id":20580498,"name":"kubernetes","full_name":"kubernetes/kubernetes","owner":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars.githubusercontent.com/u/13629408?v=3","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kubernetes/kubernetes","description":"Container Cluster Manager from Google","fork":false,"url":"https://api.github.com/repos/kubernetes/kubernetes","forks_url":"https://api.github.com/repos/kubernetes/kubernetes/forks","keys_url":"https://api.github.com/repos/kubernetes/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kubernetes/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kubernetes/kubernetes/teams","hooks_url":"https://api.github.com/repos/kubernetes/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/kubernetes/kubernetes/events","assignees_url":"https://api.github.com/repos/kubernetes/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/kubernetes/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/kubernetes/kubernetes/tags","blobs_url":"https://api.github.com/repos/kubernetes/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kubernetes/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kubernetes/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/kubernetes/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/kubernetes/kubernetes/languages","stargazers_url":"https://api.github.com/repos/kubernetes/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/kubernetes/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/kubernetes/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/kubernetes/kubernetes/subscription","commits_url":"https://api.github.com/repos/kubernetes/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/kubernetes/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/kubernetes/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/kubernetes/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kubernetes/kubernetes/merges","archive_url":"https://api.github.com/repos/kubernetes/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kubernetes/kubernetes/downloads","issues_url":"https://api.github.com/repos/kubernetes/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/kubernetes/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/kubernetes/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/kubernetes/kubernetes/releases{/id}","created_at":"2014-06-06T22:56:04Z","updated_at":"2015-11-19T10:22:59Z","pushed_at":"2015-11-19T10:55:35Z","git_url":"git://github.com/kubernetes/kubernetes.git","ssh_url":"git@github.com:kubernetes/kubernetes.git","clone_url":"https://github.com/kubernetes/kubernetes.git","svn_url":"https://github.com/kubernetes/kubernetes","homepage":"http://kubernetes.io","size":288273,"stargazers_count":11333,"watchers_count":11333,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2999,"mirror_url":null,"open_issues_count":2370,"forks":2999,"open_issues":2370,"watchers":11333,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/17469"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/17469"},"issue":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/17469"},"comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/17469/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/17469/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/17469/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/kubernetes/statuses/9b1de1719791d7f1856ea6243c3a46ea6b6ca874"}}}}