{"action":"created","comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/runtimes-common/pulls/comments/94661950","pull_request_review_id":15194305,"id":94661950,"diff_hunk":"@@ -0,0 +1,92 @@\n+#!/usr/bin/python\n+\n+# Copyright 2016 Google Inc. All rights reserved.\n+\n+# Licensed under the Apache License, Version 2.0 (the \"License\");\n+# you may not use this file except in compliance with the License.\n+# You may obtain a copy of the License at\n+\n+# http://www.apache.org/licenses/LICENSE-2.0\n+\n+# Unless required by applicable law or agreed to in writing, software\n+# distributed under the License is distributed on an \"AS IS\" BASIS,\n+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+# See the License for the specific language governing permissions and\n+# limitations under the License.\n+\n+import argparse\n+import logging\n+import sys\n+\n+import deploy_app\n+import test_exception\n+import test_logging\n+import test_monitoring\n+import test_root\n+\n+# TODO (nkubala): make this a configurable parameter from cloudbuild\n+# required to be paired with '--no-deploy'\n+DEFAULT_URL = 'https://nick-cloudbuild.appspot.com'\n+\n+\n+def _main():\n+    logging.getLogger().setLevel(logging.DEBUG)\n+\n+    parser = argparse.ArgumentParser()\n+    parser.add_argument('--image', '-i', help='Newly-constructed base \\\n+                        image to build sample app on')\n+\n+    parser.add_argument('--directory', '-d', help='Root directory of \\\n+                        sample app')\n+    # TODO (nkubala): potentially add support for multiple app directories\n+    # to deploy\n+    # parser.add_argument('--directory', '-d', help='Root directory of \\\n+    #                     sample app', action='append')\n+    parser.add_argument('--no-deploy', action='store_true',","path":"integration_tests/testsuite/driver.py","position":null,"original_position":45,"commit_id":"d33d98e70fcd667b132bf22697d618342651452d","original_commit_id":"24a76a853a58cc5b2674b192bda53e6c89de3b20","user":{"login":"nkubala","id":5531168,"avatar_url":"https://avatars.githubusercontent.com/u/5531168?v=3","gravatar_id":"","url":"https://api.github.com/users/nkubala","html_url":"https://github.com/nkubala","followers_url":"https://api.github.com/users/nkubala/followers","following_url":"https://api.github.com/users/nkubala/following{/other_user}","gists_url":"https://api.github.com/users/nkubala/gists{/gist_id}","starred_url":"https://api.github.com/users/nkubala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nkubala/subscriptions","organizations_url":"https://api.github.com/users/nkubala/orgs","repos_url":"https://api.github.com/users/nkubala/repos","events_url":"https://api.github.com/users/nkubala/events{/privacy}","received_events_url":"https://api.github.com/users/nkubala/received_events","type":"User","site_admin":false},"body":"ahh yeah that looks much cleaner. thanks!","created_at":"2017-01-04T20:46:34Z","updated_at":"2017-01-04T20:46:34Z","html_url":"https://github.com/GoogleCloudPlatform/runtimes-common/pull/73#discussion_r94661950","pull_request_url":"https://api.github.com/repos/GoogleCloudPlatform/runtimes-common/pulls/73","_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/runtimes-common/pulls/comments/94661950"},"html":{"href":"https://github.com/GoogleCloudPlatform/runtimes-common/pull/73#discussion_r94661950"},"pull_request":{"href":"https://api.github.com/repos/GoogleCloudPlatform/runtimes-common/pulls/73"}}},"pull_request":{"url":"https://api.github.com/repos/GoogleCloudPlatform/runtimes-common/pulls/73","id":96983896,"html_url":"https://github.com/GoogleCloudPlatform/runtimes-common/pull/73","diff_url":"https://github.com/GoogleCloudPlatform/runtimes-common/pull/73.diff","patch_url":"https://github.com/GoogleCloudPlatform/runtimes-common/pull/73.patch","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/runtimes-common/issues/73","number":73,"state":"open","locked":false,"title":"[WIP] Integration Testing Framework","user":{"login":"nkubala","id":5531168,"avatar_url":"https://avatars.githubusercontent.com/u/5531168?v=3","gravatar_id":"","url":"https://api.github.com/users/nkubala","html_url":"https://github.com/nkubala","followers_url":"https://api.github.com/users/nkubala/followers","following_url":"https://api.github.com/users/nkubala/following{/other_user}","gists_url":"https://api.github.com/users/nkubala/gists{/gist_id}","starred_url":"https://api.github.com/users/nkubala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nkubala/subscriptions","organizations_url":"https://api.github.com/users/nkubala/orgs","repos_url":"https://api.github.com/users/nkubala/repos","events_url":"https://api.github.com/users/nkubala/events{/privacy}","received_events_url":"https://api.github.com/users/nkubala/received_events","type":"User","site_admin":false},"body":"**As of 12/7/16, this code is a work in progress. This PR is only intended to start conversation around code design and general implementation.**\r\n\r\nThis is the first iteration of a silver language runtime cloudbuild integration testing framework. The general idea is that each runtime will provide a sample application that serves HTTP request on a set of endpoints (full spec for this to come); each of these endpoints will perform a specific action that tests one component of the runtime. \r\n\r\nExample: the test driver will POST a `log_name` and a `token` to the endpoint `/logging` on the sample application; the app should then create a log entry with the specified data, and write it to Stackdriver logs. The test driver will then read log entries from Stackdriver and verify this log entry was created correctly.\r\n\r\nAll that needs to be provided to the framework is a Dockerfile (and any necessary resources) that comprise the sample application. The test driver will build this container on top of the newly-built runtime image, deploy it to GAE (currently Flex, though Standard as well as GKE will likely be supported in the future), and run tests against the publicly exposed domain (usually `http://<project_id>.appspot.com`).\r\n\r\nFor the record, this is **not** meant as a replacement for all integration tests; rather, a supplement to cover all of the basic integrations that all the silver language runtimes should satisfy. Each runtime will probably still have other more complex integration tests that are run in the CI/CD process; those can be run alongside this framework as normal.\r\n\r\n@dlorenc @sharifelgamal ","created_at":"2016-12-07T18:49:33Z","updated_at":"2017-01-04T20:46:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b6529d05bf92ee179dda84251a8b9462ee87dc4b","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/GoogleCloudPlatform/runtimes-common/pulls/73/commits","review_comments_url":"https://api.github.com/repos/GoogleCloudPlatform/runtimes-common/pulls/73/comments","review_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/runtimes-common/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/runtimes-common/issues/73/comments","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/runtimes-common/statuses/d33d98e70fcd667b132bf22697d618342651452d","head":{"label":"nkubala:integration","ref":"integration","sha":"d33d98e70fcd667b132bf22697d618342651452d","user":{"login":"nkubala","id":5531168,"avatar_url":"https://avatars.githubusercontent.com/u/5531168?v=3","gravatar_id":"","url":"https://api.github.com/users/nkubala","html_url":"https://github.com/nkubala","followers_url":"https://api.github.com/users/nkubala/followers","following_url":"https://api.github.com/users/nkubala/following{/other_user}","gists_url":"https://api.github.com/users/nkubala/gists{/gist_id}","starred_url":"https://api.github.com/users/nkubala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nkubala/subscriptions","organizations_url":"https://api.github.com/users/nkubala/orgs","repos_url":"https://api.github.com/users/nkubala/repos","events_url":"https://api.github.com/users/nkubala/events{/privacy}","received_events_url":"https://api.github.com/users/nkubala/received_events","type":"User","site_admin":false},"repo":{"id":70737492,"name":"runtimes-common","full_name":"nkubala/runtimes-common","owner":{"login":"nkubala","id":5531168,"avatar_url":"https://avatars.githubusercontent.com/u/5531168?v=3","gravatar_id":"","url":"https://api.github.com/users/nkubala","html_url":"https://github.com/nkubala","followers_url":"https://api.github.com/users/nkubala/followers","following_url":"https://api.github.com/users/nkubala/following{/other_user}","gists_url":"https://api.github.com/users/nkubala/gists{/gist_id}","starred_url":"https://api.github.com/users/nkubala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nkubala/subscriptions","organizations_url":"https://api.github.com/users/nkubala/orgs","repos_url":"https://api.github.com/users/nkubala/repos","events_url":"https://api.github.com/users/nkubala/events{/privacy}","received_events_url":"https://api.github.com/users/nkubala/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nkubala/runtimes-common","description":null,"fork":true,"url":"https://api.github.com/repos/nkubala/runtimes-common","forks_url":"https://api.github.com/repos/nkubala/runtimes-common/forks","keys_url":"https://api.github.com/repos/nkubala/runtimes-common/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nkubala/runtimes-common/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nkubala/runtimes-common/teams","hooks_url":"https://api.github.com/repos/nkubala/runtimes-common/hooks","issue_events_url":"https://api.github.com/repos/nkubala/runtimes-common/issues/events{/number}","events_url":"https://api.github.com/repos/nkubala/runtimes-common/events","assignees_url":"https://api.github.com/repos/nkubala/runtimes-common/assignees{/user}","branches_url":"https://api.github.com/repos/nkubala/runtimes-common/branches{/branch}","tags_url":"https://api.github.com/repos/nkubala/runtimes-common/tags","blobs_url":"https://api.github.com/repos/nkubala/runtimes-common/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nkubala/runtimes-common/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nkubala/runtimes-common/git/refs{/sha}","trees_url":"https://api.github.com/repos/nkubala/runtimes-common/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nkubala/runtimes-common/statuses/{sha}","languages_url":"https://api.github.com/repos/nkubala/runtimes-common/languages","stargazers_url":"https://api.github.com/repos/nkubala/runtimes-common/stargazers","contributors_url":"https://api.github.com/repos/nkubala/runtimes-common/contributors","subscribers_url":"https://api.github.com/repos/nkubala/runtimes-common/subscribers","subscription_url":"https://api.github.com/repos/nkubala/runtimes-common/subscription","commits_url":"https://api.github.com/repos/nkubala/runtimes-common/commits{/sha}","git_commits_url":"https://api.github.com/repos/nkubala/runtimes-common/git/commits{/sha}","comments_url":"https://api.github.com/repos/nkubala/runtimes-common/comments{/number}","issue_comment_url":"https://api.github.com/repos/nkubala/runtimes-common/issues/comments{/number}","contents_url":"https://api.github.com/repos/nkubala/runtimes-common/contents/{+path}","compare_url":"https://api.github.com/repos/nkubala/runtimes-common/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nkubala/runtimes-common/merges","archive_url":"https://api.github.com/repos/nkubala/runtimes-common/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nkubala/runtimes-common/downloads","issues_url":"https://api.github.com/repos/nkubala/runtimes-common/issues{/number}","pulls_url":"https://api.github.com/repos/nkubala/runtimes-common/pulls{/number}","milestones_url":"https://api.github.com/repos/nkubala/runtimes-common/milestones{/number}","notifications_url":"https://api.github.com/repos/nkubala/runtimes-common/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nkubala/runtimes-common/labels{/name}","releases_url":"https://api.github.com/repos/nkubala/runtimes-common/releases{/id}","deployments_url":"https://api.github.com/repos/nkubala/runtimes-common/deployments","created_at":"2016-10-12T20:12:35Z","updated_at":"2016-10-13T19:13:25Z","pushed_at":"2017-01-04T20:46:13Z","git_url":"git://github.com/nkubala/runtimes-common.git","ssh_url":"git@github.com:nkubala/runtimes-common.git","clone_url":"https://github.com/nkubala/runtimes-common.git","svn_url":"https://github.com/nkubala/runtimes-common","homepage":null,"size":1483,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":false,"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":"GoogleCloudPlatform:master","ref":"master","sha":"27dae795137f27d80d5940f633fec1b308c208ea","user":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"repo":{"id":67721213,"name":"runtimes-common","full_name":"GoogleCloudPlatform/runtimes-common","owner":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GoogleCloudPlatform/runtimes-common","description":null,"fork":false,"url":"https://api.github.com/repos/GoogleCloudPlatform/runtimes-common","forks_url":"https://api.github.com/repos/GoogleCloudPlatform/runtimes-common/forks","keys_url":"https://api.github.com/repos/GoogleCloudPlatform/runtimes-common/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleCloudPlatform/runtimes-common/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleCloudPlatform/runtimes-common/teams","hooks_url":"https://api.github.com/repos/GoogleCloudPlatform/runtimes-common/hooks","issue_events_url":"https://api.github.com/repos/GoogleCloudPlatform/runtimes-common/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleCloudPlatform/runtimes-common/events","assignees_url":"https://api.github.com/repos/GoogleCloudPlatform/runtimes-common/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleCloudPlatform/runtimes-common/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleCloudPlatform/runtimes-common/tags","blobs_url":"https://api.github.com/repos/GoogleCloudPlatform/runtimes-common/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleCloudPlatform/runtimes-common/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleCloudPlatform/runtimes-common/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleCloudPlatform/runtimes-common/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/runtimes-common/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleCloudPlatform/runtimes-common/languages","stargazers_url":"https://api.github.com/repos/GoogleCloudPlatform/runtimes-common/stargazers","contributors_url":"https://api.github.com/repos/GoogleCloudPlatform/runtimes-common/contributors","subscribers_url":"https://api.github.com/repos/GoogleCloudPlatform/runtimes-common/subscribers","subscription_url":"https://api.github.com/repos/GoogleCloudPlatform/runtimes-common/subscription","commits_url":"https://api.github.com/repos/GoogleCloudPlatform/runtimes-common/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleCloudPlatform/runtimes-common/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/runtimes-common/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/runtimes-common/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleCloudPlatform/runtimes-common/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleCloudPlatform/runtimes-common/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleCloudPlatform/runtimes-common/merges","archive_url":"https://api.github.com/repos/GoogleCloudPlatform/runtimes-common/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleCloudPlatform/runtimes-common/downloads","issues_url":"https://api.github.com/repos/GoogleCloudPlatform/runtimes-common/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleCloudPlatform/runtimes-common/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleCloudPlatform/runtimes-common/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleCloudPlatform/runtimes-common/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/runtimes-common/labels{/name}","releases_url":"https://api.github.com/repos/GoogleCloudPlatform/runtimes-common/releases{/id}","deployments_url":"https://api.github.com/repos/GoogleCloudPlatform/runtimes-common/deployments","created_at":"2016-09-08T16:33:38Z","updated_at":"2016-11-16T18:23:38Z","pushed_at":"2017-01-04T20:46:15Z","git_url":"git://github.com/GoogleCloudPlatform/runtimes-common.git","ssh_url":"git@github.com:GoogleCloudPlatform/runtimes-common.git","clone_url":"https://github.com/GoogleCloudPlatform/runtimes-common.git","svn_url":"https://github.com/GoogleCloudPlatform/runtimes-common","homepage":null,"size":1426,"stargazers_count":4,"watchers_count":4,"language":"Python","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":8,"forks":7,"open_issues":8,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/runtimes-common/pulls/73"},"html":{"href":"https://github.com/GoogleCloudPlatform/runtimes-common/pull/73"},"issue":{"href":"https://api.github.com/repos/GoogleCloudPlatform/runtimes-common/issues/73"},"comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/runtimes-common/issues/73/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/runtimes-common/pulls/73/comments"},"review_comment":{"href":"https://api.github.com/repos/GoogleCloudPlatform/runtimes-common/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GoogleCloudPlatform/runtimes-common/pulls/73/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleCloudPlatform/runtimes-common/statuses/d33d98e70fcd667b132bf22697d618342651452d"}}}}
{"actor":{"display_login":"nkubala"}}