diff options
author | Abhijeet Kasurde <akasurde@redhat.com> | 2020-06-25 07:58:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-25 07:58:56 +0200 |
commit | 3fe48ecba25b284b6feff2c6631b6a4bf4d80407 (patch) | |
tree | b46074bff2f09398ae4ef0e070be8b396c03fead /test/units | |
parent | Code cleanup for ansible-test coverage support. (diff) | |
download | ansible-3fe48ecba25b284b6feff2c6631b6a4bf4d80407.tar.xz ansible-3fe48ecba25b284b6feff2c6631b6a4bf4d80407.zip |
Add collection path in CLI version info (#68633)
This will provide user default path of collection
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
Diffstat (limited to 'test/units')
-rw-r--r-- | test/units/cli/arguments/test_optparse_helpers.py | 1 | ||||
-rw-r--r-- | test/units/cli/test_adhoc.py | 7 | ||||
-rw-r--r-- | test/units/cli/test_cli.py | 2 |
3 files changed, 6 insertions, 4 deletions
diff --git a/test/units/cli/arguments/test_optparse_helpers.py b/test/units/cli/arguments/test_optparse_helpers.py index 0e80fba996..894f3bf8c8 100644 --- a/test/units/cli/arguments/test_optparse_helpers.py +++ b/test/units/cli/arguments/test_optparse_helpers.py @@ -29,6 +29,7 @@ VERSION_OUTPUT = opt_help.version(prog=FAKE_PROG) u'config file = %s' % C.CONFIG_FILE, u'configured module search path = %s' % cpath, u'ansible python module location = %s' % ':'.join(ansible_path), + u'ansible collection location = %s' % ':'.join(C.COLLECTIONS_PATHS), u'executable location = ', u'python version = %s' % ''.join(sys.version.splitlines()), ] diff --git a/test/units/cli/test_adhoc.py b/test/units/cli/test_adhoc.py index 0e7475c603..b660993bff 100644 --- a/test/units/cli/test_adhoc.py +++ b/test/units/cli/test_adhoc.py @@ -104,10 +104,11 @@ def test_ansible_version(capsys, mocker): # Python 2.6 does return a named tuple, so get the first item version_lines = version[0].splitlines() - assert len(version_lines) == 6, 'Incorrect number of lines in "ansible --version" output' + assert len(version_lines) == 7, 'Incorrect number of lines in "ansible --version" output' assert re.match('ansible [0-9.a-z]+$', version_lines[0]), 'Incorrect ansible version line in "ansible --version" output' assert re.match(' config file = .*$', version_lines[1]), 'Incorrect config file line in "ansible --version" output' assert re.match(' configured module search path = .*$', version_lines[2]), 'Incorrect module search path in "ansible --version" output' assert re.match(' ansible python module location = .*$', version_lines[3]), 'Incorrect python module location in "ansible --version" output' - assert re.match(' executable location = .*$', version_lines[4]), 'Incorrect executable locaction in "ansible --version" output' - assert re.match(' python version = .*$', version_lines[5]), 'Incorrect python version in "ansible --version" output' + assert re.match(' ansible collection location = .*$', version_lines[4]), 'Incorrect collection location in "ansible --version" output' + assert re.match(' executable location = .*$', version_lines[5]), 'Incorrect executable locaction in "ansible --version" output' + assert re.match(' python version = .*$', version_lines[6]), 'Incorrect python version in "ansible --version" output' diff --git a/test/units/cli/test_cli.py b/test/units/cli/test_cli.py index 6dcd9e35b1..09445a2573 100644 --- a/test/units/cli/test_cli.py +++ b/test/units/cli/test_cli.py @@ -61,7 +61,7 @@ class TestCliBuildVaultIds(unittest.TestCase): self.assertEqual(res, []) def test_no_vault_id_no_auto_prompt(self): - # similate 'ansible-playbook site.yml' with out --ask-vault-pass, should not prompt + # simulate 'ansible-playbook site.yml' with out --ask-vault-pass, should not prompt res = cli.CLI.build_vault_ids([], auto_prompt=False) self.assertEqual(res, []) |