Skip to content

Commit

Permalink
fix: generated docker compose file should not contain description fie…
Browse files Browse the repository at this point in the history
…ld (#61)
  • Loading branch information
sirily11 authored Apr 5, 2022
1 parent d57958d commit 48edad4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export class InstallationService extends BaseMongoDBService<schema.IInstallation
delete deepCopiedTemplate.updatedAt;
delete deepCopiedTemplate.__v;
delete deepCopiedTemplate._id;
delete deepCopiedTemplate.description;
for (const [key, val] of Object.entries(deepCopiedTemplate.services)) {
//@ts-ignore
if (val.image.tag) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { mockData } from "@etherdata-blockchain/common";
import { mockData, utils } from "@etherdata-blockchain/common";
import { schema } from "@etherdata-blockchain/storage-model";
import { MongoMemoryServer } from "mongodb-memory-server";
import mongoose from "mongoose";
Expand Down Expand Up @@ -59,8 +59,10 @@ describe("Given a installation template service", () => {
const service = new InstallationService();
const template = await service.getTemplateWithDockerImages(templateId!);
const result = service.generateDockerComposeFile(template!);
const parsedResult = utils.yaml.parse(result);
expect(result).toBeDefined();
expect(result.length).toBeGreaterThan(0);
expect(parsedResult.description).toBeUndefined();
});

test("When calling generating env file", () => {
Expand Down

0 comments on commit 48edad4

Please sign in to comment.