unit-tests failing for test_mongodb_error_in_write_config and test_mongodb_error_in_write_config_verify_unlink

Bug #1446105 reported by Sushil Kumar
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack DBaaS (Trove)
Fix Released
Critical
Sushil Kumar

Bug Description

unit tests for trove are failing for 2 tests test_mongodb_error_in_write_config and test_mongodb_error_in_write_config_verify_unlink

Following is the log:

OK (SKIP=22)
py27 runtests: commands[1] | python setup.py testr --slowest
running testr
running=${PYTHON:-python} -m subunit.run discover ./trove/tests/unittests --list
running=${PYTHON:-python} -m subunit.run discover ./trove/tests/unittests --load-list /tmp/tmpkv_82T
running=${PYTHON:-python} -m subunit.run discover ./trove/tests/unittests --load-list /tmp/tmplAoqyR
running=${PYTHON:-python} -m subunit.run discover ./trove/tests/unittests --load-list /tmp/tmpqr2R3c
running=${PYTHON:-python} -m subunit.run discover ./trove/tests/unittests --load-list /tmp/tmpDw2j36
running=${PYTHON:-python} -m subunit.run discover ./trove/tests/unittests --load-list /tmp/tmpErEq68
running=${PYTHON:-python} -m subunit.run discover ./trove/tests/unittests --load-list /tmp/tmpSkaU6S
running=${PYTHON:-python} -m subunit.run discover ./trove/tests/unittests --load-list /tmp/tmpYF1hx9
running=${PYTHON:-python} -m subunit.run discover ./trove/tests/unittests --load-list /tmp/tmp_imgqw
No handlers could be found for logger "trove.guestagent.backup.backupagent"
No handlers could be found for logger "trove.guestagent.backup.backupagent"
No handlers could be found for logger "trove.guestagent.strategies.storage.swift"
No handlers could be found for logger "trove.conductor.manager"
No handlers could be found for logger "trove.guestagent.backup.backupagent"
No handlers could be found for logger "trove.common.strategies.cluster.experimental.mongodb.api"
No handlers could be found for logger "trove.guestagent.datastore.service"
No handlers could be found for logger "trove.guestagent.api"
======================================================================
FAIL: guestagent.test_dbaas.MongoDBAppTest.test_mongodb_error_in_write_config_verify_unlink
tags: worker-6
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/mnt/coding/first_test/trove/trove/tests/unittests/guestagent/test_dbaas.py", line 2020, in test_mongodb_error_in_write_config_verify_unlink
    configuration=configuration)
  File "/mnt/coding/first_test/trove/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 422, in assertRaises
    self.assertThat(our_callable, matcher)
  File "/mnt/coding/first_test/trove/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 433, in assertThat
    mismatch_error = self._matchHelper(matchee, matcher, message, verbose)
  File "/mnt/coding/first_test/trove/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 483, in _matchHelper
    mismatch = matcher.match(matchee)
  File "/mnt/coding/first_test/trove/.tox/py27/local/lib/python2.7/site-packages/testtools/matchers/_exception.py", line 108, in match
    mismatch = self.exception_matcher.match(exc_info)
  File "/mnt/coding/first_test/trove/.tox/py27/local/lib/python2.7/site-packages/testtools/matchers/_higherorder.py", line 62, in match
    mismatch = matcher.match(matchee)
  File "/mnt/coding/first_test/trove/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 414, in match
    reraise(*matchee)
  File "/mnt/coding/first_test/trove/.tox/py27/local/lib/python2.7/site-packages/testtools/matchers/_exception.py", line 101, in match
    result = matchee()
  File "/mnt/coding/first_test/trove/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 969, in __call__
    return self._callable_object(*self._args, **self._kwargs)
  File "trove/guestagent/datastore/experimental/mongodb/service.py", line 153, in reset_configuration
    self._write_config(config_contents)
  File "trove/guestagent/datastore/experimental/mongodb/service.py", line 182, in _write_config
    as_root=True)
  File "trove/guestagent/common/operating_system.py", line 321, in move
    raise exception.UnprocessableEntity(_("Missing destination path."))
trove.common.exception.UnprocessableEntity: Missing destination path.
======================================================================
FAIL: guestagent.test_dbaas.MongoDBAppTest.test_mongodb_error_in_write_config
tags: worker-7
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/mnt/coding/first_test/trove/trove/tests/unittests/guestagent/test_dbaas.py", line 2033, in test_mongodb_error_in_write_config
    configuration=configuration)
  File "/mnt/coding/first_test/trove/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 422, in assertRaises
    self.assertThat(our_callable, matcher)
  File "/mnt/coding/first_test/trove/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 433, in assertThat
    mismatch_error = self._matchHelper(matchee, matcher, message, verbose)
  File "/mnt/coding/first_test/trove/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 483, in _matchHelper
    mismatch = matcher.match(matchee)
  File "/mnt/coding/first_test/trove/.tox/py27/local/lib/python2.7/site-packages/testtools/matchers/_exception.py", line 108, in match
    mismatch = self.exception_matcher.match(exc_info)
  File "/mnt/coding/first_test/trove/.tox/py27/local/lib/python2.7/site-packages/testtools/matchers/_higherorder.py", line 62, in match
    mismatch = matcher.match(matchee)
  File "/mnt/coding/first_test/trove/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 414, in match
    reraise(*matchee)
  File "/mnt/coding/first_test/trove/.tox/py27/local/lib/python2.7/site-packages/testtools/matchers/_exception.py", line 101, in match
    result = matchee()
  File "/mnt/coding/first_test/trove/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 969, in __call__
    return self._callable_object(*self._args, **self._kwargs)
  File "trove/guestagent/datastore/experimental/mongodb/service.py", line 153, in reset_configuration
    self._write_config(config_contents)
  File "trove/guestagent/datastore/experimental/mongodb/service.py", line 182, in _write_config
    as_root=True)
  File "trove/guestagent/common/operating_system.py", line 321, in move
    raise exception.UnprocessableEntity(_("Missing destination path."))
trove.common.exception.UnprocessableEntity: Missing destination path.
Ran 929 (+8) tests in 9.929s (-10.014s)
FAILED (id=1, failures=2 (+2), skips=1)
error: testr failed (1)
ERROR: InvocationError: '/mnt/coding/first_test/trove/.tox/py27/bin/python setup.py testr --slowest'

Changed in trove:
importance: Undecided → Critical
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to trove (master)

Fix proposed to branch: master
Review: https://review.openstack.org/175319

Changed in trove:
assignee: nobody → Sushil Kumar (sushil-kumar2)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to trove (master)

Reviewed: https://review.openstack.org/175319
Committed: https://git.openstack.org/cgit/openstack/trove/commit/?id=8642e2adebcdb96a4bd1ec9231e4a756a570e377
Submitter: Jenkins
Branch: master

commit 8642e2adebcdb96a4bd1ec9231e4a756a570e377
Author: Sushil Kumar <email address hidden>
Date: Mon Apr 20 09:23:09 2015 +0000

    Fixes unit-tests in test_dbaas.py

    - Updated test_mongodb_error_in_write_config_verify_unlink,
      to mock operating_system.move instead of mocking execute_with_timeout.

    - test_mongodb_error_in_write_config and
      test_mongodb_error_in_write_config_verify_unlink are nearly same,
      so removed test_mongodb_error_in_write_config.

    Change-Id: I391dda4696ba30f24b2f9efd68a7d617010d680c
    Closes-Bug: #1446105

Changed in trove:
status: In Progress → Fix Committed
Changed in trove:
milestone: none → liberty-1
Thierry Carrez (ttx)
Changed in trove:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in trove:
milestone: liberty-1 → 4.0.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.