← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 2043141] [NEW] neutron-lib unit tests need update for sqlalchemy 2.0

 

Public bug reported:

Some of the neutron-lib unit tests do not support sqlalchemy 2.0.

Thomas Goirand ran them on a Debian system and this test file fails:

  neutron_lib/tests/unit/db/test_sqlalchemytypes.py

There are 8 failures, all basically the same:

105s FAIL: neutron_lib.tests.unit.db.test_sqlalchemytypes.CIDRTestCase.test_crud
105s neutron_lib.tests.unit.db.test_sqlalchemytypes.CIDRTestCase.test_crud
105s ----------------------------------------------------------------------
105s testtools.testresult.real._StringException: Traceback (most recent call last):
105s   File "/tmp/autopkgtest-lxc.jvth6_27/downtmp/build.pBL/src/neutron_lib/tests/unit/db/test_sqlalchemytypes.py", line 36, in setUp
105s     meta = sa.MetaData(bind=self.engine)
105s            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
105s TypeError: MetaData.__init__() got an unexpected keyword argument 'bind'

>From looking at the functional tests and Nova code, should be a
straightforward fix.

We should also look at creating a test job that both tests sqlalchemy
2.0 and neutron-lib main/master branches so we don't regress.

** Affects: neutron
     Importance: High
     Assignee: Brian Haley (brian-haley)
         Status: In Progress


** Tags: unittest

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/2043141

Title:
  neutron-lib unit tests need update for sqlalchemy 2.0

Status in neutron:
  In Progress

Bug description:
  Some of the neutron-lib unit tests do not support sqlalchemy 2.0.

  Thomas Goirand ran them on a Debian system and this test file fails:

    neutron_lib/tests/unit/db/test_sqlalchemytypes.py

  There are 8 failures, all basically the same:

  105s FAIL: neutron_lib.tests.unit.db.test_sqlalchemytypes.CIDRTestCase.test_crud
  105s neutron_lib.tests.unit.db.test_sqlalchemytypes.CIDRTestCase.test_crud
  105s ----------------------------------------------------------------------
  105s testtools.testresult.real._StringException: Traceback (most recent call last):
  105s   File "/tmp/autopkgtest-lxc.jvth6_27/downtmp/build.pBL/src/neutron_lib/tests/unit/db/test_sqlalchemytypes.py", line 36, in setUp
  105s     meta = sa.MetaData(bind=self.engine)
  105s            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  105s TypeError: MetaData.__init__() got an unexpected keyword argument 'bind'

  From looking at the functional tests and Nova code, should be a
  straightforward fix.

  We should also look at creating a test job that both tests sqlalchemy
  2.0 and neutron-lib main/master branches so we don't regress.

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/2043141/+subscriptions



Follow ups