Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mgr/ssh: add make check integration #31523

Merged
merged 1 commit into from Nov 15, 2019

Conversation

sebastian-philipp
Copy link
Contributor

@sebastian-philipp sebastian-philipp commented Nov 11, 2019

Extracted from #30262

Might be able to drop the cmake integration, if we #30364 is in.

Signed-off-by: Sebastian Wagner sebastian.wagner@suse.com

Depends on:

Checklist

  • References tracker ticket
  • Updates documentation if necessary
  • Includes tests for new functionality or reproducer for bug

Show available Jenkins commands
  • jenkins retest this please
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard backend
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox



if 'UNITTEST' not in os.environ:
from .module import SSHOrchestrator
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couldn't we patch the module where the tests are executed? Mixing the mocking code and the real code in one file doesn't look very nice imo.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have that problem that we can't import .module as some base classes are generated in C++ and thus will fail with a NameError. Do you have a better idea?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hm. no.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #31561

@sebastian-philipp
Copy link
Contributor Author

sebastian-philipp commented Nov 13, 2019

@tchaikov what do you think. would it be ok to just add remoto as a dependency in the mgr's ../requirements.txt in order to simplify testing this module? We have to have the dependency for make check anyway.

@liewegas
Copy link
Member

ImportError while importing test module '/home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/ssh/tests/test_ssh.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
__init__.py:14: in <module>
    from mock import Mock, MagicMock
E   ImportError: No module named mock
!!!!!!!!!!!!!!!!!!! Interrupted: 1 errors during collection !!!!!!!!!!!!!!!!!!!!

@sebastian-philipp
Copy link
Contributor Author

ImportError while importing test module '/home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/ssh/tests/test_ssh.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
__init__.py:14: in <module>
    from mock import Mock, MagicMock
E   ImportError: No module named mock
!!!!!!!!!!!!!!!!!!! Interrupted: 1 errors during collection !!!!!!!!!!!!!!!!!!!!

Fixed in https://github.com/ceph/ceph/pull/31561/files#diff-5f73b53794fdc79745e3723b3947f73cR2

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants