{"action":"created","issue":{"url":"https://api.github.com/repos/StackStorm/st2/issues/3144","repository_url":"https://api.github.com/repos/StackStorm/st2","labels_url":"https://api.github.com/repos/StackStorm/st2/issues/3144/labels{/name}","comments_url":"https://api.github.com/repos/StackStorm/st2/issues/3144/comments","events_url":"https://api.github.com/repos/StackStorm/st2/issues/3144/events","html_url":"https://github.com/StackStorm/st2/pull/3144","id":198404765,"number":3144,"title":"Make st2-run-pack-tests install dependencies only on virtualenv creation","user":{"login":"dzimine","id":1294734,"avatar_url":"https://avatars.githubusercontent.com/u/1294734?v=3","gravatar_id":"","url":"https://api.github.com/users/dzimine","html_url":"https://github.com/dzimine","followers_url":"https://api.github.com/users/dzimine/followers","following_url":"https://api.github.com/users/dzimine/following{/other_user}","gists_url":"https://api.github.com/users/dzimine/gists{/gist_id}","starred_url":"https://api.github.com/users/dzimine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dzimine/subscriptions","organizations_url":"https://api.github.com/users/dzimine/orgs","repos_url":"https://api.github.com/users/dzimine/repos","events_url":"https://api.github.com/users/dzimine/events{/privacy}","received_events_url":"https://api.github.com/users/dzimine/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-01-03T03:24:40Z","updated_at":"2017-01-03T21:03:03Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/StackStorm/st2/pulls/3144","html_url":"https://github.com/StackStorm/st2/pull/3144","diff_url":"https://github.com/StackStorm/st2/pull/3144.diff","patch_url":"https://github.com/StackStorm/st2/pull/3144.patch"},"body":"A pack developer needs a faster way to run tests.\r\n\r\nWhen running without `-x` (the first time), setup everything. \r\nOn subsequent runs, provide `-x`, activate the virtualenv, skip dependencies, and just run tests.\r\n\r\nSample output:\r\n```\r\n$ /opt/stackstorm/st2/bin/st2-run-pack-tests  -p /opt/stackstorm/packs/csv/\r\nRunning tests for pack: csv\r\nCreating virtualenv in /tmp/st2-pack-tests-virtualenvs/csv...\r\nNew python executable in /tmp/st2-pack-tests-virtualenvs/csv/bin/python\r\nInstalling setuptools, pip, wheel...done.\r\nRequirement already up-to-date: pip in ./st2-pack-tests-virtualenvs/csv/lib/python2.7/site-packages\r\nInstalling dependencies from st2 repository...\r\nInstalling global pack test dependencies...\r\nRunning tests...\r\ntest_run_comma_delimiter (test_action_parse.ParseCSVActionTestCase) ... ok\r\ntest_run_pipe_delimiter (test_action_parse.ParseCSVActionTestCase) ... ok\r\n\r\n----------------------------------------------------------------------\r\nRan 2 tests in 0.352s\r\n\r\nOK\r\n\r\n$ /opt/stackstorm/st2/bin/st2-run-pack-tests  -x -p /opt/stackstorm/packs/csv/\r\nRunning tests for pack: csv\r\nActivating virtualenv in /tmp/st2-pack-tests-virtualenvs/csv...\r\nRunning tests...\r\ntest_run_comma_delimiter (test_action_parse.ParseCSVActionTestCase) ... ok\r\ntest_run_pipe_delimiter (test_action_parse.ParseCSVActionTestCase) ... ok\r\n\r\n----------------------------------------------------------------------\r\nRan 2 tests in 0.323s\r\n\r\nOK\r\n"},"comment":{"url":"https://api.github.com/repos/StackStorm/st2/issues/comments/270223841","html_url":"https://github.com/StackStorm/st2/pull/3144#issuecomment-270223841","issue_url":"https://api.github.com/repos/StackStorm/st2/issues/3144","id":270223841,"user":{"login":"dzimine","id":1294734,"avatar_url":"https://avatars.githubusercontent.com/u/1294734?v=3","gravatar_id":"","url":"https://api.github.com/users/dzimine","html_url":"https://github.com/dzimine","followers_url":"https://api.github.com/users/dzimine/followers","following_url":"https://api.github.com/users/dzimine/following{/other_user}","gists_url":"https://api.github.com/users/dzimine/gists{/gist_id}","starred_url":"https://api.github.com/users/dzimine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dzimine/subscriptions","organizations_url":"https://api.github.com/users/dzimine/orgs","repos_url":"https://api.github.com/users/dzimine/repos","events_url":"https://api.github.com/users/dzimine/events{/privacy}","received_events_url":"https://api.github.com/users/dzimine/received_events","type":"User","site_admin":false},"created_at":"2017-01-03T21:03:03Z","updated_at":"2017-01-03T21:03:03Z","body":"Before I redo it with an extra flag:\r\n\r\nis there a better direction for a pack developer writing unit tests? \r\nThe current one (or at least what I figured, as we don't have it documented yet) will require a user to 1) `git clone http://.../st2.git /tmp/st2` 2) `export ST2_REPO_PATH=/tmp/st2`\r\nIf not too hard, I'd rather spare them from this setup step, assuming they do the tests on machine with st2 already installing. Give me a hint I'll explore."}}
{"actor":{"display_login":"dzimine"}}