{"action":"created","comment":{"url":"https://api.github.com/repos/openshift/origin/pulls/comments/39605128","id":39605128,"diff_hunk":"@@ -0,0 +1,143 @@\n+package images\n+\n+import (\n+\t\"fmt\"\n+\t\"time\"\n+\n+\tg \"github.com/onsi/ginkgo\"\n+\to \"github.com/onsi/gomega\"\n+\n+\texutil \"github.com/openshift/origin/test/extended/util\"\n+\tkapi \"k8s.io/kubernetes/pkg/api\"\n+\t\"k8s.io/kubernetes/pkg/util/rand\"\n+)\n+\n+var _ = g.Describe(\"images: MySQL replication template\", func() {\n+\tdefer g.GinkgoRecover()\n+\tvar (\n+\t\tpersistentVolumes []*kapi.PersistentVolume\n+\t\ttemplatePath      = \"https://raw.githubusercontent.com/openshift/mysql/master/5.5/examples/replica/mysql_replica.json\"\n+\t\toc                = exutil.NewCLI(\"mysql-replication\", exutil.KubeConfigPath())\n+\t\tuser              = \"user\"\n+\t\tuserPass          = \"userpass\"\n+\t\trootPass          = \"rootpass\"\n+\t\tdatabase          = \"userdb\"\n+\t)\n+\n+\tg.Describe(\"MySQL replication\", func() {\n+\t\tg.JustBeforeEach(func() {\n+\t\t\tvar err error\n+\t\t\tpersistentVolumes, err = exutil.SetupHostPathVolumes(oc.AdminKubeREST().PersistentVolumes(), \"mysql-replication\", \"512Mi\", 1)\n+\t\t\to.Expect(err).NotTo(o.HaveOccurred())\n+\t\t})\n+\n+\t\tg.AfterEach(func() {\n+\t\t\terr := oc.AsAdmin().Run(\"delete\").Args(\"all\", \"--all\", \"-n\", oc.Namespace()).Execute()\n+\t\t\to.Expect(err).NotTo(o.HaveOccurred())\n+\n+\t\t\terr = oc.AsAdmin().Run(\"delete\").Args(\"pvc\", \"--all\", \"-n\", oc.Namespace()).Execute()\n+\t\t\to.Expect(err).NotTo(o.HaveOccurred())\n+\n+\t\t\terr = exutil.CleanupHostPathVolumes(oc.AdminKubeREST().PersistentVolumes(), \"mysql-replication\")\n+\t\t\to.Expect(err).NotTo(o.HaveOccurred())\n+\t\t})\n+\n+\t\t// TODO: Add parallel loop for 5.6 templates\n+\t\tg.It(\"should replicate data\", func() {\n+\t\t\toc.SetOutputDir(exutil.TestContext.OutputDir)\n+\n+\t\t\tg.By(fmt.Sprintf(\"processing and creating the template %q\", templatePath))\n+\t\t\tconfigFile, err := oc.Run(\"process\").\n+\t\t\t\tArgs(\n+\t\t\t\t\"-f\", templatePath,\n+\t\t\t\t\"-v\", \"MYSQL_USER=\"+user+\",MYSQL_PASSWORD=\"+userPass+\",MYSQL_ROOT_PASSWORD=\"+rootPass+\",MYSQL_DATABASE=\"+database).\n+\t\t\t\tOutputToFile(\"config.json\")\n+\t\t\to.Expect(err).NotTo(o.HaveOccurred())\n+\t\t\terr = oc.Run(\"create\").Args(\"-f\", configFile).Execute()\n+\t\t\to.Expect(err).NotTo(o.HaveOccurred())\n+\n+\t\t\tcreateHelpers := func(masterDeployment, slaveDeployment string, slaveCount int) (*MySQL, []*MySQL) {","path":"test/extended/images/mysql_replica.go","position":59,"original_position":59,"commit_id":"61b4ed039c61a5293b9a3efa8cbec8a9c4da95b6","original_commit_id":"61b4ed039c61a5293b9a3efa8cbec8a9c4da95b6","user":{"login":"mfojtik","id":44136,"avatar_url":"https://avatars.githubusercontent.com/u/44136?v=3","gravatar_id":"","url":"https://api.github.com/users/mfojtik","html_url":"https://github.com/mfojtik","followers_url":"https://api.github.com/users/mfojtik/followers","following_url":"https://api.github.com/users/mfojtik/following{/other_user}","gists_url":"https://api.github.com/users/mfojtik/gists{/gist_id}","starred_url":"https://api.github.com/users/mfojtik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mfojtik/subscriptions","organizations_url":"https://api.github.com/users/mfojtik/orgs","repos_url":"https://api.github.com/users/mfojtik/repos","events_url":"https://api.github.com/users/mfojtik/events{/privacy}","received_events_url":"https://api.github.com/users/mfojtik/received_events","type":"User","site_admin":false},"body":"extract this to util/helpers package with proper godoc?","created_at":"2015-09-16T08:32:41Z","updated_at":"2015-09-16T08:32:41Z","html_url":"https://github.com/openshift/origin/pull/4377#discussion_r39605128","pull_request_url":"https://api.github.com/repos/openshift/origin/pulls/4377","_links":{"self":{"href":"https://api.github.com/repos/openshift/origin/pulls/comments/39605128"},"html":{"href":"https://github.com/openshift/origin/pull/4377#discussion_r39605128"},"pull_request":{"href":"https://api.github.com/repos/openshift/origin/pulls/4377"}}},"pull_request":{"url":"https://api.github.com/repos/openshift/origin/pulls/4377","id":43403518,"html_url":"https://github.com/openshift/origin/pull/4377","diff_url":"https://github.com/openshift/origin/pull/4377.diff","patch_url":"https://github.com/openshift/origin/pull/4377.patch","issue_url":"https://api.github.com/repos/openshift/origin/issues/4377","number":4377,"state":"open","locked":false,"title":"WIP: Mysql replication extended tests","user":{"login":"mnagy","id":72469,"avatar_url":"https://avatars.githubusercontent.com/u/72469?v=3","gravatar_id":"","url":"https://api.github.com/users/mnagy","html_url":"https://github.com/mnagy","followers_url":"https://api.github.com/users/mnagy/followers","following_url":"https://api.github.com/users/mnagy/following{/other_user}","gists_url":"https://api.github.com/users/mnagy/gists{/gist_id}","starred_url":"https://api.github.com/users/mnagy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mnagy/subscriptions","organizations_url":"https://api.github.com/users/mnagy/orgs","repos_url":"https://api.github.com/users/mnagy/repos","events_url":"https://api.github.com/users/mnagy/events{/privacy}","received_events_url":"https://api.github.com/users/mnagy/received_events","type":"User","site_admin":false},"body":"Adding extended tests for MySQL replication extended tests. Heavy WIP. Will need to move some functionality from the test to a separate helper file. @mfojtik PTAL.\r\n\r\n@rhcarvalho happy :christmas_tree:","created_at":"2015-08-26T13:47:57Z","updated_at":"2015-09-16T08:32:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"953db873efccd2b526feef2460785cc4a2ea114c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/openshift/origin/pulls/4377/commits","review_comments_url":"https://api.github.com/repos/openshift/origin/pulls/4377/comments","review_comment_url":"https://api.github.com/repos/openshift/origin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openshift/origin/issues/4377/comments","statuses_url":"https://api.github.com/repos/openshift/origin/statuses/61b4ed039c61a5293b9a3efa8cbec8a9c4da95b6","head":{"label":"mnagy:mysql_extended_tests","ref":"mysql_extended_tests","sha":"61b4ed039c61a5293b9a3efa8cbec8a9c4da95b6","user":{"login":"mnagy","id":72469,"avatar_url":"https://avatars.githubusercontent.com/u/72469?v=3","gravatar_id":"","url":"https://api.github.com/users/mnagy","html_url":"https://github.com/mnagy","followers_url":"https://api.github.com/users/mnagy/followers","following_url":"https://api.github.com/users/mnagy/following{/other_user}","gists_url":"https://api.github.com/users/mnagy/gists{/gist_id}","starred_url":"https://api.github.com/users/mnagy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mnagy/subscriptions","organizations_url":"https://api.github.com/users/mnagy/orgs","repos_url":"https://api.github.com/users/mnagy/repos","events_url":"https://api.github.com/users/mnagy/events{/privacy}","received_events_url":"https://api.github.com/users/mnagy/received_events","type":"User","site_admin":false},"repo":{"id":29465939,"name":"origin","full_name":"mnagy/origin","owner":{"login":"mnagy","id":72469,"avatar_url":"https://avatars.githubusercontent.com/u/72469?v=3","gravatar_id":"","url":"https://api.github.com/users/mnagy","html_url":"https://github.com/mnagy","followers_url":"https://api.github.com/users/mnagy/followers","following_url":"https://api.github.com/users/mnagy/following{/other_user}","gists_url":"https://api.github.com/users/mnagy/gists{/gist_id}","starred_url":"https://api.github.com/users/mnagy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mnagy/subscriptions","organizations_url":"https://api.github.com/users/mnagy/orgs","repos_url":"https://api.github.com/users/mnagy/repos","events_url":"https://api.github.com/users/mnagy/events{/privacy}","received_events_url":"https://api.github.com/users/mnagy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mnagy/origin","description":"OpenShift 3 - build, deploy, and manage your applications with Docker and Kubernetes","fork":true,"url":"https://api.github.com/repos/mnagy/origin","forks_url":"https://api.github.com/repos/mnagy/origin/forks","keys_url":"https://api.github.com/repos/mnagy/origin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mnagy/origin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mnagy/origin/teams","hooks_url":"https://api.github.com/repos/mnagy/origin/hooks","issue_events_url":"https://api.github.com/repos/mnagy/origin/issues/events{/number}","events_url":"https://api.github.com/repos/mnagy/origin/events","assignees_url":"https://api.github.com/repos/mnagy/origin/assignees{/user}","branches_url":"https://api.github.com/repos/mnagy/origin/branches{/branch}","tags_url":"https://api.github.com/repos/mnagy/origin/tags","blobs_url":"https://api.github.com/repos/mnagy/origin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mnagy/origin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mnagy/origin/git/refs{/sha}","trees_url":"https://api.github.com/repos/mnagy/origin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mnagy/origin/statuses/{sha}","languages_url":"https://api.github.com/repos/mnagy/origin/languages","stargazers_url":"https://api.github.com/repos/mnagy/origin/stargazers","contributors_url":"https://api.github.com/repos/mnagy/origin/contributors","subscribers_url":"https://api.github.com/repos/mnagy/origin/subscribers","subscription_url":"https://api.github.com/repos/mnagy/origin/subscription","commits_url":"https://api.github.com/repos/mnagy/origin/commits{/sha}","git_commits_url":"https://api.github.com/repos/mnagy/origin/git/commits{/sha}","comments_url":"https://api.github.com/repos/mnagy/origin/comments{/number}","issue_comment_url":"https://api.github.com/repos/mnagy/origin/issues/comments{/number}","contents_url":"https://api.github.com/repos/mnagy/origin/contents/{+path}","compare_url":"https://api.github.com/repos/mnagy/origin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mnagy/origin/merges","archive_url":"https://api.github.com/repos/mnagy/origin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mnagy/origin/downloads","issues_url":"https://api.github.com/repos/mnagy/origin/issues{/number}","pulls_url":"https://api.github.com/repos/mnagy/origin/pulls{/number}","milestones_url":"https://api.github.com/repos/mnagy/origin/milestones{/number}","notifications_url":"https://api.github.com/repos/mnagy/origin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mnagy/origin/labels{/name}","releases_url":"https://api.github.com/repos/mnagy/origin/releases{/id}","created_at":"2015-01-19T10:37:11Z","updated_at":"2015-03-16T12:28:35Z","pushed_at":"2015-09-16T07:23:41Z","git_url":"git://github.com/mnagy/origin.git","ssh_url":"git@github.com:mnagy/origin.git","clone_url":"https://github.com/mnagy/origin.git","svn_url":"https://github.com/mnagy/origin","homepage":"https://openshift.github.io","size":138259,"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":"489995cbb508b121222b7884afc6cd134949dd04","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-09-15T16:17:31Z","pushed_at":"2015-09-16T07:23:43Z","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":222923,"stargazers_count":682,"watchers_count":682,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":410,"mirror_url":null,"open_issues_count":534,"forks":410,"open_issues":534,"watchers":682,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openshift/origin/pulls/4377"},"html":{"href":"https://github.com/openshift/origin/pull/4377"},"issue":{"href":"https://api.github.com/repos/openshift/origin/issues/4377"},"comments":{"href":"https://api.github.com/repos/openshift/origin/issues/4377/comments"},"review_comments":{"href":"https://api.github.com/repos/openshift/origin/pulls/4377/comments"},"review_comment":{"href":"https://api.github.com/repos/openshift/origin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openshift/origin/pulls/4377/commits"},"statuses":{"href":"https://api.github.com/repos/openshift/origin/statuses/61b4ed039c61a5293b9a3efa8cbec8a9c4da95b6"}}}}