{"action":"created","comment":{"url":"https://api.github.com/repos/openshift/origin/pulls/comments/26969270","id":26969270,"diff_hunk":"@@ -296,67 +287,51 @@ func TestNoImageIDChange(t *testing.T) {\n \tbuildcfg.Triggers[0].ImageChange.LastTriggeredImageID = \"imageID123\"\n \timagerepo := mockImageRepo(\"testImageRepo\", \"registry.com/namespace/imagename\", map[string]string{\"testTag\": \"imageID123\"})\n \tcontroller := mockImageChangeController(buildcfg)\n-\terr := controller.HandleImageRepo(imagerepo)\n-\tbuildCreator := controller.BuildCreator.(*mockBuildCreator)\n+\tbuildConfigInstantiator := controller.BuildConfigInstantiator.(*mockBuildConfigInstantiator)\n \tbuildConfigUpdater := controller.BuildConfigUpdater.(*mockBuildConfigUpdater)\n \n+\terr := controller.HandleImageRepo(imagerepo)\n \tif err != nil {\n \t\tt.Errorf(\"Unexpected error %v from HandleImageRepo\", err)\n \t}\n-\tif buildCreator.build != nil {\n-\t\tt.Error(\"New build created when no change happened!\")\n+\tif len(buildConfigInstantiator.name) != 0 {\n+\t\tt.Error(\"New build generated when no change happened!\")\n \t}\n \tif buildConfigUpdater.buildcfg != nil {\n \t\tt.Error(\"BuildConfig was updated when no change happened!\")\n \t}\n }\n \n-func TestBuildCreateError(t *testing.T) {\n+func TestBuildConfigInstantiatorError(t *testing.T) {\n \t// valid configuration, but build creation fails, in that situation the buildconfig should not be updated\n \tbuildcfg := mockBuildConfig(\"registry.com/namespace/imagename\", \"registry.com/namespace/imagename\", \"testImageRepo\", \"testTag\")\n \timagerepo := mockImageRepo(\"testImageRepo\", \"registry.com/namespace/imagename\", map[string]string{\"testTag\": \"newImageID123\"})\n \tcontroller := mockImageChangeController(buildcfg)\n-\tbuildCreator := controller.BuildCreator.(*mockBuildCreator)\n-\tbuildCreator.err = fmt.Errorf(\"error\")\n-\terr := controller.HandleImageRepo(imagerepo)\n-\tbuildConfigUpdater := controller.BuildConfigUpdater.(*mockBuildConfigUpdater)\n+\tbuildConfigInstantiator := controller.BuildConfigInstantiator.(*mockBuildConfigInstantiator)\n+\tbuildConfigInstantiator.err = fmt.Errorf(\"instantiating error\")\n \n-\tif err == nil {\n+\terr := controller.HandleImageRepo(imagerepo)\n+\tif err == nil || !strings.Contains(err.Error(), \"instantiating error\") {\n \t\tt.Error(\"Expected error from HandleImageRepo\")\n \t}\n-\tif _, ok := err.(ImageChangeControllerFatalError); ok {\n-\t\tt.Error(\"Expected retryable error from HandleImageRepo\")\n-\t}\n-\tif buildCreator.build == nil {\n-\t\tt.Fatal(\"Expected new build when new image was created!\")\n-\t}\n-\tif buildCreator.build.Parameters.Strategy.DockerStrategy.Image != \"registry.com/namespace/imagename:newImageID123\" {\n-\t\tt.Errorf(\"Image substitutions not properly setup for new build.  Expected %s, got %s |\", \"registry.com/namespace/imagename:newImageID123\", buildCreator.build.Parameters.Strategy.DockerStrategy.Image)\n-\t}\n-\tif buildConfigUpdater.buildcfg != nil {\n-\t\tt.Fatal(\"Expected no buildConfig update on BuildCreate error!\")","path":"pkg/build/controller/image_change_controller_test.go","position":268,"original_position":268,"commit_id":"8f3b7b1df2fd931fd589fa17683794691663eef9","original_commit_id":"8f3b7b1df2fd931fd589fa17683794691663eef9","user":{"login":"bparees","id":4974046,"avatar_url":"https://avatars.githubusercontent.com/u/4974046?v=3","gravatar_id":"","url":"https://api.github.com/users/bparees","html_url":"https://github.com/bparees","followers_url":"https://api.github.com/users/bparees/followers","following_url":"https://api.github.com/users/bparees/following{/other_user}","gists_url":"https://api.github.com/users/bparees/gists{/gist_id}","starred_url":"https://api.github.com/users/bparees/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bparees/subscriptions","organizations_url":"https://api.github.com/users/bparees/orgs","repos_url":"https://api.github.com/users/bparees/repos","events_url":"https://api.github.com/users/bparees/events{/privacy}","received_events_url":"https://api.github.com/users/bparees/received_events","type":"User","site_admin":false},"body":"again it seems like you've lost part of this test...  we wannt to confirm that BuildConfig is not being updated when we get an error on build create.\r\n","created_at":"2015-03-23T19:15:24Z","updated_at":"2015-03-23T19:15:24Z","html_url":"https://github.com/openshift/origin/pull/1275#discussion_r26969270","pull_request_url":"https://api.github.com/repos/openshift/origin/pulls/1275","_links":{"self":{"href":"https://api.github.com/repos/openshift/origin/pulls/comments/26969270"},"html":{"href":"https://github.com/openshift/origin/pull/1275#discussion_r26969270"},"pull_request":{"href":"https://api.github.com/repos/openshift/origin/pulls/1275"}}},"pull_request":{"url":"https://api.github.com/repos/openshift/origin/pulls/1275","id":30898967,"html_url":"https://github.com/openshift/origin/pull/1275","diff_url":"https://github.com/openshift/origin/pull/1275.diff","patch_url":"https://github.com/openshift/origin/pull/1275.patch","issue_url":"https://api.github.com/repos/openshift/origin/issues/1275","number":1275,"state":"open","locked":false,"title":"Rework builds","user":{"login":"soltysh","id":576341,"avatar_url":"https://avatars.githubusercontent.com/u/576341?v=3","gravatar_id":"","url":"https://api.github.com/users/soltysh","html_url":"https://github.com/soltysh","followers_url":"https://api.github.com/users/soltysh/followers","following_url":"https://api.github.com/users/soltysh/following{/other_user}","gists_url":"https://api.github.com/users/soltysh/gists{/gist_id}","starred_url":"https://api.github.com/users/soltysh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/soltysh/subscriptions","organizations_url":"https://api.github.com/users/soltysh/orgs","repos_url":"https://api.github.com/users/soltysh/repos","events_url":"https://api.github.com/users/soltysh/events{/privacy}","received_events_url":"https://api.github.com/users/soltysh/received_events","type":"User","site_admin":false},"body":"This PR includes:\r\n* [x] `Build`'s `PodName` removal #408\r\n* [x] Adding number to builds #528, #333 \r\n* [x] Copying labels from `Build` to build `Pod`\r\n","created_at":"2015-03-10T22:25:27Z","updated_at":"2015-03-23T19:15:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8b355bbe57326f1e32a3a480dbd087cb574b7473","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/openshift/origin/pulls/1275/commits","review_comments_url":"https://api.github.com/repos/openshift/origin/pulls/1275/comments","review_comment_url":"https://api.github.com/repos/openshift/origin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openshift/origin/issues/1275/comments","statuses_url":"https://api.github.com/repos/openshift/origin/statuses/8f3b7b1df2fd931fd589fa17683794691663eef9","head":{"label":"soltysh:build_rework","ref":"build_rework","sha":"8f3b7b1df2fd931fd589fa17683794691663eef9","user":{"login":"soltysh","id":576341,"avatar_url":"https://avatars.githubusercontent.com/u/576341?v=3","gravatar_id":"","url":"https://api.github.com/users/soltysh","html_url":"https://github.com/soltysh","followers_url":"https://api.github.com/users/soltysh/followers","following_url":"https://api.github.com/users/soltysh/following{/other_user}","gists_url":"https://api.github.com/users/soltysh/gists{/gist_id}","starred_url":"https://api.github.com/users/soltysh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/soltysh/subscriptions","organizations_url":"https://api.github.com/users/soltysh/orgs","repos_url":"https://api.github.com/users/soltysh/repos","events_url":"https://api.github.com/users/soltysh/events{/privacy}","received_events_url":"https://api.github.com/users/soltysh/received_events","type":"User","site_admin":false},"repo":{"id":22954476,"name":"origin","full_name":"soltysh/origin","owner":{"login":"soltysh","id":576341,"avatar_url":"https://avatars.githubusercontent.com/u/576341?v=3","gravatar_id":"","url":"https://api.github.com/users/soltysh","html_url":"https://github.com/soltysh","followers_url":"https://api.github.com/users/soltysh/followers","following_url":"https://api.github.com/users/soltysh/following{/other_user}","gists_url":"https://api.github.com/users/soltysh/gists{/gist_id}","starred_url":"https://api.github.com/users/soltysh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/soltysh/subscriptions","organizations_url":"https://api.github.com/users/soltysh/orgs","repos_url":"https://api.github.com/users/soltysh/repos","events_url":"https://api.github.com/users/soltysh/events{/privacy}","received_events_url":"https://api.github.com/users/soltysh/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/soltysh/origin","description":"OpenShift 3 - build, deploy, and manage your applications with Docker and Kubernetes","fork":true,"url":"https://api.github.com/repos/soltysh/origin","forks_url":"https://api.github.com/repos/soltysh/origin/forks","keys_url":"https://api.github.com/repos/soltysh/origin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/soltysh/origin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/soltysh/origin/teams","hooks_url":"https://api.github.com/repos/soltysh/origin/hooks","issue_events_url":"https://api.github.com/repos/soltysh/origin/issues/events{/number}","events_url":"https://api.github.com/repos/soltysh/origin/events","assignees_url":"https://api.github.com/repos/soltysh/origin/assignees{/user}","branches_url":"https://api.github.com/repos/soltysh/origin/branches{/branch}","tags_url":"https://api.github.com/repos/soltysh/origin/tags","blobs_url":"https://api.github.com/repos/soltysh/origin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/soltysh/origin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/soltysh/origin/git/refs{/sha}","trees_url":"https://api.github.com/repos/soltysh/origin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/soltysh/origin/statuses/{sha}","languages_url":"https://api.github.com/repos/soltysh/origin/languages","stargazers_url":"https://api.github.com/repos/soltysh/origin/stargazers","contributors_url":"https://api.github.com/repos/soltysh/origin/contributors","subscribers_url":"https://api.github.com/repos/soltysh/origin/subscribers","subscription_url":"https://api.github.com/repos/soltysh/origin/subscription","commits_url":"https://api.github.com/repos/soltysh/origin/commits{/sha}","git_commits_url":"https://api.github.com/repos/soltysh/origin/git/commits{/sha}","comments_url":"https://api.github.com/repos/soltysh/origin/comments{/number}","issue_comment_url":"https://api.github.com/repos/soltysh/origin/issues/comments{/number}","contents_url":"https://api.github.com/repos/soltysh/origin/contents/{+path}","compare_url":"https://api.github.com/repos/soltysh/origin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/soltysh/origin/merges","archive_url":"https://api.github.com/repos/soltysh/origin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/soltysh/origin/downloads","issues_url":"https://api.github.com/repos/soltysh/origin/issues{/number}","pulls_url":"https://api.github.com/repos/soltysh/origin/pulls{/number}","milestones_url":"https://api.github.com/repos/soltysh/origin/milestones{/number}","notifications_url":"https://api.github.com/repos/soltysh/origin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/soltysh/origin/labels{/name}","releases_url":"https://api.github.com/repos/soltysh/origin/releases{/id}","created_at":"2014-08-14T13:19:11Z","updated_at":"2015-03-23T16:35:09Z","pushed_at":"2015-03-23T16:35:08Z","git_url":"git://github.com/soltysh/origin.git","ssh_url":"git@github.com:soltysh/origin.git","clone_url":"https://github.com/soltysh/origin.git","svn_url":"https://github.com/soltysh/origin","homepage":"https://openshift.github.io","size":55969,"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":"openshift:master","ref":"master","sha":"2869f19c558a2861960fea10c2345539930f1b28","user":{"login":"openshift","id":792337,"avatar_url":"https://avatars.githubusercontent.com/u/792337?v=3","gravatar_id":"","url":"https://api.github.com/users/openshift","html_url":"https://github.com/openshift","followers_url":"https://api.github.com/users/openshift/followers","following_url":"https://api.github.com/users/openshift/following{/other_user}","gists_url":"https://api.github.com/users/openshift/gists{/gist_id}","starred_url":"https://api.github.com/users/openshift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openshift/subscriptions","organizations_url":"https://api.github.com/users/openshift/orgs","repos_url":"https://api.github.com/users/openshift/repos","events_url":"https://api.github.com/users/openshift/events{/privacy}","received_events_url":"https://api.github.com/users/openshift/received_events","type":"Organization","site_admin":false},"repo":{"id":22442668,"name":"origin","full_name":"openshift/origin","owner":{"login":"openshift","id":792337,"avatar_url":"https://avatars.githubusercontent.com/u/792337?v=3","gravatar_id":"","url":"https://api.github.com/users/openshift","html_url":"https://github.com/openshift","followers_url":"https://api.github.com/users/openshift/followers","following_url":"https://api.github.com/users/openshift/following{/other_user}","gists_url":"https://api.github.com/users/openshift/gists{/gist_id}","starred_url":"https://api.github.com/users/openshift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openshift/subscriptions","organizations_url":"https://api.github.com/users/openshift/orgs","repos_url":"https://api.github.com/users/openshift/repos","events_url":"https://api.github.com/users/openshift/events{/privacy}","received_events_url":"https://api.github.com/users/openshift/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openshift/origin","description":"OpenShift 3 - build, deploy, and manage your applications with Docker and Kubernetes","fork":false,"url":"https://api.github.com/repos/openshift/origin","forks_url":"https://api.github.com/repos/openshift/origin/forks","keys_url":"https://api.github.com/repos/openshift/origin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openshift/origin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openshift/origin/teams","hooks_url":"https://api.github.com/repos/openshift/origin/hooks","issue_events_url":"https://api.github.com/repos/openshift/origin/issues/events{/number}","events_url":"https://api.github.com/repos/openshift/origin/events","assignees_url":"https://api.github.com/repos/openshift/origin/assignees{/user}","branches_url":"https://api.github.com/repos/openshift/origin/branches{/branch}","tags_url":"https://api.github.com/repos/openshift/origin/tags","blobs_url":"https://api.github.com/repos/openshift/origin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openshift/origin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openshift/origin/git/refs{/sha}","trees_url":"https://api.github.com/repos/openshift/origin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openshift/origin/statuses/{sha}","languages_url":"https://api.github.com/repos/openshift/origin/languages","stargazers_url":"https://api.github.com/repos/openshift/origin/stargazers","contributors_url":"https://api.github.com/repos/openshift/origin/contributors","subscribers_url":"https://api.github.com/repos/openshift/origin/subscribers","subscription_url":"https://api.github.com/repos/openshift/origin/subscription","commits_url":"https://api.github.com/repos/openshift/origin/commits{/sha}","git_commits_url":"https://api.github.com/repos/openshift/origin/git/commits{/sha}","comments_url":"https://api.github.com/repos/openshift/origin/comments{/number}","issue_comment_url":"https://api.github.com/repos/openshift/origin/issues/comments{/number}","contents_url":"https://api.github.com/repos/openshift/origin/contents/{+path}","compare_url":"https://api.github.com/repos/openshift/origin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openshift/origin/merges","archive_url":"https://api.github.com/repos/openshift/origin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openshift/origin/downloads","issues_url":"https://api.github.com/repos/openshift/origin/issues{/number}","pulls_url":"https://api.github.com/repos/openshift/origin/pulls{/number}","milestones_url":"https://api.github.com/repos/openshift/origin/milestones{/number}","notifications_url":"https://api.github.com/repos/openshift/origin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openshift/origin/labels{/name}","releases_url":"https://api.github.com/repos/openshift/origin/releases{/id}","created_at":"2014-07-30T20:04:05Z","updated_at":"2015-03-23T18:29:47Z","pushed_at":"2015-03-23T18:29:47Z","git_url":"git://github.com/openshift/origin.git","ssh_url":"git@github.com:openshift/origin.git","clone_url":"https://github.com/openshift/origin.git","svn_url":"https://github.com/openshift/origin","homepage":"http://www.openshift.org","size":80582,"stargazers_count":322,"watchers_count":322,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":172,"mirror_url":null,"open_issues_count":129,"forks":172,"open_issues":129,"watchers":322,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openshift/origin/pulls/1275"},"html":{"href":"https://github.com/openshift/origin/pull/1275"},"issue":{"href":"https://api.github.com/repos/openshift/origin/issues/1275"},"comments":{"href":"https://api.github.com/repos/openshift/origin/issues/1275/comments"},"review_comments":{"href":"https://api.github.com/repos/openshift/origin/pulls/1275/comments"},"review_comment":{"href":"https://api.github.com/repos/openshift/origin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openshift/origin/pulls/1275/commits"},"statuses":{"href":"https://api.github.com/repos/openshift/origin/statuses/8f3b7b1df2fd931fd589fa17683794691663eef9"}}}}