Closed ylemkimon closed 3 years ago
We want all our tests to pass "offline" but sometimes in the past we've accidentally added tests which do real queries. I wondered if our nock net connect settings had avoided that though.
I'll check those tests. Net connect will only blocked for tests which are using our http test utils
If I understand correctly, this issue is ready to start working on? As we have confirmed that there is no mock right now, where we should have a mock?
I think test failures should be a high priority, as flaky tests will annoy everybody, and reduce confidence in the tests.
Feel free to re-label if this is wrong. 😄
Classify as refactor
as it's only relevant to tests.
This are the requests send by workers/pr/changelog/github.spec.ts
workers/pr/changelog/github getChangeLogJSON works without Github
nock('https://api.github.com:443', {"encodedQueryParams":true})
.get('/repos/chalk/chalk/tags')
.query({"per_page":"100"})
.reply(401, {"message":"Bad credentials","documentation_url":"https://docs.github.com/rest"}, [
'Server',
'GitHub.com',
'Date',
'Mon, 09 Aug 2021 15:12:01 GMT',
'Content-Type',
'application/json; charset=utf-8',
'Content-Length',
'80',
'X-GitHub-Media-Type',
'github.v3; format=json',
'X-RateLimit-Limit',
'60',
'X-RateLimit-Remaining',
'0',
'X-RateLimit-Reset',
'1628524711',
'X-RateLimit-Used',
'106',
'X-RateLimit-Resource',
'core',
'Access-Control-Expose-Headers',
'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset',
'Access-Control-Allow-Origin',
'*',
'Strict-Transport-Security',
'max-age=31536000; includeSubdomains; preload',
'X-Frame-Options',
'deny',
'X-Content-Type-Options',
'nosniff',
'X-XSS-Protection',
'0',
'Referrer-Policy',
'origin-when-cross-origin, strict-origin-when-cross-origin',
'Content-Security-Policy',
"default-src 'none'",
'Vary',
'Accept-Encoding, Accept, X-Requested-With',
'X-GitHub-Request-Id',
'C1F1:7C9E:1848FE6:18DCB1F:611145C1',
'connection',
'close'
]);
----
They all fail silently with 401 and Bad credentials
so #5699 simply added non functional tests 😕
:tada: This issue has been resolved in version 25.70.1 :tada:
The release is available on:
25.70.1
Your semantic-release bot :package::rocket:
How are you running Renovate?
N/A
Describe the bug
workers/pr/changelog/github › getChangeLogJSON › supports github enterprise and github enterprise changelog
test fails intermittently, most of the time locally and sometimes on CI.Relevant debug logs
Have you created a minimal reproduction repository?
N/A
Additional context
It seems it hangs on
addReleaseNotes()
. Might it be making an actual request?