Commit Graph

8 Commits

Author SHA1 Message Date
Luigi Toscano 18921beb2e Test fixes: unittest.mock, better l-c job, pytest dep
Now only python 3 is supported, which means unittest.mock
can be used instead of the external mock module.
This change can be done thanks to the Horizon
change I2de669d8e89b8daeb7ee5405ffab35af6307c40b

Switch to openstack-lower-constraints-jobs-horizon
which pulls in the last horizon. The lower-constraint
version of horizon should be bumped when a new
version (post-18.2.0) is released.

Finally, add pytest to the set of test requirements
to prevent an missing import error (even through
the sahara scenario tests still need to be ported
to pytest).

Change-Id: I2c61e9d88b2d05c9f0b68066d7bb15b43cdf083f
2020-04-15 17:59:11 +02:00
Chuck Short d2fc81c0c5 Remove dead code
Now that mox has been removed we can remove the create_stubs
helper function as well.

Change-Id: I1c7c8e234013c28e3bbd20ba18e8bfab313a8533
Signed-off-by: Chuck Short <chucks@redhat.com>
2018-08-26 21:22:47 -04:00
Luigi Toscano 56b69d6477 Goodbye mox - no more needed
The porting to mock of sahara-dashboard is complete.
This fulfills the community goal
"Remove Use of mox/mox3 for Testing" set for Rocky:
https://governance.openstack.org/tc/goals/rocky/mox_removal.html

Raise the requirement to the Rocky M2 release of Horizon,
which drops the usage of mox by default (it should be
explicitly enabled). Without a forced import from Horizon
the mox dependencies can be dropped here.
Bump also a dependency needed by this new version of Horizon.

Change-Id: Iaf272af9919f8a69562c0a469130bbf8628936cf
2018-07-04 19:38:21 +02:00
Charles Short a262a42a94 Drop mox usage in SaharaApiTest
Apart of the mox3 community goal for Rocky.

Change-Id: I8f464e10f800eddfe0183fb3c2c152e37f001097
Signed-off-by: Charles Short <zulcss@gmail.com>
2018-05-13 09:27:34 -04:00
Charles Short 787cc08789 Mox removal for DataProcessingJobTests
Apart of the mox3 community goal for Rocky.

Change-Id: I90bde341d5a1c1ede967a76633385d336f2c563f
Signed-off-by: Charles Short <zulcss@gmail.com>
2018-04-26 22:19:21 -04:00
Luigi Toscano dd3f3c8810 Require the (soon-to-be) Rocky version of Horizon
... or at least the first published tarball which will lead to Rocky.
On the other side this means forcing the usage of mox as long as
there are tests that depends on it (the switch was already flipped
in Horizon, so it needs to be enabled here).

This allows us to depend on newer Horizon features, including changes
to the test suite that are useful for the mox removal effort.

Change-Id: Ibf95b642f49aee9b3165f46e0422ff6bf56e9391
2018-04-23 22:30:53 -04:00
Michael Ionkin 03c6802f66 Fix unit tests
unit tests failed because of patch in Horizon:
https://review.openstack.org/#/c/144152

Change-Id: I6a5f88219543fee25d08b41f6bbc967e5a6fdfa8
closes-bug: 1595194
2016-06-22 16:46:29 +03:00
David Lyle 6c5898813c Excising Sahara content from Horizon
This plugin moves the current content from the horizon repo to this
plugin repo. The code has been tested in a devstack install using the
following steps:

    1. packaging the plugin: "python setup.cfg sdist"
    2. pip installing the tar.gz in the resulting dist directory
    3.  a. (temporary step) remove existing sahara enabled files from
            horizon
            "rm openstack_dashboard/enabled/_18*.py"
        b. finding the install location and changing to it
            "cp sahara_dashboard/enabled/* /opt/stack/horizon/local/enabled"
    4. in /opt/stack/horizon
        a. python manage.py collectstatic
        b. python manage.py compress
    5. restarting the horizon server

Additionally, you can run the unit tests by:
    ./run_tests.sh

    Note: added script to programmatically remove the old configuration
    files from the targeted horizon install, either in venv or system
    install.

Known issues:
  1. running tests locally emits missing neutron service messages.
  2. plugin code for devstack needs to be added
  3. README is inadequate
  4. integration tests are still in horizon repo
  5. local copy of run_tests is heavy weight, but a better solution is
     not available currently.
  6. localization tooling and strings

Change-Id: Icdce2d3e945e612d368556dd5cea1930194c7b67
2015-11-30 16:40:44 -07:00