{"action":"created","comment":{"url":"https://api.github.com/repos/platform9/azure-provider/pulls/comments/234801336","pull_request_review_id":176516216,"id":234801336,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNDgwMTMzNg==","diff_hunk":"@@ -125,6 +126,103 @@ func TestExistsFailureVMNotExists(t *testing.T) {\n \t\tt.Fatalf(\"expected machine: %v to not exist\", machine.ObjectMeta.Name)\n \t}\n }\n+func TestUpdateVMNotExists(t *testing.T) {\n+\tazureServicesClient := mockVMNotExists()\n+\tparams := MachineActuatorParams{Services: &azureServicesClient}\n+\n+\tmachineConfig := newMachineProviderConfig()\n+\tmachine := newMachine(t, machineConfig)\n+\tcluster := newCluster(t)\n+\n+\tactuator, err := NewMachineActuator(params)\n+\terr = actuator.Update(cluster, machine)\n+\tif err == nil {\n+\t\tt.Fatal(\"expected error calling Update but got none\")\n+\t}\n+}\n+func TestUpdateMachineNotExists(t *testing.T) {\n+\tazureServicesClient := mockVMExists()\n+\tmachineConfig := newMachineProviderConfig()\n+\tmachine := newMachine(t, machineConfig)\n+\tcluster := newCluster(t)\n+\n+\tparams := MachineActuatorParams{Services: &azureServicesClient, V1Alpha1Client: fake.NewSimpleClientset().ClusterV1alpha1()}\n+\tactuator, err := NewMachineActuator(params)\n+\terr = actuator.Update(cluster, machine)\n+\tif err == nil {\n+\t\tt.Fatal(\"expected error calling Update but got none\")\n+\t}\n+}\n+func TestUpdateNoSpecChange(t *testing.T) {\n+\tazureServicesClient := mockVMExists()\n+\tmachineConfig := newMachineProviderConfig()\n+\tmachine := newMachine(t, machineConfig)\n+\tcluster := newCluster(t)\n+\n+\tparams := MachineActuatorParams{Services: &azureServicesClient, V1Alpha1Client: fake.NewSimpleClientset(machine).ClusterV1alpha1()}\n+\tactuator, err := NewMachineActuator(params)\n+\terr = actuator.Update(cluster, machine)\n+\tif err != nil {\n+\t\tt.Fatal(\"unexpected error calling Update\")\n+\t}\n+}\n+\n+func TestUpdateMasterKubeletChange(t *testing.T) {\n+\tazureServicesClient := mockVMExists()\n+\tmachineConfig := newMachineProviderConfig()\n+\t// set as master machine\n+\tmachineConfig.Roles = []azureconfigv1.MachineRole{azureconfigv1.Master}\n+\tmachine := newMachine(t, machineConfig)\n+\tcluster := newCluster(t)\n+\n+\tparams := MachineActuatorParams{Services: &azureServicesClient, V1Alpha1Client: fake.NewSimpleClientset(machine).ClusterV1alpha1()}\n+\tactuator, err := NewMachineActuator(params)\n+\tgoalMachine := machine\n+\tgoalMachine.Spec.Versions.Kubelet = \"1.10.0\"\n+\n+\terr = actuator.Update(cluster, goalMachine)\n+\tif err != nil {\n+\t\tt.Fatalf(\"unexpected error calling Update: %v\", err)\n+\t}\n+}\n+\n+func TestUpdateMasterControlPlaneChange(t *testing.T) {\n+\tazureServicesClient := mockVMExists()\n+\tmachineConfig := newMachineProviderConfig()\n+\t// set as master machine\n+\tmachineConfig.Roles = []azureconfigv1.MachineRole{azureconfigv1.Master}\n+\tmachine := newMachine(t, machineConfig)\n+\tcluster := newCluster(t)\n+\n+\tparams := MachineActuatorParams{Services: &azureServicesClient, V1Alpha1Client: fake.NewSimpleClientset(machine).ClusterV1alpha1()}\n+\tactuator, err := NewMachineActuator(params)\n+\tgoalMachine := machine\n+\tgoalMachine.Spec.Versions.ControlPlane = \"1.10.0\"\n+\n+\terr = actuator.Update(cluster, goalMachine)\n+\tif err != nil {\n+\t\tt.Fatalf(\"unexpected error calling Update: %v\", err)\n+\t}\n+}\n+func TestUpdateMasterControlPlaneChangeRunCommandFailure(t *testing.T) {","path":"cloud/azure/actuators/machine/machineactuator_test.go","position":null,"original_position":90,"commit_id":"227a0e45f9559ca055cf1c30479b96cfc5804f1c","original_commit_id":"e3f621b25a6093c30c0941e689d2aa8a7c445446","user":{"login":"vannrt","id":8865699,"node_id":"MDQ6VXNlcjg4NjU2OTk=","avatar_url":"https://avatars3.githubusercontent.com/u/8865699?v=4","gravatar_id":"","url":"https://api.github.com/users/vannrt","html_url":"https://github.com/vannrt","followers_url":"https://api.github.com/users/vannrt/followers","following_url":"https://api.github.com/users/vannrt/following{/other_user}","gists_url":"https://api.github.com/users/vannrt/gists{/gist_id}","starred_url":"https://api.github.com/users/vannrt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vannrt/subscriptions","organizations_url":"https://api.github.com/users/vannrt/orgs","repos_url":"https://api.github.com/users/vannrt/repos","events_url":"https://api.github.com/users/vannrt/events{/privacy}","received_events_url":"https://api.github.com/users/vannrt/received_events","type":"User","site_admin":false},"body":"This no difference between this and `TestUpdateMasterControlPlaneChange`","created_at":"2018-11-19T22:12:33Z","updated_at":"2018-11-19T22:52:55Z","html_url":"https://github.com/platform9/azure-provider/pull/32#discussion_r234801336","pull_request_url":"https://api.github.com/repos/platform9/azure-provider/pulls/32","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/platform9/azure-provider/pulls/comments/234801336"},"html":{"href":"https://github.com/platform9/azure-provider/pull/32#discussion_r234801336"},"pull_request":{"href":"https://api.github.com/repos/platform9/azure-provider/pulls/32"}}},"pull_request":{"url":"https://api.github.com/repos/platform9/azure-provider/pulls/32","id":229860119,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI5ODYwMTE5","html_url":"https://github.com/platform9/azure-provider/pull/32","diff_url":"https://github.com/platform9/azure-provider/pull/32.diff","patch_url":"https://github.com/platform9/azure-provider/pull/32.patch","issue_url":"https://api.github.com/repos/platform9/azure-provider/issues/32","number":32,"state":"open","locked":false,"title":"Implement Machine Actuator Update","user":{"login":"marwanad","id":7871596,"node_id":"MDQ6VXNlcjc4NzE1OTY=","avatar_url":"https://avatars0.githubusercontent.com/u/7871596?v=4","gravatar_id":"","url":"https://api.github.com/users/marwanad","html_url":"https://github.com/marwanad","followers_url":"https://api.github.com/users/marwanad/followers","following_url":"https://api.github.com/users/marwanad/following{/other_user}","gists_url":"https://api.github.com/users/marwanad/gists{/gist_id}","starred_url":"https://api.github.com/users/marwanad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marwanad/subscriptions","organizations_url":"https://api.github.com/users/marwanad/orgs","repos_url":"https://api.github.com/users/marwanad/repos","events_url":"https://api.github.com/users/marwanad/events{/privacy}","received_events_url":"https://api.github.com/users/marwanad/received_events","type":"User","site_admin":false},"body":"Closes #27 ","created_at":"2018-11-10T01:21:54Z","updated_at":"2018-11-19T22:52:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"88b7f62c523a3df60538aaa7654826eda00443ad","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/platform9/azure-provider/pulls/32/commits","review_comments_url":"https://api.github.com/repos/platform9/azure-provider/pulls/32/comments","review_comment_url":"https://api.github.com/repos/platform9/azure-provider/pulls/comments{/number}","comments_url":"https://api.github.com/repos/platform9/azure-provider/issues/32/comments","statuses_url":"https://api.github.com/repos/platform9/azure-provider/statuses/227a0e45f9559ca055cf1c30479b96cfc5804f1c","head":{"label":"platform9:machine-actuator-update","ref":"machine-actuator-update","sha":"227a0e45f9559ca055cf1c30479b96cfc5804f1c","user":{"login":"platform9","id":2824585,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI4MjQ1ODU=","avatar_url":"https://avatars0.githubusercontent.com/u/2824585?v=4","gravatar_id":"","url":"https://api.github.com/users/platform9","html_url":"https://github.com/platform9","followers_url":"https://api.github.com/users/platform9/followers","following_url":"https://api.github.com/users/platform9/following{/other_user}","gists_url":"https://api.github.com/users/platform9/gists{/gist_id}","starred_url":"https://api.github.com/users/platform9/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/platform9/subscriptions","organizations_url":"https://api.github.com/users/platform9/orgs","repos_url":"https://api.github.com/users/platform9/repos","events_url":"https://api.github.com/users/platform9/events{/privacy}","received_events_url":"https://api.github.com/users/platform9/received_events","type":"Organization","site_admin":false},"repo":{"id":137134442,"node_id":"MDEwOlJlcG9zaXRvcnkxMzcxMzQ0NDI=","name":"azure-provider","full_name":"platform9/azure-provider","private":false,"owner":{"login":"platform9","id":2824585,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI4MjQ1ODU=","avatar_url":"https://avatars0.githubusercontent.com/u/2824585?v=4","gravatar_id":"","url":"https://api.github.com/users/platform9","html_url":"https://github.com/platform9","followers_url":"https://api.github.com/users/platform9/followers","following_url":"https://api.github.com/users/platform9/following{/other_user}","gists_url":"https://api.github.com/users/platform9/gists{/gist_id}","starred_url":"https://api.github.com/users/platform9/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/platform9/subscriptions","organizations_url":"https://api.github.com/users/platform9/orgs","repos_url":"https://api.github.com/users/platform9/repos","events_url":"https://api.github.com/users/platform9/events{/privacy}","received_events_url":"https://api.github.com/users/platform9/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/platform9/azure-provider","description":null,"fork":false,"url":"https://api.github.com/repos/platform9/azure-provider","forks_url":"https://api.github.com/repos/platform9/azure-provider/forks","keys_url":"https://api.github.com/repos/platform9/azure-provider/keys{/key_id}","collaborators_url":"https://api.github.com/repos/platform9/azure-provider/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/platform9/azure-provider/teams","hooks_url":"https://api.github.com/repos/platform9/azure-provider/hooks","issue_events_url":"https://api.github.com/repos/platform9/azure-provider/issues/events{/number}","events_url":"https://api.github.com/repos/platform9/azure-provider/events","assignees_url":"https://api.github.com/repos/platform9/azure-provider/assignees{/user}","branches_url":"https://api.github.com/repos/platform9/azure-provider/branches{/branch}","tags_url":"https://api.github.com/repos/platform9/azure-provider/tags","blobs_url":"https://api.github.com/repos/platform9/azure-provider/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/platform9/azure-provider/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/platform9/azure-provider/git/refs{/sha}","trees_url":"https://api.github.com/repos/platform9/azure-provider/git/trees{/sha}","statuses_url":"https://api.github.com/repos/platform9/azure-provider/statuses/{sha}","languages_url":"https://api.github.com/repos/platform9/azure-provider/languages","stargazers_url":"https://api.github.com/repos/platform9/azure-provider/stargazers","contributors_url":"https://api.github.com/repos/platform9/azure-provider/contributors","subscribers_url":"https://api.github.com/repos/platform9/azure-provider/subscribers","subscription_url":"https://api.github.com/repos/platform9/azure-provider/subscription","commits_url":"https://api.github.com/repos/platform9/azure-provider/commits{/sha}","git_commits_url":"https://api.github.com/repos/platform9/azure-provider/git/commits{/sha}","comments_url":"https://api.github.com/repos/platform9/azure-provider/comments{/number}","issue_comment_url":"https://api.github.com/repos/platform9/azure-provider/issues/comments{/number}","contents_url":"https://api.github.com/repos/platform9/azure-provider/contents/{+path}","compare_url":"https://api.github.com/repos/platform9/azure-provider/compare/{base}...{head}","merges_url":"https://api.github.com/repos/platform9/azure-provider/merges","archive_url":"https://api.github.com/repos/platform9/azure-provider/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/platform9/azure-provider/downloads","issues_url":"https://api.github.com/repos/platform9/azure-provider/issues{/number}","pulls_url":"https://api.github.com/repos/platform9/azure-provider/pulls{/number}","milestones_url":"https://api.github.com/repos/platform9/azure-provider/milestones{/number}","notifications_url":"https://api.github.com/repos/platform9/azure-provider/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/platform9/azure-provider/labels{/name}","releases_url":"https://api.github.com/repos/platform9/azure-provider/releases{/id}","deployments_url":"https://api.github.com/repos/platform9/azure-provider/deployments","created_at":"2018-06-12T22:29:45Z","updated_at":"2018-11-14T22:18:08Z","pushed_at":"2018-11-19T17:24:10Z","git_url":"git://github.com/platform9/azure-provider.git","ssh_url":"git@github.com:platform9/azure-provider.git","clone_url":"https://github.com/platform9/azure-provider.git","svn_url":"https://github.com/platform9/azure-provider","homepage":null,"size":63992,"stargazers_count":5,"watchers_count":5,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":12,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":3,"open_issues":12,"watchers":5,"default_branch":"master"}},"base":{"label":"platform9:master","ref":"master","sha":"50fc766fdb6cdb916d04cc54920c6a54e8a474cb","user":{"login":"platform9","id":2824585,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI4MjQ1ODU=","avatar_url":"https://avatars0.githubusercontent.com/u/2824585?v=4","gravatar_id":"","url":"https://api.github.com/users/platform9","html_url":"https://github.com/platform9","followers_url":"https://api.github.com/users/platform9/followers","following_url":"https://api.github.com/users/platform9/following{/other_user}","gists_url":"https://api.github.com/users/platform9/gists{/gist_id}","starred_url":"https://api.github.com/users/platform9/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/platform9/subscriptions","organizations_url":"https://api.github.com/users/platform9/orgs","repos_url":"https://api.github.com/users/platform9/repos","events_url":"https://api.github.com/users/platform9/events{/privacy}","received_events_url":"https://api.github.com/users/platform9/received_events","type":"Organization","site_admin":false},"repo":{"id":137134442,"node_id":"MDEwOlJlcG9zaXRvcnkxMzcxMzQ0NDI=","name":"azure-provider","full_name":"platform9/azure-provider","private":false,"owner":{"login":"platform9","id":2824585,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI4MjQ1ODU=","avatar_url":"https://avatars0.githubusercontent.com/u/2824585?v=4","gravatar_id":"","url":"https://api.github.com/users/platform9","html_url":"https://github.com/platform9","followers_url":"https://api.github.com/users/platform9/followers","following_url":"https://api.github.com/users/platform9/following{/other_user}","gists_url":"https://api.github.com/users/platform9/gists{/gist_id}","starred_url":"https://api.github.com/users/platform9/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/platform9/subscriptions","organizations_url":"https://api.github.com/users/platform9/orgs","repos_url":"https://api.github.com/users/platform9/repos","events_url":"https://api.github.com/users/platform9/events{/privacy}","received_events_url":"https://api.github.com/users/platform9/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/platform9/azure-provider","description":null,"fork":false,"url":"https://api.github.com/repos/platform9/azure-provider","forks_url":"https://api.github.com/repos/platform9/azure-provider/forks","keys_url":"https://api.github.com/repos/platform9/azure-provider/keys{/key_id}","collaborators_url":"https://api.github.com/repos/platform9/azure-provider/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/platform9/azure-provider/teams","hooks_url":"https://api.github.com/repos/platform9/azure-provider/hooks","issue_events_url":"https://api.github.com/repos/platform9/azure-provider/issues/events{/number}","events_url":"https://api.github.com/repos/platform9/azure-provider/events","assignees_url":"https://api.github.com/repos/platform9/azure-provider/assignees{/user}","branches_url":"https://api.github.com/repos/platform9/azure-provider/branches{/branch}","tags_url":"https://api.github.com/repos/platform9/azure-provider/tags","blobs_url":"https://api.github.com/repos/platform9/azure-provider/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/platform9/azure-provider/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/platform9/azure-provider/git/refs{/sha}","trees_url":"https://api.github.com/repos/platform9/azure-provider/git/trees{/sha}","statuses_url":"https://api.github.com/repos/platform9/azure-provider/statuses/{sha}","languages_url":"https://api.github.com/repos/platform9/azure-provider/languages","stargazers_url":"https://api.github.com/repos/platform9/azure-provider/stargazers","contributors_url":"https://api.github.com/repos/platform9/azure-provider/contributors","subscribers_url":"https://api.github.com/repos/platform9/azure-provider/subscribers","subscription_url":"https://api.github.com/repos/platform9/azure-provider/subscription","commits_url":"https://api.github.com/repos/platform9/azure-provider/commits{/sha}","git_commits_url":"https://api.github.com/repos/platform9/azure-provider/git/commits{/sha}","comments_url":"https://api.github.com/repos/platform9/azure-provider/comments{/number}","issue_comment_url":"https://api.github.com/repos/platform9/azure-provider/issues/comments{/number}","contents_url":"https://api.github.com/repos/platform9/azure-provider/contents/{+path}","compare_url":"https://api.github.com/repos/platform9/azure-provider/compare/{base}...{head}","merges_url":"https://api.github.com/repos/platform9/azure-provider/merges","archive_url":"https://api.github.com/repos/platform9/azure-provider/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/platform9/azure-provider/downloads","issues_url":"https://api.github.com/repos/platform9/azure-provider/issues{/number}","pulls_url":"https://api.github.com/repos/platform9/azure-provider/pulls{/number}","milestones_url":"https://api.github.com/repos/platform9/azure-provider/milestones{/number}","notifications_url":"https://api.github.com/repos/platform9/azure-provider/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/platform9/azure-provider/labels{/name}","releases_url":"https://api.github.com/repos/platform9/azure-provider/releases{/id}","deployments_url":"https://api.github.com/repos/platform9/azure-provider/deployments","created_at":"2018-06-12T22:29:45Z","updated_at":"2018-11-14T22:18:08Z","pushed_at":"2018-11-19T17:24:10Z","git_url":"git://github.com/platform9/azure-provider.git","ssh_url":"git@github.com:platform9/azure-provider.git","clone_url":"https://github.com/platform9/azure-provider.git","svn_url":"https://github.com/platform9/azure-provider","homepage":null,"size":63992,"stargazers_count":5,"watchers_count":5,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":12,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":3,"open_issues":12,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/platform9/azure-provider/pulls/32"},"html":{"href":"https://github.com/platform9/azure-provider/pull/32"},"issue":{"href":"https://api.github.com/repos/platform9/azure-provider/issues/32"},"comments":{"href":"https://api.github.com/repos/platform9/azure-provider/issues/32/comments"},"review_comments":{"href":"https://api.github.com/repos/platform9/azure-provider/pulls/32/comments"},"review_comment":{"href":"https://api.github.com/repos/platform9/azure-provider/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/platform9/azure-provider/pulls/32/commits"},"statuses":{"href":"https://api.github.com/repos/platform9/azure-provider/statuses/227a0e45f9559ca055cf1c30479b96cfc5804f1c"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"vannrt"}}