maasserver.tests.test_forms_nodegroup.TestNodeGroupDefineForm.test_rejects_invalid_interface fails spuriously

Bug #1511689 reported by Gavin Panella
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Invalid
High
Unassigned

Bug Description

ERROR: maasserver.tests.test_forms_nodegroup
  .TestNodeGroupDefineForm.test_rejects_invalid_interface
-------------------------------------------------------------------
_StringException: Traceback (most recent call last):
  File ".../maastesting/runtest.py", line 68, in _run_user
    result = function(*args, **kwargs)
  File ".../testtools/testcase.py", line 616, in _run_test_method
    return self._get_test_method()()
  File ".../maasserver/tests/test_forms_nodegroup.py", line 121, in
  test_rejects_invalid_interface
    self.assertFalse(form.is_valid())
  File ".../django/forms/forms.py", line 129, in is_valid
    return self.is_bound and not bool(self.errors)
  File ".../django/forms/forms.py", line 121, in errors
    self.full_clean()
  File ".../maasserver/forms.py", line 253, in full_clean
    super(APIEditMixin, self).full_clean()
  File ".../django/forms/forms.py", line 273, in full_clean
    self._clean_fields()
  File ".../django/forms/forms.py", line 291, in _clean_fields
    value = getattr(self, 'clean_%s' % name)()
  File ".../maasserver/forms.py", line 2130, in clean_interfaces
    validate_nodegroupinterface_definition(interface)
  File ".../maasserver/forms.py", line 2037, in
  validate_nodegroupinterface_definition
    if not form.is_valid():
  File ".../django/forms/forms.py", line 129, in is_valid
    return self.is_bound and not bool(self.errors)
  File ".../django/forms/forms.py", line 121, in errors
    self.full_clean()
  File ".../maasserver/forms.py", line 253, in full_clean
    super(APIEditMixin, self).full_clean()
  File ".../django/forms/forms.py", line 274, in full_clean
    self._clean_form()
  File ".../django/forms/forms.py", line 300, in _clean_form
    self.cleaned_data = self.clean()
  File ".../maasserver/forms.py", line 1834, in clean
    self.clean_dependent_ip_ranges(cleaned_data)
  File ".../maasserver/forms.py", line 1934, in
  clean_dependent_ip_ranges
    dynamic_range_low, dynamic_range_high)
  File ".../maasserver/forms.py", line 1520, in
  validate_new_dynamic_range_size
    if ip_range.version == 6:
UnboundLocalError: local variable 'ip_range' referenced before
  assignment

Tags: tests
Changed in maas:
status: Triaged → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.