Skip to content
Commits on Source (9)
......@@ -38,7 +38,7 @@ stages:
- !reference [.rules-map, on-dev]
- !reference [.rules-map, not-on-semantic-release-commit]
- !reference [.rules-map, on-branch]
image: hub.eole.education/proxyhub/library/node:14.16.1-alpine
image: hub.eole.education/proxyhub/library/node:16.17.0-alpine
cache:
key:
files:
......@@ -51,7 +51,6 @@ stages:
# Only use the cache created by `yarn:install` and `yarn:build` jobs
policy: pull
###############################################################################
# `initial-checks` stage: `commitlint`, `yarn:build`
###############################################################################
......@@ -70,7 +69,6 @@ yarn:build:
- yarn run clean
- yarn run build
###############################################################################
# `test` stage: `prettier`, `eslint`, `js-test`
###############################################################################
......@@ -95,7 +93,6 @@ js-test:
script:
- yarn run test
###############################################################################
# `build` stage: `build-docker`
###############################################################################
......@@ -118,7 +115,6 @@ build-docker:
- !reference [.rules-map, not-on-semantic-release-commit]
- !reference [.rules-map, on-branch]
###############################################################################
# `release` stage: `new release`, testing prerelease`, `merge-to-dev`, `tag *`
###############################################################################
......
# Check out https://hub.docker.com/_/node to select a new base image
FROM hub.eole.education/proxyhub/library/node:14.16.1-alpine
FROM hub.eole.education/proxyhub/library/node:16.17.0-alpine
# Set to a non-root built-in user `node`
USER node
......
{
"name": "laboite-blog-backend",
"version": "1.3.0",
"version": "1.3.1-testing.1",
"license": "EUPL-1.2",
"description": " API backend for laboite blog service",
"author": "EOLE/PCLL <team@eole.education> - DINUM",
......@@ -21,9 +21,8 @@
"eslint": "lb-eslint --report-unused-disable-directives .",
"eslint:fix": "yarn run eslint --fix",
"pretest": "yarn run clean && yarn run build",
"test": "lb-mocha --allow-console-logs \"dist/__tests__\"",
"posttest": "yarn run lint",
"test:dev": "lb-mocha --allow-console-logs dist/__tests__/**/*.js && yarn run posttest",
"test": "lb-mocha --allow-console-logs \"dist/src/__tests__\"",
"test:dev": "lb-mocha --allow-console-logs dist/src/__tests__/**/*.js",
"docker:build": "docker build -t laboite-blog-backend .",
"docker:run": "docker run -p 3000:3000 --name api --env-file .env -d laboite-blog-backend && docker logs -f api",
"premigrate": "npm run build",
......
import {Client, expect} from '@loopback/testlab';
import {Client} from '@loopback/testlab';
import {LaboiteBlogBackendApplication} from '../..';
import {setupApplication} from './test-helper';
......@@ -14,8 +14,7 @@ describe('PingController', () => {
await app.stop();
});
it('invokes GET /ping', async () => {
const res = await client.get('/ping?msg=world').expect(200);
expect(res.body).to.containEql({greeting: 'Hello from LoopBack'});
it('invokes GET /', async () => {
await client.get('/').expect(200);
});
});
import {LaboiteBlogBackendApplication} from '../..';
import {
Client,
createRestAppClient,
givenHttpServerConfig,
Client,
} from '@loopback/testlab';
import {LaboiteBlogBackendApplication} from '../..';
export async function setupApplication(): Promise<AppWithClient> {
const restConfig = givenHttpServerConfig({
......
......@@ -10,7 +10,6 @@ export async function main(options: ApplicationConfig = {}) {
const url = app.restServer.url;
console.log(` - Server is running at ${url} (Version ${version})`);
console.log(` - Try ${url}/ping`);
return app;
}
......