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

Changelog unit test for deleting an object fails on MySQL #389

Closed
jathanism opened this issue Apr 28, 2021 · 1 comment · Fixed by #550
Closed

Changelog unit test for deleting an object fails on MySQL #389

jathanism opened this issue Apr 28, 2021 · 1 comment · Fixed by #550
Labels
type: bug Something isn't working as expected

Comments

@jathanism
Copy link
Contributor

jathanism commented Apr 28, 2021

Environment

  • Python version: *
  • Nautobot version: 1.0.0

Steps to Reproduce

  1. Set MySQL as your database backend
  2. Run the test suite
  3. 💥

Expected Behavior

All tests should pass.

Observed Behavior

======================================================================
FAIL: test_delete_object (nautobot.extras.tests.test_changelog.ChangeLogAPITest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/jathan/sandbox/src/nautobot/nautobot/extras/tests/test_changelog.py", line 265, in test_delete_object
    self.assertEqual(oc.object_data["tags"], ["Tag 1", "Tag 2"])
AssertionError: Lists differ: [] != ['Tag 1', 'Tag 2']

Second list contains 2 additional elements.
First extra element 0:
'Tag 1'

- []
+ ['Tag 1', 'Tag 2']
@jathanism jathanism added this to To do in Release v1.1.0 via automation Apr 28, 2021
@jathanism jathanism added this to the v1.1.0 milestone Apr 28, 2021
@jathanism jathanism added type: bug Something isn't working as expected status: current labels Apr 28, 2021
@jathanism
Copy link
Contributor Author

This error is strange. It doesn't happen on Postgres. In starting to look at the code path, it appears related to the object being delete in the API. When deleted in the UI this bug does not happen. Tags are apparently treated differently in the UI and the API, so we'll needed to attempt to have them use the same code paths if at all possible.

@jedelman8 jedelman8 removed this from the v1.1.0 milestone May 28, 2021
@jedelman8 jedelman8 removed this from To do in Release v1.1.0 May 28, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug Something isn't working as expected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants