{"action":"opened","number":4,"pull_request":{"url":"https://api.github.com/repos/autopilotpattern/testing/pulls/4","id":75986075,"html_url":"https://github.com/autopilotpattern/testing/pull/4","diff_url":"https://github.com/autopilotpattern/testing/pull/4.diff","patch_url":"https://github.com/autopilotpattern/testing/pull/4.patch","issue_url":"https://api.github.com/repos/autopilotpattern/testing/issues/4","number":4,"state":"open","locked":false,"title":"Use docker and docker-compose clients directly","user":{"login":"tgross","id":1409219,"avatar_url":"https://avatars.githubusercontent.com/u/1409219?v=3","gravatar_id":"","url":"https://api.github.com/users/tgross","html_url":"https://github.com/tgross","followers_url":"https://api.github.com/users/tgross/followers","following_url":"https://api.github.com/users/tgross/following{/other_user}","gists_url":"https://api.github.com/users/tgross/gists{/gist_id}","starred_url":"https://api.github.com/users/tgross/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tgross/subscriptions","organizations_url":"https://api.github.com/users/tgross/orgs","repos_url":"https://api.github.com/users/tgross/repos","events_url":"https://api.github.com/users/tgross/events{/privacy}","received_events_url":"https://api.github.com/users/tgross/received_events","type":"User","site_admin":false},"body":"@misterbisson this is a big bunch of changes that'll have us using `docker-compose` and `docker` directly, rather than using the Remote API.\r\n\r\n\r\nPreviously we were using the Python Docker client library, dockerpty-py, and the compose library in the test rig because these give us a little bit more \"direct\" API access. But in addition to these being not very\r\ngood libraries, it fails us from a testing standpoint. We don't *want* to test the Remote API (which is presumably well-tested by our core engineering team), we want to test using the actual client binaries that Docker, Inc. provides.\r\n\r\nSo instead of using these libs to make API calls as we were, this PR makes `subprocess.Popen` calls to Docker or Compose. A nice added advantage is that we'll be able to test against multiple versions of the client in parallel if we want, and that it's easier to instrument the client calls. This lets us have a test output that looks like this:\r\n\r\n```\r\n----------------------------------------------------------------------\r\nWorkshopStackTest.test_scaleup_scaledown\r\n----------------------------------------------------------------------\r\nelapsed         | task\r\n1.59338212013   | docker-compose -f docker-compose.yml -p workshop up -d\r\n0.244590044022  | docker-compose -f docker-compose.yml -p workshop ps\r\n0.059956073761  | docker inspect workshop_consul_1\r\n0.112968921661  | docker exec workshop_nginx_1 cat /etc/nginx/nginx.conf\r\n0.135507106781  | docker exec workshop_nginx_1 cat /etc/nginx/nginx.conf\r\n0.876389026642  | docker-compose -f docker-compose.yml -p workshop scale sales=3\r\n0.134047031403  | docker exec workshop_nginx_1 cat /etc/nginx/nginx.conf\r\n0.136224031448  | docker exec workshop_nginx_1 cat /etc/nginx/nginx.conf\r\n0.152096986771  | docker exec workshop_nginx_1 cat /etc/nginx/nginx.conf\r\n0.146039009094  | docker exec workshop_nginx_1 cat /etc/nginx/nginx.conf\r\n0.293953895569  | docker-compose -f docker-compose.yml -p workshop ps -q sales\r\n0.149887084961  | docker exec 144d544563041a0893a7634eafe3a3 ip -o addr\r\n0.151185035706  | docker exec 2cbac1b0b815762476af825c417b90 ip -o addr\r\n0.140347003937  | docker exec 3dc7e2d2f3ee225815a8decb07ae65 ip -o addr\r\n0.625655889511  | docker-compose -f docker-compose.yml -p workshop scale sales=2\r\n0.12455701828   | docker exec workshop_nginx_1 cat /etc/nginx/nginx.conf\r\n0.139688014984  | docker exec workshop_nginx_1 cat /etc/nginx/nginx.conf\r\n0.154396057129  | docker exec workshop_nginx_1 cat /etc/nginx/nginx.conf\r\n0.234007120132  | docker-compose -f docker-compose.yml -p workshop ps -q sales\r\n0.110437870026  | docker exec 144d544563041a0893a7634eafe3a3 ip -o addr\r\n0.0947268009186 | docker exec 2cbac1b0b815762476af825c417b90 ip -o addr\r\n1.67618107796   | docker-compose -f docker-compose.yml -p workshop stop\r\n0.260026931763  | docker-compose -f docker-compose.yml -p workshop rm -f\r\n.\r\n----------------------------------------------------------------------\r\nRan 1 test in 37.142s\r\n\r\nOK\r\n```","created_at":"2016-07-01T14:13:24Z","updated_at":"2016-07-01T14:13:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/autopilotpattern/testing/pulls/4/commits","review_comments_url":"https://api.github.com/repos/autopilotpattern/testing/pulls/4/comments","review_comment_url":"https://api.github.com/repos/autopilotpattern/testing/pulls/comments{/number}","comments_url":"https://api.github.com/repos/autopilotpattern/testing/issues/4/comments","statuses_url":"https://api.github.com/repos/autopilotpattern/testing/statuses/baf5ca105513dff83986f3489c2bc0d7747291b9","head":{"label":"autopilotpattern:direct_client","ref":"direct_client","sha":"baf5ca105513dff83986f3489c2bc0d7747291b9","user":{"login":"autopilotpattern","id":17654958,"avatar_url":"https://avatars.githubusercontent.com/u/17654958?v=3","gravatar_id":"","url":"https://api.github.com/users/autopilotpattern","html_url":"https://github.com/autopilotpattern","followers_url":"https://api.github.com/users/autopilotpattern/followers","following_url":"https://api.github.com/users/autopilotpattern/following{/other_user}","gists_url":"https://api.github.com/users/autopilotpattern/gists{/gist_id}","starred_url":"https://api.github.com/users/autopilotpattern/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/autopilotpattern/subscriptions","organizations_url":"https://api.github.com/users/autopilotpattern/orgs","repos_url":"https://api.github.com/users/autopilotpattern/repos","events_url":"https://api.github.com/users/autopilotpattern/events{/privacy}","received_events_url":"https://api.github.com/users/autopilotpattern/received_events","type":"Organization","site_admin":false},"repo":{"id":59122660,"name":"testing","full_name":"autopilotpattern/testing","owner":{"login":"autopilotpattern","id":17654958,"avatar_url":"https://avatars.githubusercontent.com/u/17654958?v=3","gravatar_id":"","url":"https://api.github.com/users/autopilotpattern","html_url":"https://github.com/autopilotpattern","followers_url":"https://api.github.com/users/autopilotpattern/followers","following_url":"https://api.github.com/users/autopilotpattern/following{/other_user}","gists_url":"https://api.github.com/users/autopilotpattern/gists{/gist_id}","starred_url":"https://api.github.com/users/autopilotpattern/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/autopilotpattern/subscriptions","organizations_url":"https://api.github.com/users/autopilotpattern/orgs","repos_url":"https://api.github.com/users/autopilotpattern/repos","events_url":"https://api.github.com/users/autopilotpattern/events{/privacy}","received_events_url":"https://api.github.com/users/autopilotpattern/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/autopilotpattern/testing","description":"Tools for automated testing of Autopilot Pattern applications","fork":false,"url":"https://api.github.com/repos/autopilotpattern/testing","forks_url":"https://api.github.com/repos/autopilotpattern/testing/forks","keys_url":"https://api.github.com/repos/autopilotpattern/testing/keys{/key_id}","collaborators_url":"https://api.github.com/repos/autopilotpattern/testing/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/autopilotpattern/testing/teams","hooks_url":"https://api.github.com/repos/autopilotpattern/testing/hooks","issue_events_url":"https://api.github.com/repos/autopilotpattern/testing/issues/events{/number}","events_url":"https://api.github.com/repos/autopilotpattern/testing/events","assignees_url":"https://api.github.com/repos/autopilotpattern/testing/assignees{/user}","branches_url":"https://api.github.com/repos/autopilotpattern/testing/branches{/branch}","tags_url":"https://api.github.com/repos/autopilotpattern/testing/tags","blobs_url":"https://api.github.com/repos/autopilotpattern/testing/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/autopilotpattern/testing/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/autopilotpattern/testing/git/refs{/sha}","trees_url":"https://api.github.com/repos/autopilotpattern/testing/git/trees{/sha}","statuses_url":"https://api.github.com/repos/autopilotpattern/testing/statuses/{sha}","languages_url":"https://api.github.com/repos/autopilotpattern/testing/languages","stargazers_url":"https://api.github.com/repos/autopilotpattern/testing/stargazers","contributors_url":"https://api.github.com/repos/autopilotpattern/testing/contributors","subscribers_url":"https://api.github.com/repos/autopilotpattern/testing/subscribers","subscription_url":"https://api.github.com/repos/autopilotpattern/testing/subscription","commits_url":"https://api.github.com/repos/autopilotpattern/testing/commits{/sha}","git_commits_url":"https://api.github.com/repos/autopilotpattern/testing/git/commits{/sha}","comments_url":"https://api.github.com/repos/autopilotpattern/testing/comments{/number}","issue_comment_url":"https://api.github.com/repos/autopilotpattern/testing/issues/comments{/number}","contents_url":"https://api.github.com/repos/autopilotpattern/testing/contents/{+path}","compare_url":"https://api.github.com/repos/autopilotpattern/testing/compare/{base}...{head}","merges_url":"https://api.github.com/repos/autopilotpattern/testing/merges","archive_url":"https://api.github.com/repos/autopilotpattern/testing/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/autopilotpattern/testing/downloads","issues_url":"https://api.github.com/repos/autopilotpattern/testing/issues{/number}","pulls_url":"https://api.github.com/repos/autopilotpattern/testing/pulls{/number}","milestones_url":"https://api.github.com/repos/autopilotpattern/testing/milestones{/number}","notifications_url":"https://api.github.com/repos/autopilotpattern/testing/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/autopilotpattern/testing/labels{/name}","releases_url":"https://api.github.com/repos/autopilotpattern/testing/releases{/id}","deployments_url":"https://api.github.com/repos/autopilotpattern/testing/deployments","created_at":"2016-05-18T14:24:05Z","updated_at":"2016-06-14T14:22:24Z","pushed_at":"2016-07-01T14:13:24Z","git_url":"git://github.com/autopilotpattern/testing.git","ssh_url":"git@github.com:autopilotpattern/testing.git","clone_url":"https://github.com/autopilotpattern/testing.git","svn_url":"https://github.com/autopilotpattern/testing","homepage":null,"size":24,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"autopilotpattern:master","ref":"master","sha":"691d39110e9494bd2b368248980b33ef9c97f2a4","user":{"login":"autopilotpattern","id":17654958,"avatar_url":"https://avatars.githubusercontent.com/u/17654958?v=3","gravatar_id":"","url":"https://api.github.com/users/autopilotpattern","html_url":"https://github.com/autopilotpattern","followers_url":"https://api.github.com/users/autopilotpattern/followers","following_url":"https://api.github.com/users/autopilotpattern/following{/other_user}","gists_url":"https://api.github.com/users/autopilotpattern/gists{/gist_id}","starred_url":"https://api.github.com/users/autopilotpattern/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/autopilotpattern/subscriptions","organizations_url":"https://api.github.com/users/autopilotpattern/orgs","repos_url":"https://api.github.com/users/autopilotpattern/repos","events_url":"https://api.github.com/users/autopilotpattern/events{/privacy}","received_events_url":"https://api.github.com/users/autopilotpattern/received_events","type":"Organization","site_admin":false},"repo":{"id":59122660,"name":"testing","full_name":"autopilotpattern/testing","owner":{"login":"autopilotpattern","id":17654958,"avatar_url":"https://avatars.githubusercontent.com/u/17654958?v=3","gravatar_id":"","url":"https://api.github.com/users/autopilotpattern","html_url":"https://github.com/autopilotpattern","followers_url":"https://api.github.com/users/autopilotpattern/followers","following_url":"https://api.github.com/users/autopilotpattern/following{/other_user}","gists_url":"https://api.github.com/users/autopilotpattern/gists{/gist_id}","starred_url":"https://api.github.com/users/autopilotpattern/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/autopilotpattern/subscriptions","organizations_url":"https://api.github.com/users/autopilotpattern/orgs","repos_url":"https://api.github.com/users/autopilotpattern/repos","events_url":"https://api.github.com/users/autopilotpattern/events{/privacy}","received_events_url":"https://api.github.com/users/autopilotpattern/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/autopilotpattern/testing","description":"Tools for automated testing of Autopilot Pattern applications","fork":false,"url":"https://api.github.com/repos/autopilotpattern/testing","forks_url":"https://api.github.com/repos/autopilotpattern/testing/forks","keys_url":"https://api.github.com/repos/autopilotpattern/testing/keys{/key_id}","collaborators_url":"https://api.github.com/repos/autopilotpattern/testing/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/autopilotpattern/testing/teams","hooks_url":"https://api.github.com/repos/autopilotpattern/testing/hooks","issue_events_url":"https://api.github.com/repos/autopilotpattern/testing/issues/events{/number}","events_url":"https://api.github.com/repos/autopilotpattern/testing/events","assignees_url":"https://api.github.com/repos/autopilotpattern/testing/assignees{/user}","branches_url":"https://api.github.com/repos/autopilotpattern/testing/branches{/branch}","tags_url":"https://api.github.com/repos/autopilotpattern/testing/tags","blobs_url":"https://api.github.com/repos/autopilotpattern/testing/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/autopilotpattern/testing/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/autopilotpattern/testing/git/refs{/sha}","trees_url":"https://api.github.com/repos/autopilotpattern/testing/git/trees{/sha}","statuses_url":"https://api.github.com/repos/autopilotpattern/testing/statuses/{sha}","languages_url":"https://api.github.com/repos/autopilotpattern/testing/languages","stargazers_url":"https://api.github.com/repos/autopilotpattern/testing/stargazers","contributors_url":"https://api.github.com/repos/autopilotpattern/testing/contributors","subscribers_url":"https://api.github.com/repos/autopilotpattern/testing/subscribers","subscription_url":"https://api.github.com/repos/autopilotpattern/testing/subscription","commits_url":"https://api.github.com/repos/autopilotpattern/testing/commits{/sha}","git_commits_url":"https://api.github.com/repos/autopilotpattern/testing/git/commits{/sha}","comments_url":"https://api.github.com/repos/autopilotpattern/testing/comments{/number}","issue_comment_url":"https://api.github.com/repos/autopilotpattern/testing/issues/comments{/number}","contents_url":"https://api.github.com/repos/autopilotpattern/testing/contents/{+path}","compare_url":"https://api.github.com/repos/autopilotpattern/testing/compare/{base}...{head}","merges_url":"https://api.github.com/repos/autopilotpattern/testing/merges","archive_url":"https://api.github.com/repos/autopilotpattern/testing/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/autopilotpattern/testing/downloads","issues_url":"https://api.github.com/repos/autopilotpattern/testing/issues{/number}","pulls_url":"https://api.github.com/repos/autopilotpattern/testing/pulls{/number}","milestones_url":"https://api.github.com/repos/autopilotpattern/testing/milestones{/number}","notifications_url":"https://api.github.com/repos/autopilotpattern/testing/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/autopilotpattern/testing/labels{/name}","releases_url":"https://api.github.com/repos/autopilotpattern/testing/releases{/id}","deployments_url":"https://api.github.com/repos/autopilotpattern/testing/deployments","created_at":"2016-05-18T14:24:05Z","updated_at":"2016-06-14T14:22:24Z","pushed_at":"2016-07-01T14:13:24Z","git_url":"git://github.com/autopilotpattern/testing.git","ssh_url":"git@github.com:autopilotpattern/testing.git","clone_url":"https://github.com/autopilotpattern/testing.git","svn_url":"https://github.com/autopilotpattern/testing","homepage":null,"size":24,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/autopilotpattern/testing/pulls/4"},"html":{"href":"https://github.com/autopilotpattern/testing/pull/4"},"issue":{"href":"https://api.github.com/repos/autopilotpattern/testing/issues/4"},"comments":{"href":"https://api.github.com/repos/autopilotpattern/testing/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/autopilotpattern/testing/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/autopilotpattern/testing/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/autopilotpattern/testing/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/autopilotpattern/testing/statuses/baf5ca105513dff83986f3489c2bc0d7747291b9"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":6,"additions":246,"deletions":232,"changed_files":2}}
{"actor":{"display_login":"tgross"}}