Giter Site home page Giter Site logo

django / django-box Goto Github PK

View Code? Open in Web Editor NEW
68.0 68.0 22.0 217 KB

VM to run the Django test suite. ARCHIVED Please use https://github.com/django/django-docker-box

License: BSD 3-Clause "New" or "Revised" License

Ruby 13.52% Shell 32.24% Python 54.24%

django-box's Introduction

Django

Django is a high-level Python web framework that encourages rapid development and clean, pragmatic design. Thanks for checking it out.

All documentation is in the "docs" directory and online at https://docs.djangoproject.com/en/stable/. If you're just getting started, here's how we recommend you read the docs:

  • First, read docs/intro/install.txt for instructions on installing Django.
  • Next, work through the tutorials in order (docs/intro/tutorial01.txt, docs/intro/tutorial02.txt, etc.).
  • If you want to set up an actual deployment server, read docs/howto/deployment/index.txt for instructions.
  • You'll probably want to read through the topical guides (in docs/topics) next; from there you can jump to the HOWTOs (in docs/howto) for specific problems, and check out the reference (docs/ref) for gory details.
  • See docs/README for instructions on building an HTML version of the docs.

Docs are updated rigorously. If you find any problems in the docs, or think they should be clarified in any way, please take 30 seconds to fill out a ticket here: https://code.djangoproject.com/newticket

To get more help:

To contribute to Django:

To run Django's test suite:

Supporting the Development of Django

Django's development depends on your contributions.

If you depend on Django, remember to support the Django Software Foundation: https://www.djangoproject.com/fundraising/

django-box's People

Contributors

ashchristopher avatar grue avatar jarshwah avatar jdunck avatar jphalip avatar myszon avatar ramiro avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

django-box's Issues

dd error when building box

Using b7765b6 I hit the same problem as #12 and am trying to build a box using

VAGRANT_VAGRANTFILE=Vagrantfile-build vagrant up

Everything goes well all the way through ansible provisioning, but I then get:

PLAY RECAP *********************************************************************
default                    : ok=56   changed=51   unreachable=0    failed=0

==> default: Running provisioner: shell...
    default: Running: inline script
==> default: mesg: ttyname failed: Inappropriate ioctl for device
==> default: Reading package lists...
==> default: Building dependency tree...
==> default: Reading state information...
==> default: W
==> default: :
==> default: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/dl_google_com_linux_chrome_deb.list:1 and /etc/apt/sources.list.d/google-chrome.list:3
==> default: W
==> default: :
==> default: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/dl_google_com_linux_chrome_deb.list:1 and /etc/apt/sources.list.d/google-chrome.list:3
==> default: W
==> default: :
==> default: Target Translations (main/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list.d/dl_google_com_linux_chrome_deb.list:1 and /etc/apt/sources.list.d/google-chrome.list:3
==> default: W
==> default: :
==> default: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list.d/dl_google_com_linux_chrome_deb.list:1 and /etc/apt/sources.list.d/google-chrome.list:3
==> default: W
==> default: :
==> default: Target Translations (main/i18n/Translation-en_GB) is configured multiple times in /etc/apt/sources.list.d/dl_google_com_linux_chrome_deb.list:1 and /etc/apt/sources.list.d/google-chrome.list:3
==> default: 35165107+0 records in
==> default: 35165107+0 records out
==> default: 36009069568 bytes (36 GB, 34 GiB) copied, 93.241 s, 386 MB/s
==> default: 404196+0 records in
==> default: 404196+0 records out
==> default: 413896704 bytes (414 MB, 395 MiB) copied, 1.48731 s, 278 MB/s
==> default: dd:
==> default: writing to '/dev/dm-1'
==> default: : No space left on device
==> default: 1048577+0 records in
==> default: 1048576+0 records out
==> default: 536870912 bytes (537 MB, 512 MiB) copied, 14.2287 s, 37.7 MB/s
==> default: Setting up swapspace version 1, size = 512 MiB (536866816 bytes)
==> default: no label, UUID=393fe33a-8094-49f4-8f28-e69ff6ff9a93

This is using Vagrant 1.8.5 and VirtualBox 5.1.4 on OS X 10.11.6.

My django repo is checked out at 14879ac.

Figure out a better way of generating runtest aliases

As of 500668c the ansible provisioner will now rely on tox from /django to provide virtualenvironments and requirements files for each environment. In an effort to avoid repetition I've generated each alias using nested variables:

tox -c /django/tox.ini -e py{{ (10 * item.0)|round|int }}{{ ("-" + item.1)|replace("-sqlite3", "") }} --

The problem with this is that it's extremely brittle, particularly the replace() filter that removes -sqlite3 from the tox environment name if it exists. This is currently necessary because the py{2,3} environments are natively sqlite anyway. The tox file hasn't been designed with this vagrant image in mind.

I've tried to match up the database names with the aliases and settings module names with as little processing required. I don't think we can just reuse the sqlite name, because those settings already exist within the test/ directory. Perhaps the explicit PYTHONPATH will take precedence though?

Can't run the tests (several errors) on Windows

Hi,

Following the README.md, I was able to setup the vagrant VM, but the test commands don't work.

I downloaded the box manually from https://www.djangoproject.com/m/vms/djangocore-box-1.1.box (I have an unstable and slow connection, and stupidly, atlas.hashicorp doesn't support resuming downloads). I run Windows 10 64 bits, Virtualbox 5.0.20.

Disclaimer : I never used vagrant boxes before, so maybe I missed an implicit step.

~$ runtests2.7-mysql

fails with

Please install test dependencies first:
$ pip install -r requirements/py2.txt

Then

~$ pip install -r /django/tests/requirements/py2.txt

fails with

Exception:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/pip/basecommand.py", line 139, in main
    status = self.run(options, args)
  File "/usr/local/lib/python2.7/dist-packages/pip/commands/install.py", line 240, in run
    for req in parse_requirements(filename, finder=finder, options=options):
  File "/usr/local/lib/python2.7/dist-packages/pip/req.py", line 1314, in parse_requirements
    for item in parse_requirements(req_url, finder, comes_from=filename, options=options):
  File "/usr/local/lib/python2.7/dist-packages/pip/req.py", line 1356, in parse_requirements
    req = InstallRequirement.from_line(line, comes_from)
  File "/usr/local/lib/python2.7/dist-packages/pip/req.py", line 118, in from_line
    return cls(req, comes_from, url=url)
  File "/usr/local/lib/python2.7/dist-packages/pip/req.py", line 43, in __init__
    req = pkg_resources.Requirement.parse(req)
  File "/usr/local/lib/python2.7/dist-packages/distribute-0.6.35-py2.7.egg/pkg_resources.py", line 2680, in parse
    reqs = list(parse_requirements(s))
  File "/usr/local/lib/python2.7/dist-packages/distribute-0.6.35-py2.7.egg/pkg_resources.py", line 2605, in parse_requirements
    line, p, specs = scan_list(VERSION,LINE_END,line,p,(1,2),"version spec")
  File "/usr/local/lib/python2.7/dist-packages/distribute-0.6.35-py2.7.egg/pkg_resources.py", line 2573, in scan_list
    raise ValueError("Expected "+item_name+" in",line,"at",line[p:])
ValueError: ('Expected version spec in', "pylibmc; sys.platform != 'win32'", 'at', "; sys.platform != 'win32'")

Python3.3 tests have another problem :

~$ runtests3.3-mysql

fails with

Traceback (most recent call last):
  File "/django/tests/runtests.py", line 13, in <module>
    from django.apps import apps
  File "/django/django/apps/__init__.py", line 1, in <module>
    from .config import AppConfig
  File "/django/django/apps/config.py", line 6, in <module>
    from django.utils.module_loading import module_has_submodule
  File "/django/django/utils/module_loading.py", line 67, in <module>
    from importlib.util import find_spec as importlib_find
ImportError: cannot import name find_spec

Selenium tests fail

Selenium tests currently do not work.
Run with the command runtests27-sqlite3 admin_widgets --selenium chrome or directly from the django test directory with ./runtests.py admin_widgets --selenium chrome
they fail with one of these errors:

======================================================================
ERROR: test_many_to_many (admin_widgets.tests.AdminRawIdWidgetSeleniumTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.5/unittest/suite.py", line 163, in _handleClassSetUp
    setUpClass()
  File "/django/django/test/selenium.py", line 64, in setUpClass
    cls.selenium = cls.create_webdriver()
  File "/django/django/test/selenium.py", line 55, in create_webdriver
    return self.import_webdriver(self.browser)()
  File "/home/vagrant/venv/lib/python3.5/site-packages/selenium/webdriver/chrome/webdriver.py", line 69, in __init__
    desired_capabilities=desired_capabilities)
  File "/home/vagrant/venv/lib/python3.5/site-packages/selenium/webdriver/remote/webdriver.py", line 92, in __init__
    self.start_session(desired_capabilities, browser_profile)
  File "/home/vagrant/venv/lib/python3.5/site-packages/selenium/webdriver/remote/webdriver.py", line 179, in start_session
    response = self.execute(Command.NEW_SESSION, capabilities)
  File "/home/vagrant/venv/lib/python3.5/site-packages/selenium/webdriver/remote/webdriver.py", line 236, in execute
    self.error_handler.check_response(response)
  File "/home/vagrant/venv/lib/python3.5/site-packages/selenium/webdriver/remote/errorhandler.py", line 192, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: session not created exception
from unknown error: Runtime.executionContextCreated has invalid 'context': {"auxData":{"frameId":"7814.1","isDefault":true},"id":1,"name":"","origin":"://"}
  (Session info: chrome=54.0.2840.90)
  (Driver info: chromedriver=2.22.397932 (282ed7cf89cf0053b6542e0d0f039d4123bbb6ad),platform=Linux 4.4.0-38-generic x86_64)

or

======================================================================
ERROR: test_date_time_picker_shortcuts (admin_widgets.tests.DateTimePickerAltTimezoneSeleniumTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.5/unittest/suite.py", line 163, in _handleClassSetUp
    setUpClass()
  File "/django/django/test/selenium.py", line 64, in setUpClass
    cls.selenium = cls.create_webdriver()
  File "/django/django/test/selenium.py", line 55, in create_webdriver
    return self.import_webdriver(self.browser)()
  File "/home/vagrant/venv/lib/python3.5/site-packages/selenium/webdriver/chrome/webdriver.py", line 69, in __init__
    desired_capabilities=desired_capabilities)
  File "/home/vagrant/venv/lib/python3.5/site-packages/selenium/webdriver/remote/webdriver.py", line 92, in __init__
    self.start_session(desired_capabilities, browser_profile)
  File "/home/vagrant/venv/lib/python3.5/site-packages/selenium/webdriver/remote/webdriver.py", line 179, in start_session
    response = self.execute(Command.NEW_SESSION, capabilities)
  File "/home/vagrant/venv/lib/python3.5/site-packages/selenium/webdriver/remote/webdriver.py", line 234, in execute
    response = self.command_executor.execute(driver_command, params)
  File "/home/vagrant/venv/lib/python3.5/site-packages/selenium/webdriver/remote/remote_connection.py", line 407, in execute
    return self._request(command_info[0], url, body=data)
  File "/home/vagrant/venv/lib/python3.5/site-packages/selenium/webdriver/remote/remote_connection.py", line 439, in _request
    resp = self._conn.getresponse()
  File "/usr/lib/python3.5/http/client.py", line 1197, in getresponse
    response.begin()
  File "/usr/lib/python3.5/http/client.py", line 297, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/python3.5/http/client.py", line 266, in _read_status
    raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response

or

======================================================================
ERROR: test_refresh_page (admin_widgets.tests.HorizontalVerticalFilterSeleniumTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/unittest/suite.py", line 146, in _handleClassSetUp
    setUpClass()
  File "/django/django/test/selenium.py", line 64, in setUpClass
    cls.selenium = cls.create_webdriver()
  File "/django/django/test/selenium.py", line 55, in create_webdriver
    return self.import_webdriver(self.browser)()
  File "/django/.tox/py27/local/lib/python2.7/site-packages/selenium/webdriver/chrome/webdriver.py", line 69, in __init__
    desired_capabilities=desired_capabilities)
  File "/django/.tox/py27/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 92, in __init__
    self.start_session(desired_capabilities, browser_profile)
  File "/django/.tox/py27/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 179, in start_session
    response = self.execute(Command.NEW_SESSION, capabilities)
  File "/django/.tox/py27/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 234, in execute
    response = self.command_executor.execute(driver_command, params)
  File "/django/.tox/py27/local/lib/python2.7/site-packages/selenium/webdriver/remote/remote_connection.py", line 407, in execute
    return self._request(command_info[0], url, body=data)
  File "/django/.tox/py27/local/lib/python2.7/site-packages/selenium/webdriver/remote/remote_connection.py", line 439, in _request
    resp = self._conn.getresponse()
  File "/usr/lib/python2.7/httplib.py", line 1136, in getresponse
    response.begin()
  File "/usr/lib/python2.7/httplib.py", line 453, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/python2.7/httplib.py", line 417, in _read_status
    raise BadStatusLine(line)
BadStatusLine: ''

I will continue investigating this problem.

Install requirements from /django rather than preloading them

Rather than copying the content of all the requirements from /django/tests/requirements* locally, we can just refer directly to them via the nfs share. It has the added benefit of possibly being able to build new boxes by simply changing the version of django linked.

Tests failing due to msguniq not being available

When running time runtests35-sqlite3 one test fails, and this is the output:

FAIL: test_makemessages_no_settings (i18n.test_extraction.NoSettingsExtractionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.5/unittest/case.py", line 58, in testPartExecutor
    yield
  File "/usr/lib/python3.5/unittest/case.py", line 600, in run
    testMethod()
  File "/django/tests/i18n/test_extraction.py", line 723, in test_makemessages_no_settings
    self.assertNoOutput(err)
  File "/django/tests/admin_scripts/tests.py", line 203, in assertNoOutput
    self.assertEqual(len(stream), 0, "Stream should be empty: actually contains '%s'" % stream)
  File "/usr/lib/python3.5/unittest/case.py", line 820, in assertEqual
    assertion_func(first, second, msg=msg)
  File "/usr/lib/python3.5/unittest/case.py", line 813, in _baseAssertEqual
    raise self.failureException(msg)
AssertionError: 96 != 0 : Stream should be empty: actually contains 'CommandError: Can't find msguniq. Make sure you have GNU gettext tools 0.15 or newer installed.

As it reported gettext being missing I tried installing it, to no avail:

apt-cache policy get text
N: Unable to locate package get text

Adding the optional repo in /etc/apt/sources.list and doing an update fixes it:

sudo vi /etc/apt/sources.list
sudo apt-get update
sudo apt-get install gettext

Mounting NFS on mac (OS 10.13.6) times out.

==> default: Configuring and enabling network interfaces...
==> default: Exporting NFS shared folders...
==> default: Preparing to edit /etc/exports. Administrator privileges will be required...
Password:
==> default: Mounting NFS shared folders...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

mount -o vers=3,udp 1.2.3.1:/Users/user/Documents/code/django-core/django /django

Stdout from the command:

Stderr from the command:

mount.nfs: Connection timed out


I tried the commands:
"vagrant destroy && sudo vagrant up"
to no avail.

root password

Hello,
i need to create a mysql database but I didn't put a root password (the install did not ask). now when i do mysql -u root -p where can i find this paswword.

Thanks

FileNotFoundError: [Errno 2] No such file or directory: '/django/tox.ini'

vagrant@djangobox:~$ runtests36-mysql
Traceback (most recent call last):
File "/usr/local/bin/tox", line 11, in
sys.exit(cmdline())
File "/usr/local/lib/python3.5/dist-packages/tox/session.py", line 38, in main
config = prepare(args)
File "/usr/local/lib/python3.5/dist-packages/tox/session.py", line 26, in prepare
config = parseconfig(args)
File "/usr/local/lib/python3.5/dist-packages/tox/config.py", line 229, in parseconfig
parseini(config, inipath)
File "/usr/local/lib/python3.5/dist-packages/tox/config.py", line 644, in init
self._cfg = py.iniconfig.IniConfig(config.toxinipath)
File "/usr/local/lib/python3.5/dist-packages/py/_iniconfig.py", line 50, in init
f = open(self.path)
FileNotFoundError: [Errno 2] No such file or directory: '/django/tox.ini'

OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 104

Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'djangoproject/django-box-2.0' could not be found. Attempting to find and install...
default: Box Provider: virtualbox
default: Box Version: >= 0
==> default: Loading metadata for box 'djangoproject/django-box-2.0'
default: URL: https://vagrantcloud.com/djangoproject/django-box-2.0
==> default: Adding box 'djangoproject/django-box-2.0' (v2.0.0) for provider: virtualbox
default: Downloading: https://vagrantcloud.com/djangoproject/boxes/django-box-2.0/versions/2.0.0/providers/virtualbox.box
An error occurred while downloading the remote file. The error
message, if any, is reproduced below. Please fix this error and try
again.

OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 104

Rename the runtest aliases to be consistent with the jenkins test runners

Current runtest aliases are inconsistent with jenkins CI configuration matrix.

Current:

runtests35-sqlite3     
runtests35-sqlite3-gis 
runtests35-mysql       
runtests35-mysql-gis   
runtests35-postgres    
runtests35-postgres-gis

Change to:

runtests35-sqlite3     
runtests35-spatialite 
runtests35-mysql       
runtests35-mysql_gis   
runtests35-postgres    
runtests35-postgis

From #26 (comment)

NFS problem in sharing an encrypted folder on host

After going through the setup process as documented on an Ubuntu 16.04 host, the vagrant up command ends with a non zero exit status with:

==> default: Checking for guest additions in VM...
==> default: Setting hostname...
==> default: Configuring and enabling network interfaces...
==> default: Exporting NFS shared folders...
==> default: Preparing to edit /etc/exports. Administrator privileges will be required...
==> default: Mounting NFS shared folders...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

mount -o vers=3,udp 1.2.3.1:/home/wayne/Documents/Programming/git/django /django

Stdout from the command:

Stderr from the command:

mount.nfs: access denied by server while mounting 1.2.3.1:/home/wayne/Documents/Programming/git/django

As discussed at hashicorp/vagrant#5424, this issue appears to be an issue with NFS being unable to share a folder that is part of an encrypted (ecryptfs) volume. In my case /home/wayne is an ecryptfs volume

Due to the failure of the NFS share, /django in the test box is empty and therefore no tests can be run

Some more guidance about testing for beginners in README.md

Hi,

It's great to have django-box, as it makes it easy to run test for new contributors. This only thing I find missing is a bit more guidance aimed at beginners. Some of it is covered on https://docs.djangoproject.com/en/1.10/topics/testing/overview/ but it doesn't seem to fully match with what's possible in django-box with the runtestsXX-xxx shortcuts.

  • What to do when a test fails ? How to debug failing tests ? Naive approaches such as using print statements, raising exceptions don't output anything usable in the console, using pdb also doesn't seem possible. Also it's not clear whether and how it's possible to use manage.py to run the dev server and test live using the shell or the browser.
  • Is it possible to speed up testing ? By default, all the tests are run, which is very long. It is possible to restrict to one particular module using eg. runtests35-mysql admin_views (runtests35-mysql admin_views.UserAdminTest or runtests35-mysql admin_views.UserAdminTest.test_user_fk_change_popup don't seem to work though), but this still takes more than 2 minutes to setup, making code/test iterations quite slow. Is it possible to avoid deletion/recreation of the database each time (which seem to be the most time-consuming task) ?
  • Is it possible to run all test at once, ideally exactly as done by Jenkins, so to make sure a commit passes all tests before making a PR ? By default, it seems the output of runtestsXX-xxxx goes to the console, but not to the .tox directory, so that it's hard to get a clean overview of what happened.

Thanks a lot for the box already, I think it's a big step towards getting more and better contributions to django ! (at least for me)

Document common issues running on Linux

During pycon AU we had several issues getting django box running on Linux. Let's document common issues with Linux and their resolution steps.

  • nfs-kernel-server

Tests don't work on 1.9.x branch it's still officially supported

Hi !

Thanks to your help, I'm currently able to test my patches for django master.

However, I can't make the tests work properly for the 1.9.x branch (probably the same for older versions). I think while we're at providing a box to make testing easy, it should support not only the master branch, but all supported releases. I guess any work about bug fixing (where the fix has to be backported) has to be tested on all the supported versions as well, and any work on new features that the dev wants to roll out to his current projects has also to be tested on the current project's versions.

My naive approach was to checkout 1.9.x, and do runtests35-sqlite. Here are the problems:
`

First problem :

1.9.x has no tox.ini file.

Solution

This is easily solved by copying master's tox.ini file.

Second problem :

The runtestsXX-yyyy aliases use the --selenium=firefox argument which doesn't work with 1.9.x's tests (where --selenium must be used).

Solution

Activate the virtualenv manually (if it has been created by tox previously when we used the runtestsXX-yyyy alias) : source /django/.tox/py35/bin/activate
And run the tests manually : python /django/tests/runtests.py --selenium

Third problem

I get some failing tests (while there shouldn't be, as it's the release branch I was testing). With this command python /django/tests/runtests.py admin_inlines --selenium, the selenium tests still skip. I'm not really sure what's happening, but it seems it doesn't find the executables for chrome, firefox and IE. Verbose output gives

Exception ignored in: <bound method Service.__del__ of <selenium.webdriver.firefox.service.Service object at 0x7f9c9859b828>>
Traceback (most recent call last):
  File "/django/.tox/py35/lib/python3.5/site-packages/selenium/webdriver/common/service.py", line 173, in __del__
    self.stop()
  File "/django/.tox/py35/lib/python3.5/site-packages/selenium/webdriver/common/service.py", line 145, in stop
    if self.process is None:
AttributeError: 'Service' object has no attribute 'process'
skipped 'Selenium webdriver "selenium.webdriver.firefox.webdriver.WebDriver" not installed or not operational: Message: \'geckodriver\' executable needs to be in PATH. \n'
Exception ignored in: <bound method Service.__del__ of <selenium.webdriver.ie.service.Service object at 0x7f9c9859b080>>
Traceback (most recent call last):
  File "/django/.tox/py35/lib/python3.5/site-packages/selenium/webdriver/common/service.py", line 173, in __del__
    self.stop()
  File "/django/.tox/py35/lib/python3.5/site-packages/selenium/webdriver/common/service.py", line 145, in stop
    if self.process is None:
AttributeError: 'Service' object has no attribute 'process'
skipped 'Selenium webdriver "selenium.webdriver.ie.webdriver.WebDriver" not installed or not operational: Message: \'IEDriverServer.exe\' executable needs to be in PATH. Please download from http://selenium-release.storage.googleapis.com/index.html and read up at https://github.com/SeleniumHQ/selenium/wiki/InternetExplorerDriver\n'

This one I didn't know how to fix.

Thanks !

Add support for Oracle

This isn't high on my to-do list because it's not exactly easy, especially on debian based systems. There's also non-trivial licensing concerns with the various libraries needed from oracle that require click through license acceptance.

Cannot run on ubuntu 16.04

I tried to run this on ubuntu 16.04 with the default versions of vagrant (1.8.1+dfsg-1) and virtualbox (5.0.24-dfsg-0ubuntu1.16.04.1) and got this error when I ran vagrant up:

$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'djangoproject/django-box-1.11'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'djangoproject/django-box-1.11' is up to date...
==> default: Setting the name of the VM: django-box_default_1473795778940_68676
==> default: Pruning invalid NFS exports. Administrator privileges will be required...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
    default: Adapter 2: hostonly
==> default: Forwarding ports...
    default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2222
    default: SSH username: vagrant
    default: SSH auth method: private key
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: Setting hostname...
==> default: Configuring and enabling network interfaces...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

/sbin/ifdown eth1 2> /dev/null

Stdout from the command:



Stderr from the command:

mesg: ttyname failed: Inappropriate ioctl for device

This appears to be related to a vagrant bug, which suggests I should upgrade to the latest version of vagrant (1.8.5). This gets further, but still fails with a similar error:

$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'djangoproject/django-box-1.11' is up to date...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
    default: Adapter 2: hostonly
==> default: Forwarding ports...
    default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2222
    default: SSH username: vagrant
    default: SSH auth method: private key
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: Setting hostname...
==> default: Configuring and enabling network interfaces...
==> default: Exporting NFS shared folders...
==> default: Preparing to edit /etc/exports. Administrator privileges will be required...
● nfs-server.service - NFS server and services
   Loaded: loaded (/lib/systemd/system/nfs-server.service; enabled; vendor preset: enabled)
   Active: active (exited) since Tue 2016-09-13 20:38:51 BST; 13min ago
 Main PID: 2903 (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/nfs-server.service

Sep 13 20:38:51 quartic-XPS13-9333 systemd[1]: Starting NFS server and services...
Sep 13 20:38:51 quartic-XPS13-9333 exportfs[2899]: exportfs: Failed to stat /home/quartic/dev/django: No such file or directory
Sep 13 20:38:51 quartic-XPS13-9333 systemd[1]: Started NFS server and services.
exportfs: /home/quartic/dev/django does not support NFS export
==> default: Mounting NFS shared folders...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

set -e
mkdir -p /django
mount -o vers=3,udp 1.2.3.1:/home/quartic/dev/django /django
if command -v /sbin/init && /sbin/init --version | grep upstart; then
  /sbin/initctl emit --no-wait vagrant-mounted MOUNTPOINT=/django
fi


Stdout from the command:



Stderr from the command:

mesg: ttyname failed: Inappropriate ioctl for device
mount.nfs: access denied by server while mounting 1.2.3.1:/home/quartic/dev/django

I finally tried to use the latest version of virtualbox (5.1.6-110634Ubuntuxenial amd64), but this also failed:

$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'djangoproject/django-box-1.11' is up to date...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
    default: Adapter 2: hostonly
==> default: Forwarding ports...
    default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2222
    default: SSH username: vagrant
    default: SSH auth method: private key
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
    default: The guest additions on this VM do not match the installed version of
    default: VirtualBox! In most cases this is fine, but in rare cases it can
    default: prevent things such as shared folders from working properly. If you see
    default: shared folder errors, please make sure the guest additions within the
    default: virtual machine match the version of VirtualBox you have installed on
    default: your host and reload your VM.
    default: 
    default: Guest Additions Version: 5.0.20
    default: VirtualBox Version: 5.1
==> default: Setting hostname...
==> default: Configuring and enabling network interfaces...
==> default: Exporting NFS shared folders...
==> default: Preparing to edit /etc/exports. Administrator privileges will be required...
● nfs-server.service - NFS server and services
   Loaded: loaded (/lib/systemd/system/nfs-server.service; enabled; vendor preset: enabled)
   Active: active (exited) since Tue 2016-09-13 20:38:51 BST; 19min ago
 Main PID: 2903 (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/nfs-server.service

Sep 13 20:38:51 quartic-XPS13-9333 systemd[1]: Starting NFS server and services...
Sep 13 20:38:51 quartic-XPS13-9333 exportfs[2899]: exportfs: Failed to stat /home/quartic/dev/django: No such file or directory
Sep 13 20:38:51 quartic-XPS13-9333 systemd[1]: Started NFS server and services.
exportfs: /home/quartic/dev/django does not support NFS export
==> default: Mounting NFS shared folders...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

set -e
mkdir -p /django
mount -o vers=3,udp 1.2.3.1:/home/quartic/dev/django /django
if command -v /sbin/init && /sbin/init --version | grep upstart; then
  /sbin/initctl emit --no-wait vagrant-mounted MOUNTPOINT=/django
fi


Stdout from the command:



Stderr from the command:

mesg: ttyname failed: Inappropriate ioctl for device
mount.nfs: access denied by server while mounting 1.2.3.1:/home/quartic/dev/django

Box not found during Vagrant up

Using b9eb4f0 of this repo (latest master at time of posting), I get:

[~/src/django-box]$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'django-box-1.11' could not be found. Attempting to find and install...
    default: Box Provider: virtualbox
    default: Box Version: >= 0
==> default: Box file was not detected as metadata. Adding it directly...
==> default: Adding box 'django-box-1.11' (v0) for provider: virtualbox
    default: Downloading: django-box-1.11
    default:
An error occurred while downloading the remote file. The error
message, if any, is reproduced below. Please fix this error and try
again.

Couldn't open file /C:/Users/Ed/src/django-box/django-box-1.11
==> default: VM not created. Moving on...

This occurs even if I uncomment the box_url pref in Vagrantfile.

It's worth noting that since a box URL isn't set, Vagrant will only look on https://atlas.hashicorp.com/boxes/search - where the box doesn't exist.

Add support for running javascript tests

The tox.ini provides a javascript environment, but the test environment relies on an old version of NPM: https://code.djangoproject.com/ticket/25803

This should probably be fixed upstream in some way. The grunt qunit test runner looks abandoned, so it might be necessary to look into something else. Once that is done, we can properly alias a command to run the javascript tests, just as we've done for docs/isort/flake8.

Consider using tox for all test runs

A tox.ini is now available in Django 1.11 (master), and includes environments for running flake, isort spelling and docs tasks. If we're already going to be using tox for these things, then it probably makes sense to use it for running the regular test suite.

  • add test_settings_files directory to PYTHONPATH
  • pass --selenium to the regular test env
  • bind existing aliases to the appropriate tox invocation including cd into /django

Will solve #2 #3 #4 #5

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.