fix(gerrit): not auto-merging if Code-Review changed from +2 to +1 #68602
Annotations
6 errors
Unit tests:
lib/modules/platform/gitlab/index.spec.ts#L2768
*** Missing HTTP mocks ***
- GET https://gitlab.com/api/v4/projects/undefined/merge_requests/12345/approvals
Requests done:
- GET https://gitlab.com/api/v4/user [200]
- GET https://gitlab.com/api/v4/version [200]
- POST https://gitlab.com/api/v4/projects/undefined/merge_requests [200]
- POST https://gitlab.com/api/v4/projects/undefined/merge_requests/12345/approve [200]
---
Renovate testing strategy requires that every HTTP request
has a corresponding mock.
This error occurs when some of the request aren't mocked.
Let's suppose your code performs two HTTP calls:
GET https://example.com/foo/bar/fail 404 <without body>
POST https://example.com/foo/bar/success 200 { "ok": true }
The unit test should have this mock:
httpMock.scope('https://example.com/foo/bar')
.get('/fail')
.reply(404)
.post('/success')
.reply(200, { ok: true });
Note: `httpMock.scope(...)` is the Renovate-specific construct.
The scope object itself is provided by the `nock` library.
Details: https://github.com/nock/nock#usage
at <test> (lib/modules/platform/gitlab/index.spec.ts:2768:9)
|
Unit tests:
lib/modules/platform/gitlab/index.spec.ts#L2801
*** Missing HTTP mocks ***
- GET https://gitlab.com/api/v4/projects/undefined/merge_requests/12345/approvals
Requests done:
- GET https://gitlab.com/api/v4/user [200]
- GET https://gitlab.com/api/v4/version [200]
- POST https://gitlab.com/api/v4/projects/undefined/merge_requests [200]
---
Renovate testing strategy requires that every HTTP request
has a corresponding mock.
This error occurs when some of the request aren't mocked.
Let's suppose your code performs two HTTP calls:
GET https://example.com/foo/bar/fail 404 <without body>
POST https://example.com/foo/bar/success 200 { "ok": true }
The unit test should have this mock:
httpMock.scope('https://example.com/foo/bar')
.get('/fail')
.reply(404)
.post('/success')
.reply(200, { ok: true });
Note: `httpMock.scope(...)` is the Renovate-specific construct.
The scope object itself is provided by the `nock` library.
Details: https://github.com/nock/nock#usage
at <test> (lib/modules/platform/gitlab/index.spec.ts:2801:9)
|
Unit tests:
lib/modules/platform/gitlab/index.spec.ts#L2768
*** Missing HTTP mocks ***
- GET https://gitlab.com/api/v4/projects/undefined/merge_requests/1/approvals
Requests done:
- GET https://gitlab.com/api/v4/user [200]
- GET https://gitlab.com/api/v4/version [200]
- GET https://gitlab.com/api/v4/projects/undefined/merge_requests?per_page=100&scope=created_by_me [200]
- PUT https://gitlab.com/api/v4/projects/undefined/merge_requests/1 [200]
- POST https://gitlab.com/api/v4/projects/undefined/merge_requests/1/approve [200]
---
Renovate testing strategy requires that every HTTP request
has a corresponding mock.
This error occurs when some of the request aren't mocked.
Let's suppose your code performs two HTTP calls:
GET https://example.com/foo/bar/fail 404 <without body>
POST https://example.com/foo/bar/success 200 { "ok": true }
The unit test should have this mock:
httpMock.scope('https://example.com/foo/bar')
.get('/fail')
.reply(404)
.post('/success')
.reply(200, { ok: true });
Note: `httpMock.scope(...)` is the Renovate-specific construct.
The scope object itself is provided by the `nock` library.
Details: https://github.com/nock/nock#usage
at <test> (lib/modules/platform/gitlab/index.spec.ts:2768:9)
|
Unit tests:
lib/modules/platform/azure/index.ts#L1010
TypeError: Cannot read properties of undefined (reading 'createPullRequestReviewer')
at createPullRequestReviewer (lib/modules/platform/azure/index.ts:1010:21)
at Object.createPr (lib/modules/platform/azure/index.ts:516:5)
at Object.<anonymous> (lib/modules/platform/azure/index.spec.ts:1160:18)
|
Unit tests:
lib/modules/platform/azure/index.ts#L1002
TypeError: Cannot read properties of undefined (reading 'getPullRequestById')
at getPullRequestById (lib/modules/platform/azure/index.ts:1002:27)
at Object.updatePr (lib/modules/platform/azure/index.ts:573:5)
at Object.<anonymous> (lib/modules/platform/azure/index.spec.ts:1307:18)
|
Unit tests
Process completed with exit code 1.
|
Loading