You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
** Expected Behavior**
TestInitCli.test_name_required fails when running pytest locally.
** Actual Behavior**
The unit test should be successful.
Steps To Reproduce the Problem
Describe in as much detail as possible how to reproduce the problem.
Steps to reproduce the behavior:
Go to PyCharm
Navigate to test_cli.py -> test_name_required()
Run the unit test
See error
Stack Trace
Testing started at 5:16 PM ...
/Users/jngo/virtualenv/vsdk-dev/bin/python2.7 "/Applications/PyCharm CE.app/Contents/plugins/python-ce/helpers/pycharm/_jb_pytest_runner.py" --target test_cli.py::TestInitCli.test_name_required
Launching pytest with arguments test_cli.py::TestInitCli::test_name_required in /Users/jngo/Documents/workspace/vsdk/tools/src/test/python/dlpx/virtualization/_internal
============================= test session starts ==============================
platform darwin -- Python 2.7.13, pytest-4.6.9, py-1.8.1, pluggy-0.13.1 -- /Users/jngo/virtualenv/vsdk-dev/bin/python2.7
cachedir: .pytest_cache
rootdir: /Users/jngo/Documents/workspace/vsdk/tools
plugins: cov-2.8.1
collecting ... collected 1 item
test_cli.py::TestInitCli::test_name_required FAILED [100%]
src/test/python/dlpx/virtualization/_internal/test_cli.py:198 (TestInitCli.test_name_required)
@staticmethod
def test_name_required():
runner = click_testing.CliRunner()
result = runner.invoke(cli.delphix_sdk, ['init'])
> assert result.exit_code != 0
E assert 0 != 0
test_cli.py:205: AssertionError
Assertion failed
Assertion failed
Assertion failed
Assertion failed
Assertion failed
Assertion failed
Assertion failed
=================================== FAILURES ===================================
________________________ TestInitCli.test_name_required ________________________
@staticmethod
def test_name_required():
runner = click_testing.CliRunner()
result = runner.invoke(cli.delphix_sdk, ['init'])
> assert result.exit_code != 0
E assert 0 != 0
test_cli.py:205: AssertionError
------------------------------ Captured log call -------------------------------
DEBUG dlpx.virtualization._internal:logging_util.py:29 Console logging configured with logging level 30
INFO dlpx.virtualization._internal.commands.initialize:initialize.py:54 Initializing directory: /Users/jngo/Documents/workspace/vsdk/tools/src/test/python/dlpx/virtualization/_internal
DEBUG dlpx.virtualization._internal.commands.initialize:initialize.py:60 init parameters: {'Ingestion Strategy': 'DIRECT', 'Root': '/Users/jngo/Documents/workspace/vsdk/tools/src/test/python/dlpx/virtualization/_internal', 'Name': None, 'Host Types': 'UNIX'}
INFO dlpx.virtualization._internal.file_util:file_util.py:53 Validating files and directories to be written do not exist.
DEBUG dlpx.virtualization._internal.file_util:file_util.py:57 SUCCESS: Path '/Users/jngo/Documents/workspace/vsdk/tools/src/test/python/dlpx/virtualization/_internal/plugin_config.yml' does not exist.
DEBUG dlpx.virtualization._internal.file_util:file_util.py:57 SUCCESS: Path '/Users/jngo/Documents/workspace/vsdk/tools/src/test/python/dlpx/virtualization/_internal/schema.json' does not exist.
DEBUG dlpx.virtualization._internal.file_util:file_util.py:57 SUCCESS: Path '/Users/jngo/Documents/workspace/vsdk/tools/src/test/python/dlpx/virtualization/_internal/src' does not exist.
DEBUG dlpx.virtualization._internal.commands.initialize:initialize.py:76 Using cf7bb70c-e811-4992-9685-273824b02cd0 as the plugin id.
DEBUG dlpx.virtualization._internal.commands.initialize:initialize.py:90 Using plugin_runner:plugin as the plugin's entry point.
INFO dlpx.virtualization._internal.commands.initialize:initialize.py:96 Creating source directory at '/Users/jngo/Documents/workspace/vsdk/tools/src/test/python/dlpx/virtualization/_internal/src'.
INFO dlpx.virtualization._internal.commands.initialize:initialize.py:104 Writing schema file at /Users/jngo/Documents/workspace/vsdk/tools/src/test/python/dlpx/virtualization/_internal/schema.json.
INFO dlpx.virtualization._internal.schema_validator:schema_validator.py:41 Reading plugin schema file /Users/jngo/Documents/workspace/vsdk/tools/src/test/python/dlpx/virtualization/_internal/schema.json
DEBUG dlpx.virtualization._internal.schema_validator:schema_validator.py:47 Validating plugin schema file content : {u'sourceConfigDefinition': {u'identityFields': [u'name'], u'required': [u'name'], u'nameField': u'name', u'additionalProperties': False, u'type': u'object', u'properties': {u'name': {u'type': u'string'}}}, u'virtualSourceDefinition': {u'additionalProperties': False, u'type': u'object', u'properties': {}}, u'snapshotDefinition': {u'additionalProperties': False, u'type': u'object', u'properties': {}}, u'linkedSourceDefinition': {u'additionalProperties': False, u'type': u'object', u'properties': {}}, u'repositoryDefinition': {u'identityFields': [u'name'], u'type': u'object', u'properties': {u'name': {u'type': u'string'}}, u'nameField': u'name'}, u'snapshotParametersDefinition': {u'additionalProperties': False, u'type': u'object', u'properties': {}}}
INFO dlpx.virtualization._internal.codegen:codegen.py:63 Creating new output directory: /Users/jngo/Documents/workspace/vsdk/tools/src/test/python/dlpx/virtualization/_internal/.dvp-gen-output
DEBUG dlpx.virtualization._internal.file_util:file_util.py:136 Successfully created directory '/Users/jngo/Documents/workspace/vsdk/tools/src/test/python/dlpx/virtualization/_internal/.dvp-gen-output'
INFO dlpx.virtualization._internal.codegen:codegen.py:70 Writing the swagger file in /Users/jngo/Documents/workspace/vsdk/tools/src/test/python/dlpx/virtualization/_internal/.dvp-gen-output
INFO dlpx.virtualization._internal.codegen:codegen.py:99 Writing swagger file to /Users/jngo/Documents/workspace/vsdk/tools/src/test/python/dlpx/virtualization/_internal/.dvp-gen-output/swagger.json
INFO dlpx.virtualization._internal.codegen:codegen.py:79 Executing swagger codegen generate with swagger file /Users/jngo/Documents/workspace/vsdk/tools/src/test/python/dlpx/virtualization/_internal/.dvp-gen-output/swagger.json
INFO dlpx.virtualization._internal.codegen:codegen.py:158 Running process with arguments: 'java -jar /Users/jngo/virtualenv/vsdk-dev/lib/python2.7/site-packages/dlpx/virtualization/_internal/codegen/swagger-codegen-cli-2.3.1.jar generate -DsupportPython2=true -i /Users/jngo/Documents/workspace/vsdk/tools/src/test/python/dlpx/virtualization/_internal/.dvp-gen-output/swagger.json -l python-flask -c /Users/jngo/virtualenv/vsdk-dev/lib/python2.7/site-packages/dlpx/virtualization/_internal/codegen/codegen-config.json -t /Users/jngo/virtualenv/vsdk-dev/lib/python2.7/site-packages/dlpx/virtualization/_internal/codegen/templates --model-package definitions -o /Users/jngo/Documents/workspace/vsdk/tools/src/test/python/dlpx/virtualization/_internal/.dvp-gen-output'
INFO dlpx.virtualization._internal.codegen:codegen.py:185 stdout:
INFO dlpx.virtualization._internal.codegen:codegen.py:186 stderr: Unable to find a $JAVA_HOME at "/usr", continuing with system-provided Java...
[main] INFO io.swagger.parser.Swagger20Parser - reading from /Users/jngo/Documents/workspace/vsdk/tools/src/test/python/dlpx/virtualization/_internal/.dvp-gen-output/swagger.json
[main] INFO io.swagger.codegen.ignore.CodegenIgnoreProcessor - No .swagger-codegen-ignore file found.
[main] INFO io.swagger.codegen.AbstractGenerator - writing file /Users/jngo/Documents/workspace/vsdk/tools/src/test/python/dlpx/virtualization/_internal/.dvp-gen-output/generated/definitions/linked_source_definition.py
[main] INFO io.swagger.codegen.AbstractGenerator - writing file /Users/jngo/Documents/workspace/vsdk/tools/src/test/python/dlpx/virtualization/_internal/.dvp-gen-output/generated/definitions/repository_definition.py
[main] INFO io.swagger.codegen.AbstractGenerator - writing file /Users/jngo/Documents/workspace/vsdk/tools/src/test/python/dlpx/virtualization/_internal/.dvp-gen-output/generated/definitions/snapshot_definition.py
[main] INFO io.swagger.codegen.AbstractGenerator - writing file /Users/jngo/Documents/workspace/vsdk/tools/src/test/python/dlpx/virtualization/_internal/.dvp-gen-output/generated/definitions/snapshot_parameters_definition.py
[main] INFO io.swagger.codegen.AbstractGenerator - writing file /Users/jngo/Documents/workspace/vsdk/tools/src/test/python/dlpx/virtualization/_internal/.dvp-gen-output/generated/definitions/source_config_definition.py
[main] INFO io.swagger.codegen.AbstractGenerator - writing file /Users/jngo/Documents/workspace/vsdk/tools/src/test/python/dlpx/virtualization/_internal/.dvp-gen-output/generated/definitions/virtual_source_definition.py
[main] INFO io.swagger.codegen.AbstractGenerator - writing file /Users/jngo/Documents/workspace/vsdk/tools/src/test/python/dlpx/virtualization/_internal/.dvp-gen-output/README.md
[main] INFO io.swagger.codegen.AbstractGenerator - writing file /Users/jngo/Documents/workspace/vsdk/tools/src/test/python/dlpx/virtualization/_internal/.dvp-gen-output/setup.py
[main] INFO io.swagger.codegen.AbstractGenerator - writing file /Users/jngo/Documents/workspace/vsdk/tools/src/test/python/dlpx/virtualization/_internal/.dvp-gen-output/tox.ini
[main] INFO io.swagger.codegen.AbstractGenerator - writing file /Users/jngo/Documents/workspace/vsdk/tools/src/test/python/dlpx/virtualization/_internal/.dvp-gen-output/test-requirements.txt
[main] INFO io.swagger.codegen.AbstractGenerator - writing file /Users/jngo/Documents/workspace/vsdk/tools/src/test/python/dlpx/virtualization/_internal/.dvp-gen-output/requirements.txt
[main] INFO io.swagger.codegen.AbstractGenerator - writing file /Users/jngo/Documents/workspace/vsdk/tools/src/test/python/dlpx/virtualization/_internal/.dvp-gen-output/git_push.sh
[main] INFO io.swagger.codegen.AbstractGenerator - writing file /Users/jngo/Documents/workspace/vsdk/tools/src/test/python/dlpx/virtualization/_internal/.dvp-gen-output/.gitignore
[main] INFO io.swagger.codegen.AbstractGenerator - writing file /Users/jngo/Documents/workspace/vsdk/tools/src/test/python/dlpx/virtualization/_internal/.dvp-gen-output/.travis.yml
[main] INFO io.swagger.codegen.AbstractGenerator - writing file /Users/jngo/Documents/workspace/vsdk/tools/src/test/python/dlpx/virtualization/_internal/.dvp-gen-output/Dockerfile
[main] INFO io.swagger.codegen.AbstractGenerator - writing file /Users/jngo/Documents/workspace/vsdk/tools/src/test/python/dlpx/virtualization/_internal/.dvp-gen-output/.dockerignore
[main] INFO io.swagger.codegen.AbstractGenerator - writing file /Users/jngo/Documents/workspace/vsdk/tools/src/test/python/dlpx/virtualization/_internal/.dvp-gen-output/generated/__init__.py
[main] INFO io.swagger.codegen.AbstractGenerator - writing file /Users/jngo/Documents/workspace/vsdk/tools/src/test/python/dlpx/virtualization/_internal/.dvp-gen-output/generated/__main__.py
[main] INFO io.swagger.codegen.AbstractGenerator - writing file /Users/jngo/Documents/workspace/vsdk/tools/src/test/python/dlpx/virtualization/_internal/.dvp-gen-output/generated/encoder.py
[main] INFO io.swagger.codegen.AbstractGenerator - writing file /Users/jngo/Documents/workspace/vsdk/tools/src/test/python/dlpx/virtualization/_internal/.dvp-gen-output/generated/util.py
[main] INFO io.swagger.codegen.AbstractGenerator - writing file /Users/jngo/Documents/workspace/vsdk/tools/src/test/python/dlpx/virtualization/_internal/.dvp-gen-output/generated/controllers/__init__.py
[main] INFO io.swagger.codegen.AbstractGenerator - writing file /Users/jngo/Documents/workspace/vsdk/tools/src/test/python/dlpx/virtualization/_internal/.dvp-gen-output/generated/definitions/__init__.py
[main] INFO io.swagger.codegen.AbstractGenerator - writing file /Users/jngo/Documents/workspace/vsdk/tools/src/test/python/dlpx/virtualization/_internal/.dvp-gen-output/generated/definitions/base_model_.py
[main] INFO io.swagger.codegen.AbstractGenerator - writing file /Users/jngo/Documents/workspace/vsdk/tools/src/test/python/dlpx/virtualization/_internal/.dvp-gen-output/generated/test/__init__.py
[main] INFO io.swagger.codegen.AbstractGenerator - writing file /Users/jngo/Documents/workspace/vsdk/tools/src/test/python/dlpx/virtualization/_internal/.dvp-gen-output/generated/swagger/swagger.yaml
[main] INFO io.swagger.codegen.AbstractGenerator - writing file /Users/jngo/Documents/workspace/vsdk/tools/src/test/python/dlpx/virtualization/_internal/.dvp-gen-output/.swagger-codegen-ignore
[main] INFO io.swagger.codegen.AbstractGenerator - writing file /Users/jngo/Documents/workspace/vsdk/tools/src/test/python/dlpx/virtualization/_internal/.dvp-gen-output/.swagger-codegen/VERSION
INFO dlpx.virtualization._internal.codegen:codegen.py:89 Copying generated python files to source directory /Users/jngo/Documents/workspace/vsdk/tools/src/test/python/dlpx/virtualization/_internal/src
DEBUG dlpx.virtualization._internal.file_util:file_util.py:136 Successfully created directory '/Users/jngo/Documents/workspace/vsdk/tools/src/test/python/dlpx/virtualization/_internal/src/generated'
INFO dlpx.virtualization._internal.codegen:codegen.py:206 Copying generated files ['__init__.py', 'util.py', 'definitions'] from /Users/jngo/Documents/workspace/vsdk/tools/src/test/python/dlpx/virtualization/_internal/.dvp-gen-output/generated to /Users/jngo/Documents/workspace/vsdk/tools/src/test/python/dlpx/virtualization/_internal/src/generated.
INFO dlpx.virtualization._internal.codegen:codegen.py:228 Successfully copied file __init__.py.
INFO dlpx.virtualization._internal.codegen:codegen.py:228 Successfully copied file util.py.
INFO dlpx.virtualization._internal.codegen:codegen.py:216 Successfully copied directory definitions.
INFO dlpx.virtualization._internal.commands.initialize:initialize.py:121 Writing config file at /Users/jngo/Documents/workspace/vsdk/tools/src/test/python/dlpx/virtualization/_internal/plugin_config.yml.
INFO dlpx.virtualization._internal.commands.initialize:initialize.py:135 Writing entry file at /Users/jngo/Documents/workspace/vsdk/tools/src/test/python/dlpx/virtualization/_internal/src/plugin_runner.py.
=========================== 1 failed in 0.94 seconds ===========================
Process finished with exit code 0
Assertion failed
Assertion failed
Version
3.0.0.dev12
Additional Context
This test passes 100% when running unit tests after uploading to GitHub. It does not always reproduce locally. I've seen this test failure both running from eclipse and running pytest from command line via python -m pytest src/test.
The text was updated successfully, but these errors were encountered:
** Expected Behavior**
TestInitCli.test_name_required fails when running pytest locally.
** Actual Behavior**
The unit test should be successful.
Steps To Reproduce the Problem
Describe in as much detail as possible how to reproduce the problem.
Steps to reproduce the behavior:
Stack Trace
Version
3.0.0.dev12
Additional Context
This test passes 100% when running unit tests after uploading to GitHub. It does not always reproduce locally. I've seen this test failure both running from eclipse and running pytest from command line via
python -m pytest src/test
.The text was updated successfully, but these errors were encountered: