{"action":"created","comment":{"url":"https://api.github.com/repos/giantswarm/operatorkit/pulls/comments/180379256","pull_request_review_id":110786975,"id":180379256,"diff_hunk":"@@ -1,21 +1,113 @@\n-// +build k8srequired\n-\n package reconciliation\n \n import (\n+\t\"reflect\"\n \t\"testing\"\n+\t\"time\"\n+\n+\tcorev1 \"k8s.io/api/core/v1\"\n+\tmetav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\"\n \n \t\"github.com/giantswarm/operatorkit/framework/integration/client\"\n )\n \n // Test_Finalizer_Integration_Reconciliation is a integration test for\n // the proper replay and reconciliation of delete events with finalizers.\n func Test_Finalizer_Integration_Reconciliation(t *testing.T) {\n+\tconfigMapName := \"test-cm\"\n+\ttestFinalizer := \"operatorkit.giantswarm.io/test-operator\"\n \ttestNamespace := \"finalizer-integration-reconciliation-test\"\n+\ttestOtherFinalizer := \"operatorkit.giantswarm.io/other-operator\"\n+\toperatorName := \"test-operator\"\n \n \tclient.MustSetup(testNamespace)\n \tdefer client.MustTeardown(testNamespace)\n \n-\t// TODO: Implement the actual test here.\n+\toperatorkitFramework, err := client.NewFramework(operatorName, testNamespace)\n+\tif err != nil {\n+\t\tt.Fatal(\"expected\", nil, \"got\", err)\n+\t}\n+\n+\t// We create a configmap, but add a finalizer of another operator. This will\n+\t// cause the configmap to continue existing after the framework removes it own\n+\t// finalizer.\n+\tcm := &corev1.ConfigMap{\n+\t\tTypeMeta: metav1.TypeMeta{\n+\t\t\tAPIVersion: \"v1\",\n+\t\t\tKind:       \"ConfigMap\",\n+\t\t},\n+\t\tObjectMeta: metav1.ObjectMeta{\n+\t\t\tName:      configMapName,\n+\t\t\tNamespace: testNamespace,\n+\t\t\tFinalizers: []string{\n+\t\t\t\ttestOtherFinalizer,\n+\t\t\t},\n+\t\t},\n+\t\tData: map[string]string{},\n+\t}\n+\t_, err = client.CreateConfigMap(cm)\n+\tif err != nil {\n+\t\tt.Fatal(\"expected\", nil, \"got\", err)\n+\t}\n+\n+\t// We start the framework.\n+\tgo operatorkitFramework.Boot()\n+\n+\t// We wait the absolute maximum amount of time here:\n+\t// 20 second ResyncPeriod + 2 second RateWait + 3 second for safety.\n+\ttime.Sleep(25 * time.Second)","path":"framework/integration/test/reconciliation/reconciliation_test.go","position":null,"original_position":61,"commit_id":"613b0b107244e7691b124999834b7da0cce9a7e2","original_commit_id":"ace45346254225e870214f7d363779a2acf7d78c","user":{"login":"MarcelMue","id":9303709,"avatar_url":"https://avatars1.githubusercontent.com/u/9303709?v=4","gravatar_id":"","url":"https://api.github.com/users/MarcelMue","html_url":"https://github.com/MarcelMue","followers_url":"https://api.github.com/users/MarcelMue/followers","following_url":"https://api.github.com/users/MarcelMue/following{/other_user}","gists_url":"https://api.github.com/users/MarcelMue/gists{/gist_id}","starred_url":"https://api.github.com/users/MarcelMue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarcelMue/subscriptions","organizations_url":"https://api.github.com/users/MarcelMue/orgs","repos_url":"https://api.github.com/users/MarcelMue/repos","events_url":"https://api.github.com/users/MarcelMue/events{/privacy}","received_events_url":"https://api.github.com/users/MarcelMue/received_events","type":"User","site_admin":false},"body":"I went through this a bit, unsure if an informer wrapper will benefit this test much. It will add even more complexity and we can verify the desired results with the resource now.\r\n\r\nWDYT @kopiczko ","created_at":"2018-04-10T11:02:37Z","updated_at":"2018-04-10T11:02:37Z","html_url":"https://github.com/giantswarm/operatorkit/pull/182#discussion_r180379256","pull_request_url":"https://api.github.com/repos/giantswarm/operatorkit/pulls/182","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/giantswarm/operatorkit/pulls/comments/180379256"},"html":{"href":"https://github.com/giantswarm/operatorkit/pull/182#discussion_r180379256"},"pull_request":{"href":"https://api.github.com/repos/giantswarm/operatorkit/pulls/182"}},"in_reply_to_id":178005546},"pull_request":{"url":"https://api.github.com/repos/giantswarm/operatorkit/pulls/182","id":178277293,"html_url":"https://github.com/giantswarm/operatorkit/pull/182","diff_url":"https://github.com/giantswarm/operatorkit/pull/182.diff","patch_url":"https://github.com/giantswarm/operatorkit/pull/182.patch","issue_url":"https://api.github.com/repos/giantswarm/operatorkit/issues/182","number":182,"state":"open","locked":false,"title":"Implement reconciliation test for finalizers","user":{"login":"MarcelMue","id":9303709,"avatar_url":"https://avatars1.githubusercontent.com/u/9303709?v=4","gravatar_id":"","url":"https://api.github.com/users/MarcelMue","html_url":"https://github.com/MarcelMue","followers_url":"https://api.github.com/users/MarcelMue/followers","following_url":"https://api.github.com/users/MarcelMue/following{/other_user}","gists_url":"https://api.github.com/users/MarcelMue/gists{/gist_id}","starred_url":"https://api.github.com/users/MarcelMue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarcelMue/subscriptions","organizations_url":"https://api.github.com/users/MarcelMue/orgs","repos_url":"https://api.github.com/users/MarcelMue/repos","events_url":"https://api.github.com/users/MarcelMue/events{/privacy}","received_events_url":"https://api.github.com/users/MarcelMue/received_events","type":"User","site_admin":false},"body":"The goal of this is to test if finalizers are reconciled and used correctly through the whole framework. \r\n\r\ntowards https://github.com/giantswarm/giantswarm/issues/1595","created_at":"2018-03-29T09:42:49Z","updated_at":"2018-04-10T11:02:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"21484e5362a47a8223d56b0e2eb5d77d23f21de9","assignee":{"login":"MarcelMue","id":9303709,"avatar_url":"https://avatars1.githubusercontent.com/u/9303709?v=4","gravatar_id":"","url":"https://api.github.com/users/MarcelMue","html_url":"https://github.com/MarcelMue","followers_url":"https://api.github.com/users/MarcelMue/followers","following_url":"https://api.github.com/users/MarcelMue/following{/other_user}","gists_url":"https://api.github.com/users/MarcelMue/gists{/gist_id}","starred_url":"https://api.github.com/users/MarcelMue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarcelMue/subscriptions","organizations_url":"https://api.github.com/users/MarcelMue/orgs","repos_url":"https://api.github.com/users/MarcelMue/repos","events_url":"https://api.github.com/users/MarcelMue/events{/privacy}","received_events_url":"https://api.github.com/users/MarcelMue/received_events","type":"User","site_admin":false},"assignees":[{"login":"MarcelMue","id":9303709,"avatar_url":"https://avatars1.githubusercontent.com/u/9303709?v=4","gravatar_id":"","url":"https://api.github.com/users/MarcelMue","html_url":"https://github.com/MarcelMue","followers_url":"https://api.github.com/users/MarcelMue/followers","following_url":"https://api.github.com/users/MarcelMue/following{/other_user}","gists_url":"https://api.github.com/users/MarcelMue/gists{/gist_id}","starred_url":"https://api.github.com/users/MarcelMue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarcelMue/subscriptions","organizations_url":"https://api.github.com/users/MarcelMue/orgs","repos_url":"https://api.github.com/users/MarcelMue/repos","events_url":"https://api.github.com/users/MarcelMue/events{/privacy}","received_events_url":"https://api.github.com/users/MarcelMue/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/giantswarm/operatorkit/pulls/182/commits","review_comments_url":"https://api.github.com/repos/giantswarm/operatorkit/pulls/182/comments","review_comment_url":"https://api.github.com/repos/giantswarm/operatorkit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/giantswarm/operatorkit/issues/182/comments","statuses_url":"https://api.github.com/repos/giantswarm/operatorkit/statuses/613b0b107244e7691b124999834b7da0cce9a7e2","head":{"label":"giantswarm:implement-reconciliation-test","ref":"implement-reconciliation-test","sha":"613b0b107244e7691b124999834b7da0cce9a7e2","user":{"login":"giantswarm","id":7556340,"avatar_url":"https://avatars3.githubusercontent.com/u/7556340?v=4","gravatar_id":"","url":"https://api.github.com/users/giantswarm","html_url":"https://github.com/giantswarm","followers_url":"https://api.github.com/users/giantswarm/followers","following_url":"https://api.github.com/users/giantswarm/following{/other_user}","gists_url":"https://api.github.com/users/giantswarm/gists{/gist_id}","starred_url":"https://api.github.com/users/giantswarm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giantswarm/subscriptions","organizations_url":"https://api.github.com/users/giantswarm/orgs","repos_url":"https://api.github.com/users/giantswarm/repos","events_url":"https://api.github.com/users/giantswarm/events{/privacy}","received_events_url":"https://api.github.com/users/giantswarm/received_events","type":"Organization","site_admin":false},"repo":{"id":87818870,"name":"operatorkit","full_name":"giantswarm/operatorkit","owner":{"login":"giantswarm","id":7556340,"avatar_url":"https://avatars3.githubusercontent.com/u/7556340?v=4","gravatar_id":"","url":"https://api.github.com/users/giantswarm","html_url":"https://github.com/giantswarm","followers_url":"https://api.github.com/users/giantswarm/followers","following_url":"https://api.github.com/users/giantswarm/following{/other_user}","gists_url":"https://api.github.com/users/giantswarm/gists{/gist_id}","starred_url":"https://api.github.com/users/giantswarm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giantswarm/subscriptions","organizations_url":"https://api.github.com/users/giantswarm/orgs","repos_url":"https://api.github.com/users/giantswarm/repos","events_url":"https://api.github.com/users/giantswarm/events{/privacy}","received_events_url":"https://api.github.com/users/giantswarm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/giantswarm/operatorkit","description":"The operatorkit package implements an opinionated framework for developing Kubernetes operators.","fork":false,"url":"https://api.github.com/repos/giantswarm/operatorkit","forks_url":"https://api.github.com/repos/giantswarm/operatorkit/forks","keys_url":"https://api.github.com/repos/giantswarm/operatorkit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/giantswarm/operatorkit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/giantswarm/operatorkit/teams","hooks_url":"https://api.github.com/repos/giantswarm/operatorkit/hooks","issue_events_url":"https://api.github.com/repos/giantswarm/operatorkit/issues/events{/number}","events_url":"https://api.github.com/repos/giantswarm/operatorkit/events","assignees_url":"https://api.github.com/repos/giantswarm/operatorkit/assignees{/user}","branches_url":"https://api.github.com/repos/giantswarm/operatorkit/branches{/branch}","tags_url":"https://api.github.com/repos/giantswarm/operatorkit/tags","blobs_url":"https://api.github.com/repos/giantswarm/operatorkit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/giantswarm/operatorkit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/giantswarm/operatorkit/git/refs{/sha}","trees_url":"https://api.github.com/repos/giantswarm/operatorkit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/giantswarm/operatorkit/statuses/{sha}","languages_url":"https://api.github.com/repos/giantswarm/operatorkit/languages","stargazers_url":"https://api.github.com/repos/giantswarm/operatorkit/stargazers","contributors_url":"https://api.github.com/repos/giantswarm/operatorkit/contributors","subscribers_url":"https://api.github.com/repos/giantswarm/operatorkit/subscribers","subscription_url":"https://api.github.com/repos/giantswarm/operatorkit/subscription","commits_url":"https://api.github.com/repos/giantswarm/operatorkit/commits{/sha}","git_commits_url":"https://api.github.com/repos/giantswarm/operatorkit/git/commits{/sha}","comments_url":"https://api.github.com/repos/giantswarm/operatorkit/comments{/number}","issue_comment_url":"https://api.github.com/repos/giantswarm/operatorkit/issues/comments{/number}","contents_url":"https://api.github.com/repos/giantswarm/operatorkit/contents/{+path}","compare_url":"https://api.github.com/repos/giantswarm/operatorkit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/giantswarm/operatorkit/merges","archive_url":"https://api.github.com/repos/giantswarm/operatorkit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/giantswarm/operatorkit/downloads","issues_url":"https://api.github.com/repos/giantswarm/operatorkit/issues{/number}","pulls_url":"https://api.github.com/repos/giantswarm/operatorkit/pulls{/number}","milestones_url":"https://api.github.com/repos/giantswarm/operatorkit/milestones{/number}","notifications_url":"https://api.github.com/repos/giantswarm/operatorkit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/giantswarm/operatorkit/labels{/name}","releases_url":"https://api.github.com/repos/giantswarm/operatorkit/releases{/id}","deployments_url":"https://api.github.com/repos/giantswarm/operatorkit/deployments","created_at":"2017-04-10T14:12:58Z","updated_at":"2018-04-10T09:11:22Z","pushed_at":"2018-04-10T10:55:13Z","git_url":"git://github.com/giantswarm/operatorkit.git","ssh_url":"git@github.com:giantswarm/operatorkit.git","clone_url":"https://github.com/giantswarm/operatorkit.git","svn_url":"https://github.com/giantswarm/operatorkit","homepage":"https://godoc.org/github.com/giantswarm/operatorkit","size":32885,"stargazers_count":78,"watchers_count":78,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"archived":false,"open_issues_count":7,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":6,"open_issues":7,"watchers":78,"default_branch":"master"}},"base":{"label":"giantswarm:master","ref":"master","sha":"bf53cbcb5f28af069f6af113bb5adb4efe76bb11","user":{"login":"giantswarm","id":7556340,"avatar_url":"https://avatars3.githubusercontent.com/u/7556340?v=4","gravatar_id":"","url":"https://api.github.com/users/giantswarm","html_url":"https://github.com/giantswarm","followers_url":"https://api.github.com/users/giantswarm/followers","following_url":"https://api.github.com/users/giantswarm/following{/other_user}","gists_url":"https://api.github.com/users/giantswarm/gists{/gist_id}","starred_url":"https://api.github.com/users/giantswarm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giantswarm/subscriptions","organizations_url":"https://api.github.com/users/giantswarm/orgs","repos_url":"https://api.github.com/users/giantswarm/repos","events_url":"https://api.github.com/users/giantswarm/events{/privacy}","received_events_url":"https://api.github.com/users/giantswarm/received_events","type":"Organization","site_admin":false},"repo":{"id":87818870,"name":"operatorkit","full_name":"giantswarm/operatorkit","owner":{"login":"giantswarm","id":7556340,"avatar_url":"https://avatars3.githubusercontent.com/u/7556340?v=4","gravatar_id":"","url":"https://api.github.com/users/giantswarm","html_url":"https://github.com/giantswarm","followers_url":"https://api.github.com/users/giantswarm/followers","following_url":"https://api.github.com/users/giantswarm/following{/other_user}","gists_url":"https://api.github.com/users/giantswarm/gists{/gist_id}","starred_url":"https://api.github.com/users/giantswarm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giantswarm/subscriptions","organizations_url":"https://api.github.com/users/giantswarm/orgs","repos_url":"https://api.github.com/users/giantswarm/repos","events_url":"https://api.github.com/users/giantswarm/events{/privacy}","received_events_url":"https://api.github.com/users/giantswarm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/giantswarm/operatorkit","description":"The operatorkit package implements an opinionated framework for developing Kubernetes operators.","fork":false,"url":"https://api.github.com/repos/giantswarm/operatorkit","forks_url":"https://api.github.com/repos/giantswarm/operatorkit/forks","keys_url":"https://api.github.com/repos/giantswarm/operatorkit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/giantswarm/operatorkit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/giantswarm/operatorkit/teams","hooks_url":"https://api.github.com/repos/giantswarm/operatorkit/hooks","issue_events_url":"https://api.github.com/repos/giantswarm/operatorkit/issues/events{/number}","events_url":"https://api.github.com/repos/giantswarm/operatorkit/events","assignees_url":"https://api.github.com/repos/giantswarm/operatorkit/assignees{/user}","branches_url":"https://api.github.com/repos/giantswarm/operatorkit/branches{/branch}","tags_url":"https://api.github.com/repos/giantswarm/operatorkit/tags","blobs_url":"https://api.github.com/repos/giantswarm/operatorkit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/giantswarm/operatorkit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/giantswarm/operatorkit/git/refs{/sha}","trees_url":"https://api.github.com/repos/giantswarm/operatorkit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/giantswarm/operatorkit/statuses/{sha}","languages_url":"https://api.github.com/repos/giantswarm/operatorkit/languages","stargazers_url":"https://api.github.com/repos/giantswarm/operatorkit/stargazers","contributors_url":"https://api.github.com/repos/giantswarm/operatorkit/contributors","subscribers_url":"https://api.github.com/repos/giantswarm/operatorkit/subscribers","subscription_url":"https://api.github.com/repos/giantswarm/operatorkit/subscription","commits_url":"https://api.github.com/repos/giantswarm/operatorkit/commits{/sha}","git_commits_url":"https://api.github.com/repos/giantswarm/operatorkit/git/commits{/sha}","comments_url":"https://api.github.com/repos/giantswarm/operatorkit/comments{/number}","issue_comment_url":"https://api.github.com/repos/giantswarm/operatorkit/issues/comments{/number}","contents_url":"https://api.github.com/repos/giantswarm/operatorkit/contents/{+path}","compare_url":"https://api.github.com/repos/giantswarm/operatorkit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/giantswarm/operatorkit/merges","archive_url":"https://api.github.com/repos/giantswarm/operatorkit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/giantswarm/operatorkit/downloads","issues_url":"https://api.github.com/repos/giantswarm/operatorkit/issues{/number}","pulls_url":"https://api.github.com/repos/giantswarm/operatorkit/pulls{/number}","milestones_url":"https://api.github.com/repos/giantswarm/operatorkit/milestones{/number}","notifications_url":"https://api.github.com/repos/giantswarm/operatorkit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/giantswarm/operatorkit/labels{/name}","releases_url":"https://api.github.com/repos/giantswarm/operatorkit/releases{/id}","deployments_url":"https://api.github.com/repos/giantswarm/operatorkit/deployments","created_at":"2017-04-10T14:12:58Z","updated_at":"2018-04-10T09:11:22Z","pushed_at":"2018-04-10T10:55:13Z","git_url":"git://github.com/giantswarm/operatorkit.git","ssh_url":"git@github.com:giantswarm/operatorkit.git","clone_url":"https://github.com/giantswarm/operatorkit.git","svn_url":"https://github.com/giantswarm/operatorkit","homepage":"https://godoc.org/github.com/giantswarm/operatorkit","size":32885,"stargazers_count":78,"watchers_count":78,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"archived":false,"open_issues_count":7,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":6,"open_issues":7,"watchers":78,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/giantswarm/operatorkit/pulls/182"},"html":{"href":"https://github.com/giantswarm/operatorkit/pull/182"},"issue":{"href":"https://api.github.com/repos/giantswarm/operatorkit/issues/182"},"comments":{"href":"https://api.github.com/repos/giantswarm/operatorkit/issues/182/comments"},"review_comments":{"href":"https://api.github.com/repos/giantswarm/operatorkit/pulls/182/comments"},"review_comment":{"href":"https://api.github.com/repos/giantswarm/operatorkit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/giantswarm/operatorkit/pulls/182/commits"},"statuses":{"href":"https://api.github.com/repos/giantswarm/operatorkit/statuses/613b0b107244e7691b124999834b7da0cce9a7e2"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"MarcelMue"}}