ansible-playbook-bundle
ansible-playbook-bundle copied to clipboard
need unit tests
Need to add nose unit tests.
@jmrodri What will be tested in nose tests? Can you write them out here so we can track the work.
- add test/test_cli.py
- test
subcmd_list_parser(subcmd)verify proper output, and handling of errors - test
subcmd_build_parser(subcmd)verify proper output, and handling of errors - test
subcmd_init_parser(subcmd)verify proper output, and handling of errors - test
subcmd_prepare_parser(subcmd)verify proper output, and handling of errors - test
subcmd_push_parser(subcmd)verify proper output, and handling of errors - test
subcmd_remove_parser(subcmd)verify proper output, and handling of errors - test
subcmd_bootstrap_parser(subcmd)verify proper output, and handling of errors - test
subcmd_help_parser(subcmd)verify proper output, and handling of errors - test
main()verify proper output, and handling of errors
- test
- add test/test_engine.py
- test
load_dockerfile(df_path)verify proper output, and handling of errors - test
convert_params_to_dict(params)verify proper output, and handling of errors - test `load_example_specfile(apb_dict, verify proper output, and handling of errors
- test `write_file(file_out, verify proper output, and handling of errors
- test `insert_encoded_spec(dockerfile, verify proper output, and handling of errors
- test
mkdir_p(path)verify proper output, and handling of errors - test `write_playbook(project_dir, verify proper output, and handling of errors
- test `write_role(project_path, verify proper output, and handling of errors
- test `generate_playbook_files(project_path, verify proper output, and handling of errors
- test `gen_spec_id(spec, verify proper output, and handling of errors
- test
is_valid_spec(spec)verify proper output, and handling of errors - test
load_spec_dict(spec_path)verify proper output, and handling of errors - test
load_spec_str(spec_path)verify proper output, and handling of errors - test `get_spec(project, verify proper output, and handling of errors
- test
make_friendly(blob)verify proper output, and handling of errors - test `touch(fname, verify proper output, and handling of errors
- test `update_spec(project, verify proper output, and handling of errors
- test
update_dockerfile(project)verify proper output, and handling of errors - test
load_source_dependencies(roles_path)verify proper output, and handling of errors - test
get_asb_route()verify proper output, and handling of errors - test `broker_request(broker, verify proper output, and handling of errors
- test
cmdrun_list(**kwargs)verify proper output, and handling of errors - test
cmdrun_init(**kwargs)verify proper output, and handling of errors - test
cmdrun_prepare(**kwargs)verify proper output, and handling of errors - test
cmdrun_build(**kwargs)verify proper output, and handling of errors - test
cmdrun_push(**kwargs)verify proper output, and handling of errors - test
cmdrun_remove(**kwargs)verify proper output, and handling of errors - test
cmdrun_bootstrap(**kwargs)verify proper output, and handling of errors
- test
Scripts to generate output for above comment:
grep def engine.py | grep -v SPEC_FILE_PARAM | sed 's/def /test `/' | sed 's/:$/`/g' | awk '{print " * "$1" "$2" verify proper output, and handling of errors"}'
grep def cli.py | grep -v SPEC_FILE_PARAM | sed 's/def /test `/' | sed 's/:$/`/g' | awk '{print " * "$1" "$2" verify proper output, and handling of errors"}'
Given apb rpm is doa on fedora distro (e.g. #78), I think this needs to happen ASAP so contributors and release engineers have some confidence in the codebase.
First steps towards this: https://github.com/fusor/ansible-playbook-bundle/pull/101