Show More
@@ -248,7 +248,7 b' class TestVCSOperations(object):' | |||||
248 |
|
248 | |||
249 | # init cache objects |
|
249 | # init cache objects | |
250 | CacheKey.delete_all_cache() |
|
250 | CacheKey.delete_all_cache() | |
251 | cache_namespace_uid = 'cache_push_test.{}'.format(hg_repo.repo_id) |
|
251 | ||
252 | repo_namespace_key = CacheKey.REPO_INVALIDATION_NAMESPACE.format(repo_id=hg_repo.repo_id) |
|
252 | repo_namespace_key = CacheKey.REPO_INVALIDATION_NAMESPACE.format(repo_id=hg_repo.repo_id) | |
253 |
|
253 | |||
254 | inv_context_manager = rc_cache.InvalidationContext(key=repo_namespace_key) |
|
254 | inv_context_manager = rc_cache.InvalidationContext(key=repo_namespace_key) | |
@@ -257,6 +257,10 b' class TestVCSOperations(object):' | |||||
257 | # __enter__ will create and register cache objects |
|
257 | # __enter__ will create and register cache objects | |
258 | pass |
|
258 | pass | |
259 |
|
259 | |||
|
260 | cache_keys = hg_repo.cache_keys | |||
|
261 | assert cache_keys != [] | |||
|
262 | old_ids = [x.cache_state_uid for x in cache_keys] | |||
|
263 | ||||
260 | # clone to init cache |
|
264 | # clone to init cache | |
261 | clone_url = rc_web_server.repo_clone_url(hg_repo.repo_name) |
|
265 | clone_url = rc_web_server.repo_clone_url(hg_repo.repo_name) | |
262 | stdout, stderr = Command('/tmp').execute( |
|
266 | stdout, stderr = Command('/tmp').execute( | |
@@ -276,9 +280,8 b' class TestVCSOperations(object):' | |||||
276 | hg_repo = Repository.get_by_repo_name(HG_REPO) |
|
280 | hg_repo = Repository.get_by_repo_name(HG_REPO) | |
277 | cache_keys = hg_repo.cache_keys |
|
281 | cache_keys = hg_repo.cache_keys | |
278 | assert cache_keys != [] |
|
282 | assert cache_keys != [] | |
279 | for key in cache_keys: |
|
283 | new_ids = [x.cache_state_uid for x in cache_keys] | |
280 | # keys should be marked as not active |
|
284 | assert new_ids != old_ids | |
281 | assert key.cache_active is False |
|
|||
282 |
|
285 | |||
283 | def test_push_wrong_credentials_hg(self, rc_web_server, tmpdir): |
|
286 | def test_push_wrong_credentials_hg(self, rc_web_server, tmpdir): | |
284 | clone_url = rc_web_server.repo_clone_url(HG_REPO) |
|
287 | clone_url = rc_web_server.repo_clone_url(HG_REPO) |
General Comments 0
You need to be logged in to leave comments.
Login now