{"action":"created","issue":{"url":"https://api.github.com/repos/freeipa/freeipa/issues/310","repository_url":"https://api.github.com/repos/freeipa/freeipa","labels_url":"https://api.github.com/repos/freeipa/freeipa/issues/310/labels{/name}","comments_url":"https://api.github.com/repos/freeipa/freeipa/issues/310/comments","events_url":"https://api.github.com/repos/freeipa/freeipa/issues/310/events","html_url":"https://github.com/freeipa/freeipa/pull/310","id":193716000,"number":310,"title":"WIP: CLI testing","user":{"login":"mirielka","id":7926596,"avatar_url":"https://avatars0.githubusercontent.com/u/7926596?v=4","gravatar_id":"","url":"https://api.github.com/users/mirielka","html_url":"https://github.com/mirielka","followers_url":"https://api.github.com/users/mirielka/followers","following_url":"https://api.github.com/users/mirielka/following{/other_user}","gists_url":"https://api.github.com/users/mirielka/gists{/gist_id}","starred_url":"https://api.github.com/users/mirielka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mirielka/subscriptions","organizations_url":"https://api.github.com/users/mirielka/orgs","repos_url":"https://api.github.com/users/mirielka/repos","events_url":"https://api.github.com/users/mirielka/events{/privacy}","received_events_url":"https://api.github.com/users/mirielka/received_events","type":"User","site_admin":false},"labels":[{"id":539492816,"url":"https://api.github.com/repos/freeipa/freeipa/labels/postponed","name":"postponed","color":"fef2c0","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-12-06T08:57:34Z","updated_at":"2018-02-07T16:23:56Z","closed_at":"2018-02-07T16:23:56Z","author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/freeipa/freeipa/pulls/310","html_url":"https://github.com/freeipa/freeipa/pull/310","diff_url":"https://github.com/freeipa/freeipa/pull/310.diff","patch_url":"https://github.com/freeipa/freeipa/pull/310.patch"},"body":"Here is basic part of CLI testing for you to take a look at and provide feedback, before it's all done and polished up.\r\n\r\nHow it works: so far it's only tuned to run stageuser tests, so use `./make-tests ipatests/test_xmlrpc/test_stageuser_plugin.py --cli` to run in CLI mode, or of course without the --cli option to run original API tests. Note that last three tests are expected to fail in CLI mode as group tracker has not been modified for CLI testing yet.\r\n\r\nWhat gets changed: \r\n- '--cli' option is added\r\n- base tracker: changes that should ensure the basic functionality to run existing tests in CLI mode, this includes way how to execute commands and mapping of defined API options and output values to the CLI style (the idea of the mapping was to convert the text output from CLI to API style output so that more extensive methods to compare CLI output with expected values do not have to be created)\r\n- specific trackers: changes are needed because CLI calls have different output than API calls (some messages are different, some items of API output are not present in CLI). So far I've modified stageuser tracker fully (i.e. that one should be final) and user tracker partly (just so that stageuser tests that use user tracker work properly, but user tests will not work in CLI mode yet).\r\n- xmlrpc_test.py: unfortunately I failed to find a way how to raise the exception from subprocess so that it would fit the exception comparison using raises_exact method, so I chose to raise ExecutionError when it occurs in subprocess and compare just the error message in stderr. Since I expect the CLI tests to be run along with API tests, any change in type of raised error should be cought by API tests.\r\n\r\nSo far I observed:\r\n- positives: no tests need to be changed, all the necessary changes are in trackers (which was the intention)\r\n- negatives: only works for tracker based tests, i.e. not for declarative tests or tests that use just api.Command style; tests run longer that API tests\r\n\r\nSo please, if you have any comment and suggestions, I'll be glad to hear them so that I can polish this and finish the modifications."},"comment":{"url":"https://api.github.com/repos/freeipa/freeipa/issues/comments/363824248","html_url":"https://github.com/freeipa/freeipa/pull/310#issuecomment-363824248","issue_url":"https://api.github.com/repos/freeipa/freeipa/issues/310","id":363824248,"user":{"login":"pvoborni","id":5136843,"avatar_url":"https://avatars0.githubusercontent.com/u/5136843?v=4","gravatar_id":"","url":"https://api.github.com/users/pvoborni","html_url":"https://github.com/pvoborni","followers_url":"https://api.github.com/users/pvoborni/followers","following_url":"https://api.github.com/users/pvoborni/following{/other_user}","gists_url":"https://api.github.com/users/pvoborni/gists{/gist_id}","starred_url":"https://api.github.com/users/pvoborni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pvoborni/subscriptions","organizations_url":"https://api.github.com/users/pvoborni/orgs","repos_url":"https://api.github.com/users/pvoborni/repos","events_url":"https://api.github.com/users/pvoborni/events{/privacy}","received_events_url":"https://api.github.com/users/pvoborni/received_events","type":"User","site_admin":false},"created_at":"2018-02-07T16:23:56Z","updated_at":"2018-02-07T16:23:56Z","author_association":"OWNER","body":"This PR is pretty outdated and no development is happening. Therefore closing but also adding to: https://www.freeipa.org/page/Postponed "}}
{"actor":{"display_login":"pvoborni"}}