Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tools/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
version = version_file.read().strip()

install_requires = [
"click >= 7.0",
"click >= 7.1",
"click-configfile == 0.2.3",
"dvp-platform == {}".format(version),
"enum34 >= 1.1.6",
Expand Down
92 changes: 46 additions & 46 deletions tools/src/test/python/dlpx/virtualization/_internal/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,14 +318,14 @@ def test_file_not_exist(plugin_config_file):
['build', '-c', plugin_config_file])

assert result.exit_code == 2
assert result.output == (u'Usage: delphix-sdk build [OPTIONS]'
u'\nTry "delphix-sdk build -h" for help.'
u'\n'
u'\nError: Invalid value for "-c" /'
u' "--plugin-config": File'
u' "/not/a/real/file/plugin_config.yml"'
u' does not exist.'
u'\n')
assert result.output == (u"Usage: delphix-sdk build [OPTIONS]"
u"\nTry 'delphix-sdk build -h' for help."
u"\n"
u"\nError: Invalid value for '-c' /"
u" '--plugin-config': File"
u" '/not/a/real/file/plugin_config.yml'"
u" does not exist."
u"\n")

@staticmethod
def test_option_a_and_g_set(plugin_config_file, artifact_file):
Expand Down Expand Up @@ -470,14 +470,14 @@ def test_file_not_exist(artifact_file):
])

assert result.exit_code == 2
assert result.output == (u'Usage: delphix-sdk upload [OPTIONS]'
u'\nTry "delphix-sdk upload -h" for help.'
u'\n'
u'\nError: Invalid value for "-a" /'
u' "--upload-artifact": File'
u' "/not/a/real/file/artifact.json"'
u' does not exist.'
u'\n')
assert result.output == (u"Usage: delphix-sdk upload [OPTIONS]"
u"\nTry 'delphix-sdk upload -h' for help."
u"\n"
u"\nError: Invalid value for '-a' /"
u" '--upload-artifact': File"
u" '/not/a/real/file/artifact.json'"
u" does not exist."
u"\n")

@staticmethod
@mock.patch('dlpx.virtualization._internal.commands.upload.upload')
Expand Down Expand Up @@ -538,8 +538,8 @@ def test_with_config_file_fail(artifact_file):
assert result.exit_code == 2
assert result.output == (u'Usage: delphix-sdk upload [OPTIONS]\n'
u'\n'
u'Error: Invalid value for "-e" / '
u'"--engine": Option is required '
u'Error: Invalid value for \'-e\' / '
u'\'--engine\': Option is required '
u'and must be specified via the command line.'
u'\n')

Expand Down Expand Up @@ -601,12 +601,12 @@ def test_missing_params():

assert result.exit_code == 2
assert result.output == (
u'Usage: delphix-sdk download-logs [OPTIONS]\n'
u'\n'
u'Error: Invalid value for "-e" / '
u'"--engine": Option is required '
u'and must be specified via the command line.'
u'\n')
u"Usage: delphix-sdk download-logs [OPTIONS]\n"
u"\n"
u"Error: Invalid value for '-e' / "
u"'--engine': Option is required "
u"and must be specified via the command line."
u"\n")

@staticmethod
@mock.patch(
Expand Down Expand Up @@ -655,14 +655,14 @@ def test_directory_not_exist(directory):

assert result.exit_code == 2
assert result.output == (
u'Usage: delphix-sdk download-logs [OPTIONS]'
u'\nTry "delphix-sdk download-logs -h" for help.'
u'\n'
u'\nError: Invalid value for "-d" /'
u' "--directory": Directory'
u' "/not/a/real/directory"'
u' does not exist.'
u'\n')
u"Usage: delphix-sdk download-logs [OPTIONS]"
u"\nTry 'delphix-sdk download-logs -h' for help."
u"\n"
u"\nError: Invalid value for '-d' /"
u" '--directory': Directory"
u" '/not/a/real/directory'"
u" does not exist."
u"\n")

@staticmethod
@pytest.mark.parametrize('plugin_config_file',
Expand All @@ -681,14 +681,14 @@ def test_file_not_exist(plugin_config_file):

assert result.exit_code == 2
assert result.output == (
u'Usage: delphix-sdk download-logs [OPTIONS]'
u'\nTry "delphix-sdk download-logs -h" for help.'
u'\n'
u'\nError: Invalid value for "-c" /'
u' "--plugin-config": File'
u' "/not/a/real/file/plugin_config.yml"'
u' does not exist.'
u'\n')
u"Usage: delphix-sdk download-logs [OPTIONS]"
u"\nTry 'delphix-sdk download-logs -h' for help."
u"\n"
u"\nError: Invalid value for '-c' /"
u" '--plugin-config': File"
u" '/not/a/real/file/plugin_config.yml'"
u" does not exist."
u"\n")

@staticmethod
@mock.patch(
Expand Down Expand Up @@ -750,9 +750,9 @@ def test_with_config_file_fail(plugin_config_file, dvp_config_file):

assert result.exit_code == 2
assert result.output == (
u'Usage: delphix-sdk download-logs [OPTIONS]\n'
u'\n'
u'Error: Invalid value for "-e" / '
u'"--engine": Option is required '
u'and must be specified via the command line.'
u'\n')
u"Usage: delphix-sdk download-logs [OPTIONS]\n"
u"\n"
u"Error: Invalid value for '-e' / "
u"'--engine': Option is required "
u"and must be specified via the command line."
u"\n")