OpenStack in a snap!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

63 lines
2.0 KiB

  1. [tox]
  2. envlist = init_lint, init_unit, multipass
  3. skipsdist = True
  4. [testenv]
  5. basepython=python3
  6. install_command = pip install {opts} {packages}
  7. setenv =
  8. PATH = /snap/bin:{env:PATH}
  9. passenv = HOME TERM
  10. whitelist_externals =
  11. sudo
  12. /snap/bin/snapcraft
  13. [testenv:snap]
  14. # Testing environment for the gerrit gate. Named 'snap' to conform to
  15. # the requirements of the snap friendly job that we inherit from in
  16. # .zuul.yaml.
  17. basepython=python3
  18. deps = -r{toxinidir}/test-requirements.txt
  19. commands =
  20. {toxinidir}/tools/lxd_build.sh
  21. {toxinidir}/tests/basic-test.sh
  22. [testenv:multipass]
  23. # Default testing environment for a human operated machine. Builds the
  24. # snap in a multipass instance, then runs tests in a separate multipass
  25. # instance. This makes the fewest changes to your personal computer,
  26. # but is heavier on system requirements. For a more lightweight test,
  27. # use the "snap" environment above. Beware that you will wind up with
  28. # a lot of things installed, including potentially the locally built
  29. # version of MicroStack!
  30. deps = -r{toxinidir}/test-requirements.txt
  31. commands =
  32. {toxinidir}/tools/multipass_build.sh
  33. {toxinidir}/tests/basic-test.sh -m
  34. [testenv:basic]
  35. # Just run basic_test.sh, with multipass support.
  36. commands =
  37. {toxinidir}/tools/basic_setup.sh
  38. {toxinidir}/tests/basic-test.sh -m
  39. [testenv:init_lint]
  40. deps = -r{toxinidir}/tools/init/test-requirements.txt
  41. -r{toxinidir}/tools/init/requirements.txt
  42. commands = flake8 {toxinidir}/tools/init/init/
  43. [testenv:init_unit]
  44. deps = -r{toxinidir}/tools/init/test-requirements.txt
  45. -r{toxinidir}/tools/init/requirements.txt
  46. commands = stestr run {posargs}
  47. [testenv:browser]
  48. # Run browser tests. Assumes that you have the snap installed and
  49. # initialized locally, and a valid DISPLAY (install xvfb for a virtual
  50. # one).
  51. # TODO: figure out how to integrate this w/ multipass. (e.g. setup
  52. # port forwarding and call into the mulitpass machine.)
  53. deps = -r{toxinidir}/test-requirements.txt
  54. commands =
  55. {toxinidir}/tests/test_horizonlogin.py