glance/glance/tests/unit
Mike Fedosin 5bebd513fa Cleanup chunks for deleted image if token expired
In patch I47229b366c25367ec1bd48aec684e0880f3dfe60 it was
introduced the logic that if image was deleted during file
upload when we want to update image status from 'saving'
to 'active' it's expected to get Duplicate error and delete
stale chunks after that. But if user's token is expired
there will be Unathorized exception and chunks will stay
in store and clog it.
And when, the upload operation for such an image is
completed the operator configured quota can be exceeded.

This patch fixes the issue of left over chunks for an image
which was deleted from saving status, by correctly handle
auth exceptions from registry server.

Partial-bug: #1498163

Conflicts:
	glance/api/v1/upload_utils.py
        (Kilo catches NotFound instead of ImagenotFound)

Change-Id: I17a66eca55bfb83107046910e69c4da01415deec
(cherry picked from commit 98a8832777a0639a4031e52c69f0d565b3f500c5)
2015-10-01 15:45:20 +00:00
..
api Move to graduated oslo.log module 2015-03-12 11:48:24 +00:00
async Don't import files with backed files 2015-08-13 20:55:21 +02:00
common return request_id in case of 500 error 2015-08-17 23:46:27 -07:00
v0_1 Plugin types are not exposed to the client. 2015-04-23 16:38:18 -04:00
v1 Cleanup chunks for deleted image if token expired 2015-10-01 15:45:20 +00:00
v2 Cleanup chunks for deleted image if token expired 2015-10-01 15:45:20 +00:00
__init__.py Empty files shouldn't contain copyright nor license 2013-12-24 22:39:05 -06:00
base.py Use graduated oslo.policy 2015-03-17 23:50:02 -05:00
fake_rados.py Fixes rbd _delete_image snapshot with missing image 2013-10-07 23:15:49 +01:00
test_artifact_type_definition_framework.py Artifact Plugins Loader 2015-03-30 20:51:10 +03:00
test_artifacts_plugin_loader.py Artifact Plugins Loader 2015-03-30 20:51:10 +03:00
test_auth.py Switch to mox3 2015-01-26 10:59:26 +01:00
test_cache_middleware.py Use graduated oslo.policy 2015-03-17 23:50:02 -05:00
test_cached_images.py Improved coverage for glance.api.* 2014-06-15 17:44:09 +00:00
test_context.py Unify using six.moves.range rename everywhere 2015-02-25 12:05:36 +00:00
test_context_middleware.py Fix Request ID has a double 'req-' at the start 2015-08-19 13:46:24 +00:00
test_db.py Fix intermittent test case failure due to dict order 2015-04-01 18:28:29 +00:00
test_db_metadef.py Adding Metadef Tag support 2014-12-17 19:45:40 +00:00
test_domain.py Remove the eventlet executor 2015-03-06 17:33:56 -04:30
test_domain_proxy.py Unify using six.moves.range rename everywhere 2015-02-25 12:05:36 +00:00
test_gateway.py Move elasticsearch dep to test-requirements.txt 2015-04-08 10:59:44 -07:00
test_glance_replicator.py Remove exception declarations from replicator.py 2014-11-11 14:01:18 +00:00
test_image_cache.py Glance cache to not prune newly cached images 2015-04-01 23:26:12 -04:00
test_image_cache_client.py Isolate test from environment variables 2014-10-13 15:50:23 +00:00
test_jsonpatchmixin.py A mixin for jsonpatch requests validation 2015-03-30 20:51:10 +03:00
test_manage.py Merge "Move to graduated oslo.log module" 2015-03-13 01:31:16 +00:00
test_migrations.py Database layer for Artifact Repository 2015-03-27 02:48:15 +03:00
test_misc.py Unify using six.moves.range rename everywhere 2015-02-25 12:05:36 +00:00
test_notifier.py oslo: migrate namespace-less import paths 2015-03-17 22:47:39 +08:00
test_opts.py Add client_socket_timeout option 2015-06-19 08:51:43 -07:00
test_policy.py Merge "Use graduated oslo.policy" 2015-03-19 18:18:21 +00:00
test_quota.py Unify using six.moves.range rename everywhere 2015-02-25 12:05:36 +00:00
test_schema.py Fix assertEqual arguments order 2014-09-19 00:25:18 +08:00
test_scrubber.py Merge "Unify using six.moves.range rename everywhere" 2015-03-09 20:51:52 +00:00
test_search.py Catalog Index Service 2015-03-26 10:12:27 -07:00
test_store_image.py Switch to mox3 2015-01-26 10:59:26 +01:00
test_store_location.py Upgrade to hacking 0.10 2015-01-13 15:03:27 +01:00
test_versions.py v1 API should be in SUPPORTED status 2015-04-23 19:38:13 +00:00
utils.py Move to graduated oslo.log module 2015-03-12 11:48:24 +00:00