Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…server into THR-18-dev-feature-h5p-editor
  • Loading branch information
MajedAlaitwniCap committed Oct 25, 2023
2 parents 36835a7 + 3e112cc commit 71b4b0d
Show file tree
Hide file tree
Showing 60 changed files with 3,263 additions and 6,175 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,18 @@ jobs:
run: |
sudo apt-get install -y lcov
find coverage -name *.info -exec echo -a {} \; | xargs lcov -o merged-lcov.info
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: SonarCloud upload coverage
uses: SonarSource/sonarcloud-github-action@v1.9
uses: SonarSource/sonarcloud-github-action@v2.0.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }}
nest_lint:
runs-on: ubuntu-latest
timeout-minutes: 5
timeout-minutes: 6
steps:
- name: checkout
uses: actions/checkout@v3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ data:
else
echo "gg, hacky mongo replicaset"
fi
{% if KEDA_NAMESPACE_ACTIVATOR_ENABLED is defined %}
curl -XPUT -H 'Content-Type: application/json' -Lv 'https://activate.cd.dbildungscloud.dev/namespace' -d '{"name" : "{{ NAMESPACE }}"}'
{% endif %}
curl --retry 360 --retry-connrefused --retry-delay 10 -X POST 'http://mgmt-svc:3333/api/management/database/seed?with-indexes=true'

# Below is a series of a MongoDB-data initializations, meant for the development and testing
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { Test, TestingModule } from '@nestjs/testing';
import { AccountController } from './account.controller';
import { AccountUc } from '../uc/account.uc';

describe('account.controller', () => {
let module: TestingModule;
let controller: AccountController;
beforeAll(async () => {
module = await Test.createTestingModule({
providers: [
AccountController,
{
provide: AccountUc,
useValue: {},
},
],
}).compile();
controller = module.get(AccountController);
});

it('should be defined', () => {
expect(controller).toBeDefined();
});
});
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Body, Controller, Delete, Get, Param, Patch, Query } from '@nestjs/common';
import { ApiOperation, ApiResponse, ApiTags } from '@nestjs/swagger';
import { Authenticate, CurrentUser } from '@src/modules/authentication/decorator/auth.decorator';
import { EntityNotFoundError, ForbiddenOperationError, ValidationError } from '@shared/common';
import { ICurrentUser } from '@modules/authentication';
import { Authenticate, CurrentUser } from '@modules/authentication/decorator/auth.decorator';
import { ICurrentUser } from '@src/modules/authentication';
import { AccountUc } from '../uc/account.uc';
import {
AccountByIdBodyParams,
Expand Down Expand Up @@ -33,8 +33,6 @@ export class AccountController {
@Query() query: AccountSearchQueryParams
): Promise<AccountSearchListResponse> {
return this.accountUc.searchAccounts(currentUser, query);

// TODO: mapping from domain to api dto should be a responsability of the controller (also every other function here)
}

@Get(':id')
Expand Down
Loading

0 comments on commit 71b4b0d

Please sign in to comment.