← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1647027] Re: Neutron migration unit test failure with alembic 0.8.9

 

Reviewed:  https://review.openstack.org/406447
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=d8055d52e5c6f3e0dfd49b857f715edae6520e03
Submitter: Jenkins
Branch:    master

commit d8055d52e5c6f3e0dfd49b857f715edae6520e03
Author: Ihar Hrachyshka <ihrachys@xxxxxxxxxx>
Date:   Fri Dec 2 18:14:57 2016 +0000

    Support alembic 0.8.9 in test_autogen_process_directives
    
    The test case validates that autogenerated alembic commands meet
    our expectations.
    
    The new alembic version adds a leading '# ' to each autogenerated
    comment to make flake8 happy. This patch adopts the test case to handle
    both new and older versions. This is achieved by switching from exact
    match to using a regexp.
    
    Change-Id: I9ca411e5b3d20412fffa05f6eb79659f6c56f3fd
    Closes-Bug: #1647027


** Changed in: neutron
       Status: In Progress => Fix Released

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

Title:
  Neutron migration unit test failure with alembic 0.8.9

Status in neutron:
  Fix Released

Bug description:
  alembic 0.8.9 causes unit test failures, as seen in e.g.

  http://logs.openstack.org/36/406436/1/check/gate-cross-neutron-
  python27-ubuntu-xenial/7746634/testr_results.html.gz

  The failure in particular is:

  
  ft287.14: neutron.tests.unit.db.test_migration.TestCli.test_autogen_process_directives_StringException: Empty attachments:
    pythonlogging:''
    stderr
    stdout

  Traceback (most recent call last):
    File "neutron/tests/base.py", line 127, in func
      return f(self, *args, **kwargs)
    File "/home/jenkins/workspace/gate-cross-neutron-python27-ubuntu-xenial/.tox/py27/local/lib/python2.7/site-packages/mock/mock.py", line 1305, in patched
      return func(*args, **keywargs)
    File "neutron/tests/unit/db/test_migration.py", line 690, in test_autogen_process_directives
      alembic_ag_api.render_python_code(expand.upgrade_ops)
    File "/home/jenkins/workspace/gate-cross-neutron-python27-ubuntu-xenial/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 411, in assertEqual
      self.assertThat(observed, matcher, message)
    File "/home/jenkins/workspace/gate-cross-neutron-python27-ubuntu-xenial/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 498, in assertThat
      raise mismatch_error
  testtools.matchers._impl.MismatchError: !=:
  reference = '''\
  ### commands auto generated by Alembic - please adjust! ###
      op.create_table('organization',
      sa.Column('id', sa.Integer(), nullable=False),
      sa.Column('name', sa.String(length=50), nullable=False),
      sa.PrimaryKeyConstraint('id')
      )
      op.add_column('user', sa.Column('organization_id', sa.Integer(), nullable=True))
      op.create_foreign_key('org_fk', 'user', 'organization', ['organization_id'], ['id'])
      ### end Alembic commands ###'''
  actual    = '''\
  # ### commands auto generated by Alembic - please adjust! ###
      op.create_table('organization',
      sa.Column('id', sa.Integer(), nullable=False),
      sa.Column('name', sa.String(length=50), nullable=False),
      sa.PrimaryKeyConstraint('id')
      )
      op.add_column('user', sa.Column('organization_id', sa.Integer(), nullable=True))
      op.create_foreign_key('org_fk', 'user', 'organization', ['organization_id'], ['id'])
      # ### end Alembic commands ###'''

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


References