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

Test Failures when running MySQL #372

Open
smk4664 opened this issue Aug 31, 2024 · 0 comments
Open

Test Failures when running MySQL #372

smk4664 opened this issue Aug 31, 2024 · 0 comments

Comments

@smk4664
Copy link
Contributor

smk4664 commented Aug 31, 2024

Environment

  • Python version: 3.11
  • Nautobot version: 2.3.0
  • nautobot-device-lifecycle-mgmt version: 2.1.2

Expected Behavior

Enabling MySQL in the CI and expect it to pass.

Observed Behavior

16 tests fail

======================================================================
FAIL: test_device_types (nautobot_device_lifecycle_mgmt.tests.test_filters.SoftwareImageLCMFilterSetTestCase.test_device_types)
Test device_types filter.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/source/nautobot_device_lifecycle_mgmt/tests/test_filters.py", line 813, in test_device_types
    self.assertEqual(self.filterset(params, self.queryset).qs.count(), 1)
AssertionError: 0 != 1

======================================================================
FAIL: test_device_roles_name (nautobot_device_lifecycle_mgmt.tests.test_filters.ValidatedSoftwareLCMFilterSetTestCase.test_device_roles_name)
Test device_roles filter.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/source/nautobot_device_lifecycle_mgmt/tests/test_filters.py", line 302, in test_device_roles_name
    self.assertEqual(self.filterset(params, self.queryset).qs.count(), 1)
AssertionError: 0 != 1

======================================================================
FAIL: test_create_softwareimage_all (nautobot_device_lifecycle_mgmt.tests.test_model.SoftwareImageLCMTestCase.test_create_softwareimage_all)
Successfully create SoftwareImageLCM with all fields.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/source/nautobot_device_lifecycle_mgmt/tests/test_model.py", line 608, in test_create_softwareimage_all
    self.assertEqual(list(softwareimage.device_types.all()), [self.device_type_1])
AssertionError: Lists differ: [] != [<DeviceType: ASR-1000>]

Second list contains 1 additional elements.
First extra element 0:
<DeviceType: ASR-1000>

- []
+ [<DeviceType: ASR-1000>]

======================================================================
FAIL: test_create_softwareimage_required_only (nautobot_device_lifecycle_mgmt.tests.test_model.SoftwareImageLCMTestCase.test_create_softwareimage_required_only)
Successfully create SoftwareImageLCM with required fields only.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/source/nautobot_device_lifecycle_mgmt/tests/test_model.py", line 587, in test_create_softwareimage_required_only
    self.assertEqual(list(softwareimage.device_types.all()), [self.device_type_1])
AssertionError: Lists differ: [] != [<DeviceType: ASR-1000>]

Second list contains 1 additional elements.
First extra element 0:
<DeviceType: ASR-1000>

- []
+ [<DeviceType: ASR-1000>]

======================================================================
FAIL: test_get_software_images_for_device_type (nautobot_device_lifecycle_mgmt.tests.test_model.SoftwareImageLCMTestCase.test_get_software_images_for_device_type)
Test related reverse relationship from device type to software image
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/source/nautobot_device_lifecycle_mgmt/tests/test_model.py", line 625, in test_get_software_images_for_device_type
    self.assertEqual(list(self.device_type_1.software_images.all()), [softwareimage])
AssertionError: Lists differ: [] != [<SoftwareImageLCM: ios17.3.3md.img>]

Second list contains 1 additional elements.
First extra element 0:
<SoftwareImageLCM: ios17.3.3md.img>

- []
+ [<SoftwareImageLCM: ios17.3.3md.img>]

======================================================================
FAIL: test_create_validatedsoftwarelcm_all (nautobot_device_lifecycle_mgmt.tests.test_model.ValidatedSoftwareLCMTestCase.test_create_validatedsoftwarelcm_all)
Successfully create ValidatedSoftwareLCM with all fields.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/source/nautobot_device_lifecycle_mgmt/tests/test_model.py", line 225, in test_create_validatedsoftwarelcm_all
    self.assertEqual(list(validatedsoftwarelcm.device_types.all()), [self.device_type_1])
AssertionError: Lists differ: [] != [<DeviceType: ASR-1000>]

Second list contains 1 additional elements.
First extra element 0:
<DeviceType: ASR-1000>

- []
+ [<DeviceType: ASR-1000>]

======================================================================
FAIL: test_create_validatedsoftwarelcm_required_only (nautobot_device_lifecycle_mgmt.tests.test_model.ValidatedSoftwareLCMTestCase.test_create_validatedsoftwarelcm_required_only)
Successfully create ValidatedSoftwareLCM with required fields only.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/source/nautobot_device_lifecycle_mgmt/tests/test_model.py", line 209, in test_create_validatedsoftwarelcm_required_only
    self.assertEqual(list(validatedsoftwarelcm.device_types.all()), [self.device_type_1])
AssertionError: Lists differ: [] != [<DeviceType: ASR-1000>]

Second list contains 1 additional elements.
First extra element 0:
<DeviceType: ASR-1000>

- []
+ [<DeviceType: ASR-1000>]

======================================================================
FAIL: test_get_for_object_device (nautobot_device_lifecycle_mgmt.tests.test_model.ValidatedSoftwareLCMTestCase.test_get_for_object_device)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/source/nautobot_device_lifecycle_mgmt/tests/test_model.py", line 285, in test_get_for_object_device
    self.assertEqual(validated_software_for_device.count(), 1)
AssertionError: 0 != 1

======================================================================
FAIL: test_get_for_object_devicetype (nautobot_device_lifecycle_mgmt.tests.test_model.ValidatedSoftwareLCMTestCase.test_get_for_object_devicetype)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/source/nautobot_device_lifecycle_mgmt/tests/test_model.py", line 304, in test_get_for_object_devicetype
    self.assertEqual(validated_software_for_device_type.count(), 1)
AssertionError: 0 != 1

======================================================================
FAIL: test_get_for_object_inventoryitem (nautobot_device_lifecycle_mgmt.tests.test_model.ValidatedSoftwareLCMTestCase.test_get_for_object_inventoryitem)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/source/nautobot_device_lifecycle_mgmt/tests/test_model.py", line 323, in test_get_for_object_inventoryitem
    self.assertEqual(validated_software_for_inventoryitem.count(), 1)
AssertionError: 0 != 1

======================================================================
FAIL: test_soft_image_for_device_match_device_type (nautobot_device_lifecycle_mgmt.tests.test_software_filters.DeviceSoftwareImageFilterTestCase.test_soft_image_for_device_match_device_type)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/source/nautobot_device_lifecycle_mgmt/tests/test_software_filters.py", line 153, in test_soft_image_for_device_match_device_type
    self.assertEqual(soft_image_filtered_qs[0], self.soft_image_dt)
AssertionError: <SoftwareImageLCM: eos4.25def.swi> != <SoftwareImageLCM: eos4.25dt.swi>

======================================================================
FAIL: test_soft_image_for_device_match_tag (nautobot_device_lifecycle_mgmt.tests.test_software_filters.DeviceSoftwareImageFilterTestCase.test_soft_image_for_device_match_tag)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/source/nautobot_device_lifecycle_mgmt/tests/test_software_filters.py", line 146, in test_soft_image_for_device_match_tag
    self.assertEqual(soft_image_filtered_qs[0], self.soft_image_ot)
AssertionError: <SoftwareImageLCM: eos4.25def.swi> != <SoftwareImageLCM: eos4.25ot.swi>

======================================================================
FAIL: test_soft_image_for_device_tag_wins_over_device_type (nautobot_device_lifecycle_mgmt.tests.test_software_filters.DeviceSoftwareImageFilterTestCase.test_soft_image_for_device_tag_wins_over_device_type)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/source/nautobot_device_lifecycle_mgmt/tests/test_software_filters.py", line 167, in test_soft_image_for_device_tag_wins_over_device_type
    self.assertEqual(soft_image_filtered_qs[0], self.soft_image_ot_win)
AssertionError: <SoftwareImageLCM: eos4.25def.swi> != <SoftwareImageLCM: eos4.25ot_win.swi>

======================================================================
FAIL: test_soft_image_for_invitem_match_invitem (nautobot_device_lifecycle_mgmt.tests.test_software_filters.InventoryItemSoftwareImageFilterTestCase.test_soft_image_for_invitem_match_invitem)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/source/nautobot_device_lifecycle_mgmt/tests/test_software_filters.py", line 290, in test_soft_image_for_invitem_match_invitem
    self.assertEqual(soft_image_filtered_qs[0], self.soft_image_invitem)
AssertionError: <SoftwareImageLCM: eos4.25def.swi> != <SoftwareImageLCM: eos4.25invitem.swi>

======================================================================
FAIL: test_soft_image_for_invitem_match_tag (nautobot_device_lifecycle_mgmt.tests.test_software_filters.InventoryItemSoftwareImageFilterTestCase.test_soft_image_for_invitem_match_tag)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/source/nautobot_device_lifecycle_mgmt/tests/test_software_filters.py", line 283, in test_soft_image_for_invitem_match_tag
    self.assertEqual(soft_image_filtered_qs[0], self.soft_image_ot)
AssertionError: <SoftwareImageLCM: eos4.25def.swi> != <SoftwareImageLCM: eos4.25ot.swi>

======================================================================
FAIL: test_soft_image_for_invitem_match_tag_wins_over_specific_assignment (nautobot_device_lifecycle_mgmt.tests.test_software_filters.InventoryItemSoftwareImageFilterTestCase.test_soft_image_for_invitem_match_tag_wins_over_specific_assignment)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/source/nautobot_device_lifecycle_mgmt/tests/test_software_filters.py", line 304, in test_soft_image_for_invitem_match_tag_wins_over_specific_assignment
    self.assertEqual(soft_image_filterd_qs[0], self.soft_image_ot_win)
AssertionError: <SoftwareImageLCM: eos4.25def.swi> != <SoftwareImageLCM: eos4.25ot_win.swi>

----------------------------------------------------------------------
Ran 610 tests in 68.546s

FAILED (failures=16, skipped=71)

Steps to Reproduce

  1. Uncomment the MySQL test in CI.
  2. Run the CI.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants