Skip to content

Commit

Permalink
chore: Completing documentation for nest-order-service
Browse files Browse the repository at this point in the history
Signed-off-by: Laurent Broudoux <[email protected]>
  • Loading branch information
lbroudoux committed Nov 21, 2023
1 parent 6707f76 commit a922ede
Show file tree
Hide file tree
Showing 9 changed files with 389 additions and 60 deletions.
422 changes: 376 additions & 46 deletions shift-left-demo/nest-order-service/README.md

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@ services:
restart: on-failure
image: quay.io/microcks/microcks-cli:latest
volumes:
- "./src/main/resources:/resources"
- "./src/test/resources/third-parties:/third-parties"
- "./test/resources:/resources"
entrypoint:
- microcks-cli
- import
- '/resources/order-service-openapi.yaml:true,/third-parties/apipastries-openapi.yaml:true,/third-parties/apipastries-postman-collection.json:false'
- '/resources/order-service-openapi.yml:true,/resources/apipastries-openapi.yml:true,/resources/apipastries-postman-collection.json:false'
- --microcksURL=http://microcks:8080/api
- --insecure
- --keycloakClientId=foo
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export enum OrderStatus {
CREATED,
VALIDATED,
CANCELED,
FAILED
CREATED = 'CREATED',
VALIDATED = 'VALIDATED',
CANCELED = 'CANCELED',
FAILED = 'FAILED'
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { PastryService } from './pastry.service';
@Module({
imports: [ConfigModule.forRoot({
load: [() => ({
'pastries.baseurl': 'http://localhost:4000/api'
'pastries.baseurl': 'http://localhost:9090/rest/API+Pastries/0.0.1'
})],
})],
providers: [PastryService],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ describe('PastryService', () => {
let container: StartedMicrocksContainer;
let service: PastryService;

beforeEach(async () => {
beforeAll(async () => {
// Start container and load artifacts.
container = await new MicrocksContainer()
.withMainArtifacts([path.resolve(resourcesDir, 'apipastries-openapi.yml')])
Expand All @@ -33,7 +33,7 @@ describe('PastryService', () => {
service = module.get<PastryService>(PastryService);
});

afterEach(async () => {
afterAll(async () => {
// Now stop the container.
await container.stop();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ describe('OrderController (e2e)', () => {
let app: INestApplication;
let appPort: number;

beforeEach(async () => {
beforeAll(async () => {
appPort = (await findFreePorts(1, {startPort: 3000, endPort: 3100}))[0];
await TestContainers.exposeHostPorts(appPort);

Expand All @@ -43,7 +43,7 @@ describe('OrderController (e2e)', () => {
await app.listen(appPort);
});

afterEach(async () => {
afterAll(async () => {
// Now stop the container and the network.
await container.stop();
await app.close();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ describe('OrderController (e2e)', () => {
let app: INestApplication;
let appPort: number;

beforeEach(async () => {
beforeAll(async () => {
appPort = (await findFreePorts(1, {startPort: 3000, endPort: 3100}))[0];
await TestContainers.exposeHostPorts(appPort);

Expand Down Expand Up @@ -48,7 +48,7 @@ describe('OrderController (e2e)', () => {
await app.listen(appPort);
});

afterEach(async () => {
afterAll(async () => {
// Now stop the ensemble and the network.
await ensemble.stop();
await network.stop();
Expand Down

0 comments on commit a922ede

Please sign in to comment.