Fix failing unit tests because of unresolvable external jsonld context
It seems like a small time.Sleep after each test case when verifying VC/VP makes the tests work again. We now know that since recently, the W3C domains hosting the jsonld contexts for Verifiable Credentials are protected by Cloudflare and have enabled a rate limiter which breaks the tests. Thus, sometimes, jsonld base contexts for VCs cannot be fetched and used during verfication.
We tried to fix it by changing a bit the initialization of the signer service to use as dependency a caching jsonld document loader, which seemed to solve the problem when running tests locally and our company Gitlab CI environment. However it looks like sometimes the requests are still rejected, but we don't know why. We also cannot get the real error, because it is returned from deep within the Hyperledger Aries Go dependency libraries, more precisely the parse function in https://github.com/piprate/json-gold/blob/master/ld/context.go
They return a generic error, that the context cannot be resolved, but it does not include the error itself or status code returned in the HTTP response.
It would be good to resolve this issue in a better way. Debugging could be done with a new branch with modified dependencies which print the error and running it in the CI to see it.
I have created a new ticket, in case the issue pop again or we have time to do it #16