There is quite a bit going on in this commit. Here is a high level description of all of the changes: * Improved the README to include information for running the integrations tests now that we have subcommand management support. * Change the clean script to also delete the build directory. * Removed requirement on the DCOS_PATH environment variable. We now assume the DCOS CLI installation directory based on the location of the dcos cli binary * Adds support for installing subcommand from python wheels. The packages are install under the 'subcommands' directory. * Extended the `dcos help` to look into the 'subcommands' directory for the excutables that extend the cli. * Fix the root `dcos` executable to not use the DCOS_PATH environment variable to discover subcommand. It now discovers subcommand based on the location of the root (`dcos`) executable. * Adds `dcos subcommand` for managing the installation, listing and the removal of subcommands. * Adds dependencies on pkginfo and virtualenv. We need pkginfo to query information about the package. We need virtualenv to create virtual environment for each subcommand installed.
10 lines
223 B
Python
10 lines
223 B
Python
from dcos.api import subcommand
|
|
|
|
|
|
def test_noun():
|
|
assert subcommand.noun("some/path/to/dcos-command") == "command"
|
|
|
|
|
|
def test_hyphen_noun():
|
|
assert subcommand.noun("some/path/to/dcos-sub-command") == "sub-command"
|