[glance] glance_store tests failed
Hi,
When I run a test with `tox -e py37` in glance_store, two tests failed.
The command what I ran is below.
1. git clone https://opendev.org/openstack/glance_store.git 2. tox -e py37
Is there something wrong with how to run test?
Thanks & Best Regards,
============================== Failed 2 tests - output below: ==============================
glance_store.tests.unit.test_filesystem_store.TestStore.test_add_check_metadata_list_with_valid_mountpoint_locations --------------------------------------------------------------------------------------------------------------------
Captured traceback: ~~~~~~~~~~~~~~~~~~~ b'Traceback (most recent call last):' b' File "/Users/sameshima/glance_store/glance_store/tests/unit/test_filesystem_store.py", line 215, in test_add_check_metadata_list_with_valid_mountpoint_locations' b' self.assertEqual(in_metadata[0], metadata)' b' File "/Users/sameshima/glance_store/.tox/py37/lib/python3.7/site-packages/testtools/testcase.py", line 411, in assertEqual' b' self.assertThat(observed, matcher, message)' b' File "/Users/sameshima/glance_store/.tox/py37/lib/python3.7/site-packages/testtools/testcase.py", line 498, in assertThat' b' raise mismatch_error' b"testtools.matchers._impl.MismatchError: {'id': 'abcdefg', 'mountpoint': '/tmp'} != {}" b''
glance_store.tests.unit.test_multistore_filesystem.TestMultiStore.test_add_check_metadata_list_with_valid_mountpoint_locations ------------------------------------------------------------------------------------------------------------------------------
Captured traceback: ~~~~~~~~~~~~~~~~~~~ b'Traceback (most recent call last):' b' File "/Users/sameshima/glance_store/glance_store/tests/unit/test_multistore_filesystem.py", line 276, in test_add_check_metadata_list_with_valid_mountpoint_locations' b' self.assertEqual(in_metadata[0], metadata)' b' File "/Users/sameshima/glance_store/.tox/py37/lib/python3.7/site-packages/testtools/testcase.py", line 411, in assertEqual' b' self.assertThat(observed, matcher, message)' b' File "/Users/sameshima/glance_store/.tox/py37/lib/python3.7/site-packages/testtools/testcase.py", line 498, in assertThat' b' raise mismatch_error' b"testtools.matchers._impl.MismatchError: {'id': 'abcdefg', 'mountpoint': '/tmp'} != {'store': 'file1'}"
This email and all contents are subject to the following disclaimer: https://hello.global.ntt/en-us/email-disclaimer
On 11/18/19 9:02 PM, Naohiro Sameshima(鮫島 直洋)(Group) wrote:
Hi,
When I run a test with `tox -e py37` in glance_store, two tests failed.
The command what I ran is below.
tox -e py37
Is there something wrong with how to run test?
That's the correct way to run the tests. I'm not sure why you're getting those failures -- I did a fresh checkout and all tests passed using Python 3.7.1.
I don't have anything useful to say other than start over with a clean environment (which you've probably already done a few times). Maybe ask in #openstack-glance. Perhaps you have an atypical environment?
Thanks & Best Regards,
==============================
Failed 2 tests - output below:
==============================
glance_store.tests.unit.test_filesystem_store.TestStore.test_add_check_metadata_list_with_valid_mountpoint_locations
Captured traceback:
b'Traceback (most recent call last):' b' File "/Users/sameshima/glance_store/glance_store/tests/unit/test_filesystem_store.py", line 215, in test_add_check_metadata_list_with_valid_mountpoint_locations' b' self.assertEqual(in_metadata[0], metadata)' b' File "/Users/sameshima/glance_store/.tox/py37/lib/python3.7/site-packages/testtools/testcase.py", line 411, in assertEqual' b' self.assertThat(observed, matcher, message)' b' File "/Users/sameshima/glance_store/.tox/py37/lib/python3.7/site-packages/testtools/testcase.py", line 498, in assertThat' b' raise mismatch_error' b"testtools.matchers._impl.MismatchError: {'id': 'abcdefg', 'mountpoint': '/tmp'} != {}" b'' glance_store.tests.unit.test_multistore_filesystem.TestMultiStore.test_add_check_metadata_list_with_valid_mountpoint_locations ------------------------------------------------------------------------------------------------------------------------------ Captured traceback:
b'Traceback (most recent call last):'
b' File "/Users/sameshima/glance_store/glance_store/tests/unit/test_multistore_filesystem.py", line 276, in test_add_check_metadata_list_with_valid_mountpoint_locations'
b' self.assertEqual(in_metadata[0], metadata)'
b' File "/Users/sameshima/glance_store/.tox/py37/lib/python3.7/site-packages/testtools/testcase.py", line 411, in assertEqual'
b' self.assertThat(observed, matcher, message)'
b' File "/Users/sameshima/glance_store/.tox/py37/lib/python3.7/site-packages/testtools/testcase.py", line 498, in assertThat'
b' raise mismatch_error'
b"testtools.matchers._impl.MismatchError: {'id': 'abcdefg', 'mountpoint': '/tmp'} != {'store': 'file1'}"
This email and all contents are subject to the following disclaimer: https://hello.global.ntt/en-us/email-disclaimer https://hello.global.ntt/en-us/email-disclaimer.aspx
Hi Abhishek and Brian,
Thank you for the reply.
I use Python3.7.4 with pyenv in macOS Mojave 10.14.6.
Curiously, when I run tests in docker container (image: Python3.7.4), all tests passed.
I think something is wrong with my environment, so I'll look into the cause of failure.
Thanks.
Naohiro Sameshima
That's the correct way to run the tests. I'm not sure why you're getting those failures -- I did a fresh checkout and all tests passed using Python 3.7.1.
I don't have anything useful to say other than start over with a clean environment (which you've probably already done a few times). Maybe ask in #openstack-glance. Perhaps you have an atypical environment?
---------------------------------------------------------------------------
Hi Naohiro,
There might be something wrong with your environment, I have run these tests on master branch in my environment and those are passing successfully. I have also submitted test patch [1] on gerrit, where it has passed the tests.
Thanks & Best Regards,
Abhishek Kekane
This email and all contents are subject to the following disclaimer: https://hello.global.ntt/en-us/email-disclaimer
On Wed, Nov 20, 2019 at 08:45:43AM +0000, Naohiro Sameshima(鮫島 直洋)(Group) wrote: [actually Abhishek wrote:]
That's the correct way to run the tests. I'm not sure why you're getting those failures -- I did a fresh checkout and all tests passed using Python 3.7.1.
I don't have anything useful to say other than start over with a clean environment (which you've probably already done a few times). Maybe ask in #openstack-glance. Perhaps you have an atypical environment?
Hi Naohiro,
There might be something wrong with your environment, I have run these tests on master branch in my environment and those are passing successfully. I have also submitted test patch [1] on gerrit, where it has passed the tests.
Hi Abhishek and Brian,
Thank you for the reply.
I use Python3.7.4 with pyenv in macOS Mojave 10.14.6.
Curiously, when I run tests in docker container (image: Python3.7.4), all tests passed.
I think something is wrong with my environment, so I'll look into the cause of failure.
Just a shot in the dark (haven't looked at the source yet), but since I saw /tmp mentioned in the error message, I wonder if it might have something to do with the /private/tmp and per-user temporary directories on most MacOS X installations...
G'luck, Peter
participants (3)
-
Brian Rosmaita
-
Naohiro Sameshima(鮫島 直洋)(Group)
-
Peter Pentchev