mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-11-17 07:45:52 +01:00
dbf20175dc
* feat: support for npm token This is an effor of: This commit intent to provide npm token support. https: //github.com/verdaccio/verdaccio/issues/541 https: //github.com/verdaccio/verdaccio/pull/1271 https: //github.com/verdaccio/local-storage/pull/168 Co-Authored-By: Manuel Spigolon <behemoth89@gmail.com> Co-Authored-By: Juan Gabriel Jiménez <juangabreil@gmail.com> * chore: update secrets baselines Co-Authored-By: Liran Tal <liran.tal@gmail.com> * chore: update lock file * chore: add logger mock methods * chore: update @verdaccio/types * refactor: unit test was flacky adapt the pkg access to the new configuration setup * refactor: add plugin methods validation * test: add test for aesEncrypt * chore: update local-storage dependency * chore: add support for experimetns token will be part of the experiment lists * chore: increase timeout * chore: increase timeout threshold * chore: update nock * chore: update dependencies * chore: update eslint config * chore: update dependencies * test: add unit test for npm token * chore: update readme
32 lines
1.0 KiB
TypeScript
32 lines
1.0 KiB
TypeScript
import {HTTP_STATUS} from "../../../src/lib/constants";
|
|
|
|
const PKG_SINGLE_UPLINK = 'test-uplink-timeout-single';
|
|
const PKG_MULTIPLE_UPLINKS = 'test-uplink-timeout-multiple';
|
|
|
|
export default function (server, server2, server3) {
|
|
|
|
describe('uplink connection timeouts', () => {
|
|
|
|
//more info: https://github.com/verdaccio/verdaccio/pull/1331
|
|
|
|
jest.setTimeout(20000);
|
|
beforeAll(async () => {
|
|
await server2.addPackage(PKG_SINGLE_UPLINK).status(HTTP_STATUS.CREATED);
|
|
await server2.addPackage(PKG_MULTIPLE_UPLINKS).status(HTTP_STATUS.CREATED);
|
|
await server3.addPackage(PKG_MULTIPLE_UPLINKS).status(HTTP_STATUS.CREATED);
|
|
});
|
|
|
|
describe('get package', () => {
|
|
test('503 response when uplink connection ESOCKETTIMEDOUT', () => {
|
|
return server.getPackage(PKG_SINGLE_UPLINK).status(HTTP_STATUS.SERVICE_UNAVAILABLE);
|
|
});
|
|
|
|
test('200 response even though one uplink timeout', () => {
|
|
return server.getPackage(PKG_MULTIPLE_UPLINKS).status(HTTP_STATUS.OK)
|
|
});
|
|
});
|
|
|
|
});
|
|
|
|
}
|