##// END OF EJS Templates
fix(tests): fixed tests for vcs-operations
super-admin -
r5292:e8e7c927 default
parent child Browse files
Show More
@@ -248,7 +248,7 b' class TestVCSOperations(object):'
248 248
249 249 # init cache objects
250 250 CacheKey.delete_all_cache()
251 cache_namespace_uid = 'cache_push_test.{}'.format(hg_repo.repo_id)
251
252 252 repo_namespace_key = CacheKey.REPO_INVALIDATION_NAMESPACE.format(repo_id=hg_repo.repo_id)
253 253
254 254 inv_context_manager = rc_cache.InvalidationContext(key=repo_namespace_key)
@@ -257,6 +257,10 b' class TestVCSOperations(object):'
257 257 # __enter__ will create and register cache objects
258 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 264 # clone to init cache
261 265 clone_url = rc_web_server.repo_clone_url(hg_repo.repo_name)
262 266 stdout, stderr = Command('/tmp').execute(
@@ -276,9 +280,8 b' class TestVCSOperations(object):'
276 280 hg_repo = Repository.get_by_repo_name(HG_REPO)
277 281 cache_keys = hg_repo.cache_keys
278 282 assert cache_keys != []
279 for key in cache_keys:
280 # keys should be marked as not active
281 assert key.cache_active is False
283 new_ids = [x.cache_state_uid for x in cache_keys]
284 assert new_ids != old_ids
282 285
283 286 def test_push_wrong_credentials_hg(self, rc_web_server, tmpdir):
284 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