{"action":"created","comment":{"url":"https://api.github.com/repos/openshift/openshift-azure/pulls/comments/220397851","pull_request_review_id":158797101,"id":220397851,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMDM5Nzg1MQ==","diff_hunk":"@@ -0,0 +1,190 @@\n+package config\n+\n+import (\n+\t\"reflect\"\n+\t\"testing\"\n+\n+\t\"github.com/openshift/openshift-azure/pkg/api\"\n+)\n+\n+func TestDerivedCloudProviderConf(t *testing.T) {\n+\ttests := []struct {\n+\t\tcs   api.OpenShiftManagedCluster\n+\t\tname string\n+\t\twant []byte\n+\t}{\n+\t\t{\n+\t\t\tname: \"one\",\n+\t\t\tcs: api.OpenShiftManagedCluster{\n+\t\t\t\tProperties: &api.Properties{AzProfile: &api.AzProfile{\n+\t\t\t\t\tTenantID:       \"tenant\",\n+\t\t\t\t\tSubscriptionID: \"sub\",\n+\t\t\t\t\tResourceGroup:  \"rg\",\n+\t\t\t\t}, ServicePrincipalProfile: &api.ServicePrincipalProfile{\n+\t\t\t\t\tClientID: \"client_id\",\n+\t\t\t\t\tSecret:   \"client_secrett\",\n+\t\t\t\t}},\n+\t\t\t\tLocation: \"eastus\",\n+\t\t\t},\n+\t\t\twant: []byte(`aadClientId: client_id\n+aadClientSecret: client_secrett\n+location: eastus\n+primaryScaleSetName: ss-compute\n+resourceGroup: rg\n+securityGroupName: nsg-compute\n+subscriptionId: sub\n+tenantId: tenant\n+vmType: vmss\n+`),\n+\t\t},\n+\t}\n+\n+\tfor _, tt := range tests {\n+\t\tgot, err := Derived.CloudProviderConf(&tt.cs)\n+\t\tif err != nil {\n+\t\t\tt.Error(err)\n+\t\t\treturn\n+\t\t}\n+\t\tif !reflect.DeepEqual(got, tt.want) {\n+\t\t\tt.Errorf(\"derived.CloudProviderConf() = \\\"%v\\\", want \\\"%v\\\"\", string(got), string(tt.want))\n+\t\t}\n+\t}\n+}\n+\n+func TestDerivedMasterLBCNamePrefix(t *testing.T) {\n+\tcs := api.OpenShiftManagedCluster{\n+\t\tProperties: &api.Properties{FQDN: \"bar.baz\"},\n+\t}\n+\tif got := Derived.MasterLBCNamePrefix(&cs); got != \"bar\" {\n+\t\tt.Errorf(\"derived.MasterLBCNamePrefix() = %v, want %v\", got, \"bar\")\n+\t}\n+}\n+\n+func TestDerivedRouterLBCNamePrefix(t *testing.T) {\n+\ttests := []struct {\n+\t\tcs   api.OpenShiftManagedCluster\n+\t\twant string\n+\t}{\n+\t\t{\n+\t\t\tcs: api.OpenShiftManagedCluster{\n+\t\t\t\tProperties: &api.Properties{\n+\t\t\t\t\tRouterProfiles: []api.RouterProfile{\n+\t\t\t\t\t\t{\n+\t\t\t\t\t\t\tFQDN: \"one.two.three\",\n+\t\t\t\t\t\t},\n+\t\t\t\t\t\t{\n+\t\t\t\t\t\t\tFQDN: \"not.this\",","path":"pkg/config/derive_test.go","position":76,"original_position":76,"commit_id":"84b9ff1c9519425964dbc0f9671aaa8832169989","original_commit_id":"84b9ff1c9519425964dbc0f9671aaa8832169989","user":{"login":"jim-minter","id":1038301,"node_id":"MDQ6VXNlcjEwMzgzMDE=","avatar_url":"https://avatars2.githubusercontent.com/u/1038301?v=4","gravatar_id":"","url":"https://api.github.com/users/jim-minter","html_url":"https://github.com/jim-minter","followers_url":"https://api.github.com/users/jim-minter/followers","following_url":"https://api.github.com/users/jim-minter/following{/other_user}","gists_url":"https://api.github.com/users/jim-minter/gists{/gist_id}","starred_url":"https://api.github.com/users/jim-minter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jim-minter/subscriptions","organizations_url":"https://api.github.com/users/jim-minter/orgs","repos_url":"https://api.github.com/users/jim-minter/repos","events_url":"https://api.github.com/users/jim-minter/events{/privacy}","received_events_url":"https://api.github.com/users/jim-minter/received_events","type":"User","site_admin":false},"body":"(we currently validate against multiple RouterProfiles)","created_at":"2018-09-26T00:44:41Z","updated_at":"2018-09-26T00:45:58Z","html_url":"https://github.com/openshift/openshift-azure/pull/490#discussion_r220397851","pull_request_url":"https://api.github.com/repos/openshift/openshift-azure/pulls/490","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/openshift/openshift-azure/pulls/comments/220397851"},"html":{"href":"https://github.com/openshift/openshift-azure/pull/490#discussion_r220397851"},"pull_request":{"href":"https://api.github.com/repos/openshift/openshift-azure/pulls/490"}}},"pull_request":{"url":"https://api.github.com/repos/openshift/openshift-azure/pulls/490","id":216837279,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE2ODM3Mjc5","html_url":"https://github.com/openshift/openshift-azure/pull/490","diff_url":"https://github.com/openshift/openshift-azure/pull/490.diff","patch_url":"https://github.com/openshift/openshift-azure/pull/490.patch","issue_url":"https://api.github.com/repos/openshift/openshift-azure/issues/490","number":490,"state":"open","locked":false,"title":"Add unit tests for derive","user":{"login":"asalkeld","id":420707,"node_id":"MDQ6VXNlcjQyMDcwNw==","avatar_url":"https://avatars1.githubusercontent.com/u/420707?v=4","gravatar_id":"","url":"https://api.github.com/users/asalkeld","html_url":"https://github.com/asalkeld","followers_url":"https://api.github.com/users/asalkeld/followers","following_url":"https://api.github.com/users/asalkeld/following{/other_user}","gists_url":"https://api.github.com/users/asalkeld/gists{/gist_id}","starred_url":"https://api.github.com/users/asalkeld/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asalkeld/subscriptions","organizations_url":"https://api.github.com/users/asalkeld/orgs","repos_url":"https://api.github.com/users/asalkeld/repos","events_url":"https://api.github.com/users/asalkeld/events{/privacy}","received_events_url":"https://api.github.com/users/asalkeld/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-09-20T03:51:18Z","updated_at":"2018-09-26T00:45:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"485375c82f3e8a06680abd7230ce5ed8a2361ee1","assignee":null,"assignees":[],"requested_reviewers":[{"login":"kwoodson","id":1385770,"node_id":"MDQ6VXNlcjEzODU3NzA=","avatar_url":"https://avatars2.githubusercontent.com/u/1385770?v=4","gravatar_id":"","url":"https://api.github.com/users/kwoodson","html_url":"https://github.com/kwoodson","followers_url":"https://api.github.com/users/kwoodson/followers","following_url":"https://api.github.com/users/kwoodson/following{/other_user}","gists_url":"https://api.github.com/users/kwoodson/gists{/gist_id}","starred_url":"https://api.github.com/users/kwoodson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kwoodson/subscriptions","organizations_url":"https://api.github.com/users/kwoodson/orgs","repos_url":"https://api.github.com/users/kwoodson/repos","events_url":"https://api.github.com/users/kwoodson/events{/privacy}","received_events_url":"https://api.github.com/users/kwoodson/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":1006517260,"node_id":"MDU6TGFiZWwxMDA2NTE3MjYw","url":"https://api.github.com/repos/openshift/openshift-azure/labels/size/L","name":"size/L","color":"ee9900","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/openshift/openshift-azure/pulls/490/commits","review_comments_url":"https://api.github.com/repos/openshift/openshift-azure/pulls/490/comments","review_comment_url":"https://api.github.com/repos/openshift/openshift-azure/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openshift/openshift-azure/issues/490/comments","statuses_url":"https://api.github.com/repos/openshift/openshift-azure/statuses/84b9ff1c9519425964dbc0f9671aaa8832169989","head":{"label":"asalkeld:derive-unittest","ref":"derive-unittest","sha":"84b9ff1c9519425964dbc0f9671aaa8832169989","user":{"login":"asalkeld","id":420707,"node_id":"MDQ6VXNlcjQyMDcwNw==","avatar_url":"https://avatars1.githubusercontent.com/u/420707?v=4","gravatar_id":"","url":"https://api.github.com/users/asalkeld","html_url":"https://github.com/asalkeld","followers_url":"https://api.github.com/users/asalkeld/followers","following_url":"https://api.github.com/users/asalkeld/following{/other_user}","gists_url":"https://api.github.com/users/asalkeld/gists{/gist_id}","starred_url":"https://api.github.com/users/asalkeld/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asalkeld/subscriptions","organizations_url":"https://api.github.com/users/asalkeld/orgs","repos_url":"https://api.github.com/users/asalkeld/repos","events_url":"https://api.github.com/users/asalkeld/events{/privacy}","received_events_url":"https://api.github.com/users/asalkeld/received_events","type":"User","site_admin":false},"repo":{"id":149046174,"node_id":"MDEwOlJlcG9zaXRvcnkxNDkwNDYxNzQ=","name":"openshift-azure","full_name":"asalkeld/openshift-azure","private":false,"owner":{"login":"asalkeld","id":420707,"node_id":"MDQ6VXNlcjQyMDcwNw==","avatar_url":"https://avatars1.githubusercontent.com/u/420707?v=4","gravatar_id":"","url":"https://api.github.com/users/asalkeld","html_url":"https://github.com/asalkeld","followers_url":"https://api.github.com/users/asalkeld/followers","following_url":"https://api.github.com/users/asalkeld/following{/other_user}","gists_url":"https://api.github.com/users/asalkeld/gists{/gist_id}","starred_url":"https://api.github.com/users/asalkeld/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asalkeld/subscriptions","organizations_url":"https://api.github.com/users/asalkeld/orgs","repos_url":"https://api.github.com/users/asalkeld/repos","events_url":"https://api.github.com/users/asalkeld/events{/privacy}","received_events_url":"https://api.github.com/users/asalkeld/received_events","type":"User","site_admin":false},"html_url":"https://github.com/asalkeld/openshift-azure","description":null,"fork":true,"url":"https://api.github.com/repos/asalkeld/openshift-azure","forks_url":"https://api.github.com/repos/asalkeld/openshift-azure/forks","keys_url":"https://api.github.com/repos/asalkeld/openshift-azure/keys{/key_id}","collaborators_url":"https://api.github.com/repos/asalkeld/openshift-azure/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/asalkeld/openshift-azure/teams","hooks_url":"https://api.github.com/repos/asalkeld/openshift-azure/hooks","issue_events_url":"https://api.github.com/repos/asalkeld/openshift-azure/issues/events{/number}","events_url":"https://api.github.com/repos/asalkeld/openshift-azure/events","assignees_url":"https://api.github.com/repos/asalkeld/openshift-azure/assignees{/user}","branches_url":"https://api.github.com/repos/asalkeld/openshift-azure/branches{/branch}","tags_url":"https://api.github.com/repos/asalkeld/openshift-azure/tags","blobs_url":"https://api.github.com/repos/asalkeld/openshift-azure/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/asalkeld/openshift-azure/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/asalkeld/openshift-azure/git/refs{/sha}","trees_url":"https://api.github.com/repos/asalkeld/openshift-azure/git/trees{/sha}","statuses_url":"https://api.github.com/repos/asalkeld/openshift-azure/statuses/{sha}","languages_url":"https://api.github.com/repos/asalkeld/openshift-azure/languages","stargazers_url":"https://api.github.com/repos/asalkeld/openshift-azure/stargazers","contributors_url":"https://api.github.com/repos/asalkeld/openshift-azure/contributors","subscribers_url":"https://api.github.com/repos/asalkeld/openshift-azure/subscribers","subscription_url":"https://api.github.com/repos/asalkeld/openshift-azure/subscription","commits_url":"https://api.github.com/repos/asalkeld/openshift-azure/commits{/sha}","git_commits_url":"https://api.github.com/repos/asalkeld/openshift-azure/git/commits{/sha}","comments_url":"https://api.github.com/repos/asalkeld/openshift-azure/comments{/number}","issue_comment_url":"https://api.github.com/repos/asalkeld/openshift-azure/issues/comments{/number}","contents_url":"https://api.github.com/repos/asalkeld/openshift-azure/contents/{+path}","compare_url":"https://api.github.com/repos/asalkeld/openshift-azure/compare/{base}...{head}","merges_url":"https://api.github.com/repos/asalkeld/openshift-azure/merges","archive_url":"https://api.github.com/repos/asalkeld/openshift-azure/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/asalkeld/openshift-azure/downloads","issues_url":"https://api.github.com/repos/asalkeld/openshift-azure/issues{/number}","pulls_url":"https://api.github.com/repos/asalkeld/openshift-azure/pulls{/number}","milestones_url":"https://api.github.com/repos/asalkeld/openshift-azure/milestones{/number}","notifications_url":"https://api.github.com/repos/asalkeld/openshift-azure/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/asalkeld/openshift-azure/labels{/name}","releases_url":"https://api.github.com/repos/asalkeld/openshift-azure/releases{/id}","deployments_url":"https://api.github.com/repos/asalkeld/openshift-azure/deployments","created_at":"2018-09-16T23:54:22Z","updated_at":"2018-09-16T23:54:25Z","pushed_at":"2018-09-26T00:12:10Z","git_url":"git://github.com/asalkeld/openshift-azure.git","ssh_url":"git@github.com:asalkeld/openshift-azure.git","clone_url":"https://github.com/asalkeld/openshift-azure.git","svn_url":"https://github.com/asalkeld/openshift-azure","homepage":null,"size":27870,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"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":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"openshift:master","ref":"master","sha":"d584c9278b967ee6dce23ae66d32ef9f37248a9d","user":{"login":"openshift","id":792337,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc5MjMzNw==","avatar_url":"https://avatars3.githubusercontent.com/u/792337?v=4","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":137828518,"node_id":"MDEwOlJlcG9zaXRvcnkxMzc4Mjg1MTg=","name":"openshift-azure","full_name":"openshift/openshift-azure","private":false,"owner":{"login":"openshift","id":792337,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc5MjMzNw==","avatar_url":"https://avatars3.githubusercontent.com/u/792337?v=4","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},"html_url":"https://github.com/openshift/openshift-azure","description":null,"fork":false,"url":"https://api.github.com/repos/openshift/openshift-azure","forks_url":"https://api.github.com/repos/openshift/openshift-azure/forks","keys_url":"https://api.github.com/repos/openshift/openshift-azure/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openshift/openshift-azure/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openshift/openshift-azure/teams","hooks_url":"https://api.github.com/repos/openshift/openshift-azure/hooks","issue_events_url":"https://api.github.com/repos/openshift/openshift-azure/issues/events{/number}","events_url":"https://api.github.com/repos/openshift/openshift-azure/events","assignees_url":"https://api.github.com/repos/openshift/openshift-azure/assignees{/user}","branches_url":"https://api.github.com/repos/openshift/openshift-azure/branches{/branch}","tags_url":"https://api.github.com/repos/openshift/openshift-azure/tags","blobs_url":"https://api.github.com/repos/openshift/openshift-azure/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openshift/openshift-azure/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openshift/openshift-azure/git/refs{/sha}","trees_url":"https://api.github.com/repos/openshift/openshift-azure/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openshift/openshift-azure/statuses/{sha}","languages_url":"https://api.github.com/repos/openshift/openshift-azure/languages","stargazers_url":"https://api.github.com/repos/openshift/openshift-azure/stargazers","contributors_url":"https://api.github.com/repos/openshift/openshift-azure/contributors","subscribers_url":"https://api.github.com/repos/openshift/openshift-azure/subscribers","subscription_url":"https://api.github.com/repos/openshift/openshift-azure/subscription","commits_url":"https://api.github.com/repos/openshift/openshift-azure/commits{/sha}","git_commits_url":"https://api.github.com/repos/openshift/openshift-azure/git/commits{/sha}","comments_url":"https://api.github.com/repos/openshift/openshift-azure/comments{/number}","issue_comment_url":"https://api.github.com/repos/openshift/openshift-azure/issues/comments{/number}","contents_url":"https://api.github.com/repos/openshift/openshift-azure/contents/{+path}","compare_url":"https://api.github.com/repos/openshift/openshift-azure/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openshift/openshift-azure/merges","archive_url":"https://api.github.com/repos/openshift/openshift-azure/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openshift/openshift-azure/downloads","issues_url":"https://api.github.com/repos/openshift/openshift-azure/issues{/number}","pulls_url":"https://api.github.com/repos/openshift/openshift-azure/pulls{/number}","milestones_url":"https://api.github.com/repos/openshift/openshift-azure/milestones{/number}","notifications_url":"https://api.github.com/repos/openshift/openshift-azure/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openshift/openshift-azure/labels{/name}","releases_url":"https://api.github.com/repos/openshift/openshift-azure/releases{/id}","deployments_url":"https://api.github.com/repos/openshift/openshift-azure/deployments","created_at":"2018-06-19T02:11:07Z","updated_at":"2018-09-26T00:43:16Z","pushed_at":"2018-09-26T00:43:12Z","git_url":"git://github.com/openshift/openshift-azure.git","ssh_url":"git@github.com:openshift/openshift-azure.git","clone_url":"https://github.com/openshift/openshift-azure.git","svn_url":"https://github.com/openshift/openshift-azure","homepage":null,"size":27870,"stargazers_count":7,"watchers_count":7,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":12,"mirror_url":null,"archived":false,"open_issues_count":60,"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":12,"open_issues":60,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openshift/openshift-azure/pulls/490"},"html":{"href":"https://github.com/openshift/openshift-azure/pull/490"},"issue":{"href":"https://api.github.com/repos/openshift/openshift-azure/issues/490"},"comments":{"href":"https://api.github.com/repos/openshift/openshift-azure/issues/490/comments"},"review_comments":{"href":"https://api.github.com/repos/openshift/openshift-azure/pulls/490/comments"},"review_comment":{"href":"https://api.github.com/repos/openshift/openshift-azure/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openshift/openshift-azure/pulls/490/commits"},"statuses":{"href":"https://api.github.com/repos/openshift/openshift-azure/statuses/84b9ff1c9519425964dbc0f9671aaa8832169989"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"jim-minter"}}