re-enable test_cli in package builds

Bug #1455651 reported by Scott Moser
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init
Expired
Medium
Dan Watkins

Bug Description

revision 1106 made tests in test_cli.py get skipped if there was no bin/cloud-init.

that was because package builds would fail, like:

======================================================================
ERROR: test_no_arguments_shows_error_message (unittests.test_cli.TestCLI)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/tests/unittests/test_cli.py", line 46, in test_no_arguments_shows_error_message
    self._call_main()
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/tests/unittests/test_cli.py", line 28, in _call_main
    'cli', open('bin/cloud-init'), '', ('', 'r', imp.PY_SOURCE))
FileNotFoundError: [Errno 2] No such file or directory: 'bin/cloud-init'

Scott Moser (smoser)
Changed in cloud-init:
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → Dan Watkins (daniel-thewatkins)
Revision history for this message
Dan Watkins (oddbloke) wrote :

Scott, the best way of handling this is probably to make bin/cloud-init a tiny wrapper around something that's part of the library (i.e. just move the vast majority of the contents to cloudinit.cli or cloudinit.main). Does that sound like a sensible approach?

Revision history for this message
James Falcon (falcojr) wrote :
Changed in cloud-init:
status: Confirmed → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.