← Back to team overview

yahoo-eng-team team mailing list archive

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

 

Public bug reported:

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 ###'''

** Affects: neutron
     Importance: Undecided
         Status: New

-- 
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:
  New

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


Follow ups