Add message to account-creation assertion

We've seen some failures in the gate like

    ==============================
    Failed 1 tests - output below:
    ==============================

    setUpModule (test.functional.test_account)
    ------------------------------------------

    Captured traceback:
    ~~~~~~~~~~~~~~~~~~~
        Traceback (most recent call last):
          File "test/functional/test_account.py", line 33, in setUpModule
            tf.setup_package()
          File "test/functional/__init__.py", line 716, in setup_package
            mem_object_server if in_mem_obj else object_server))
          File "test/functional/__init__.py", line 621, in in_process_setup
            create_account(AUTH_test)
          File "test/functional/__init__.py", line 619, in create_account
            assert(resp.status == 201)
        AssertionError

...which aren't terribly useful in figuring out what went wrong.

Change-Id: I3cd31bb480dc8508828fe21416bfae33bc0985b7
This commit is contained in:
Tim Burke 2017-05-04 17:48:22 +00:00
parent d7a6d6e1e9
commit 4c8239503a

View File

@ -616,7 +616,8 @@ def in_process_setup(the_object_server=object_server):
node['ip'], node['port'], node['device'], partition, 'PUT',
'/' + act, {'X-Timestamp': ts, 'x-trans-id': act})
resp = conn.getresponse()
assert(resp.status == 201)
assert resp.status == 201, 'Unable to create account: %s\n%s' % (
resp.status, resp.body)
create_account('AUTH_test')
create_account('AUTH_test2')