ReflectionsProjections / rp-api-2023

Core Backend API Layer for Reflections | Projections 2023, powered by Nest.js
MIT License
0 stars 0 forks source link

removed rate limiting and throttler module #51

Closed rachelh6 closed 1 year ago

rachelh6 commented 1 year ago

Removed rate limiting from the app.module & skip throttler from carp

github-actions[bot] commented 1 year ago

Coverage report

❌ An unexpected error occurred. For more details, check console

Error: The process '/opt/hostedtoolcache/node/16.20.2/x64/bin/npx' failed with exit code 1
St.:grey_question:
Category Percentage Covered / Total
πŸ”΄ Statements 59.34% 502/846
πŸ”΄ Branches 7.52% 10/133
πŸ”΄ Functions 23.08% 27/117
πŸ”΄ Lines 56.66% 438/773

Test suite run failed

Failed tests: 1/18. Failed suites: 2/15.
``` ● Test suite failed to run src/events/events.controller.spec.ts:109:30 - error TS2345: Argument of type '{ status: HttpStatus; message: string; priority: boolean; }' is not assignable to parameter of type '{ status: HttpStatus; message: string; priority?: undefined; prior_check_in?: undefined; } | { status: HttpStatus; message: string; priority: boolean; prior_check_in: boolean; }'. Property 'prior_check_in' is missing in type '{ status: HttpStatus; message: string; priority: boolean; }' but required in type '{ status: HttpStatus; message: string; priority: boolean; prior_check_in: boolean; }'. 109 .mockResolvedValueOnce(successResponse); ~~~~~~~~~~~~~~~ src/events/events.service.ts:82:9 82 prior_check_in: true, ~~~~~~~~~~~~~~~~~~~~ 'prior_check_in' is declared here. src/events/events.controller.spec.ts:167:30 - error TS2345: Argument of type '{ status: HttpStatus; message: string; priority: boolean; }' is not assignable to parameter of type '{ status: HttpStatus; message: string; priority?: undefined; prior_check_in?: undefined; } | { status: HttpStatus; message: string; priority: boolean; prior_check_in: boolean; }'. Property 'prior_check_in' is missing in type '{ status: HttpStatus; message: string; priority: boolean; }' but required in type '{ status: HttpStatus; message: string; priority: boolean; prior_check_in: boolean; }'. 167 .mockResolvedValueOnce(successResponse); ~~~~~~~~~~~~~~~ src/events/events.service.ts:82:9 82 prior_check_in: true, ~~~~~~~~~~~~~~~~~~~~ 'prior_check_in' is declared here. ``` --- ``` ● S3ModuleService β€Ί should be defined Nest can't resolve dependencies of the S3Service (S3Client, ?). Please make sure that the argument AttendeeService at index [1] is available in the RootTestModule context. Potential solutions: - Is RootTestModule a valid NestJS module? - If AttendeeService is a provider, is it part of the current RootTestModule? - If AttendeeService is exported from a separate @Module, is that module imported within RootTestModule? @Module({ imports: [ /* the Module containing AttendeeService */ ] }) 7 | 8 | beforeEach(async () => { > 9 | const module: TestingModule = await Test.createTestingModule({ | ^ 10 | imports: [], 11 | providers: [{ provide: 'S3Client', useValue: new S3Client() }, S3Service], 12 | }).compile(); at TestingInjector.lookupComponentInParentModules (../node_modules/@nestjs/core/injector/injector.js:247:19) at TestingInjector.resolveComponentInstance (../node_modules/@nestjs/core/injector/injector.js:200:33) at TestingInjector.resolveComponentInstance (../node_modules/@nestjs/testing/testing-injector.js:19:45) at resolveParam (../node_modules/@nestjs/core/injector/injector.js:120:38) at async Promise.all (index 1) at TestingInjector.resolveConstructorParams (../node_modules/@nestjs/core/injector/injector.js:135:27) at TestingInjector.loadInstance (../node_modules/@nestjs/core/injector/injector.js:61:13) at TestingInjector.loadProvider (../node_modules/@nestjs/core/injector/injector.js:88:9) at ../node_modules/@nestjs/core/injector/instance-loader.js:56:13 at async Promise.all (index 4) at TestingInstanceLoader.createInstancesOfProviders (../node_modules/@nestjs/core/injector/instance-loader.js:55:9) at ../node_modules/@nestjs/core/injector/instance-loader.js:40:13 at async Promise.all (index 1) at TestingInstanceLoader.createInstances (../node_modules/@nestjs/core/injector/instance-loader.js:39:9) at TestingInstanceLoader.createInstancesOfDependencies (../node_modules/@nestjs/core/injector/instance-loader.js:22:13) at TestingInstanceLoader.createInstancesOfDependencies (../node_modules/@nestjs/testing/testing-instance-loader.js:9:9) at TestingModuleBuilder.createInstancesOfDependencies (../node_modules/@nestjs/testing/testing-module.builder.js:97:9) at TestingModuleBuilder.compile (../node_modules/@nestjs/testing/testing-module.builder.js:63:9) at Object. (s3/s3.service.spec.ts:9:35) ```

Report generated by πŸ§ͺjest coverage report action from 44bb644a3bf3719c15838f321a48b4cf794cf921

xuxey commented 1 year ago

There are more places where SkipThrottle was used, can we also remove those?

@rachelh6

rachelh6 commented 1 year ago

@xuxey where do you see those? i tried searching throttle within the code but nothing else came up.

xuxey commented 1 year ago

@xuxey where do you see those? i tried searching throttle within the code but nothing else came up.

Do you have the latest version of the main branch?