UNPKG

@catladder/pipeline

Version:

Panter workflow for cloud CI/CD and DevOps

79 lines (78 loc) 1.76 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var configruedEnvs_1 = require("../configruedEnvs"); describe("getAllEnvs()", function () { var cluster = { type: "gcloud", name: "mega-cluster", projectId: "super-google-project", region: "ch-blabla" }; var SIMPLE_CONFIG = { appName: "my-app", customerName: "pan", components: { app1: { dir: "dir1", build: { type: "node" }, deploy: { type: "kubernetes", cluster: cluster } }, app2: { dir: "dir2", build: { type: "node" }, deploy: { type: "kubernetes", cluster: cluster }, env: { dev2: { type: "dev" }, review2: { type: "review" }, stage2: { type: "stage" }, prod2: { type: "prod" } } }, app3: { dir: "dir2", build: { type: "node" }, deploy: { type: "kubernetes", cluster: cluster }, env: { dev: false, review: false, stage: false, prod: false } } } }; it("should return all envs for app1", function () { expect((0, configruedEnvs_1.getAllEnvs)(SIMPLE_CONFIG, "app1")).toMatchSnapshot(); }); it("should return all envs for app2", function () { expect((0, configruedEnvs_1.getAllEnvs)(SIMPLE_CONFIG, "app2")).toMatchSnapshot(); }); it("should return all envs for app3", function () { expect((0, configruedEnvs_1.getAllEnvs)(SIMPLE_CONFIG, "app3")).toMatchSnapshot(); }); });