示例#1
0
    def test_get_manifest_renews_expired_token(self):
        if not hasattr(model_cache, "empty_for_testing"):
            # don't continue testing if we can't empty the cache as it will certainly fail.
            return

        # by clearing the cache and proxy session we force the proxy to
        # re-authenticate against the upstream registry.
        model_cache.empty_for_testing()
        self.proxy._session.headers.pop("Authorization")
        try:
            self.proxy.get_manifest(image_ref=self.tag)
        except Exception as e:
            assert False, f"unexpected exception {e}"
示例#2
0
 def test_save_package_bad_release(self, newdb):
     model_cache.empty_for_testing()
     CnrTestModels.test_save_package_bad_release(self, newdb)
示例#3
0
 def test_save_package(self, newdb, package_b64blob):
     model_cache.empty_for_testing()
     CnrTestModels.test_save_package(self, newdb, package_b64blob)