Skip to content
This repository was archived by the owner on Apr 13, 2020. It is now read-only.

Commit 44c9970

Browse files
yradsmikhambnookala
authored andcommitted
updated unit tests
1 parent 22bf5ca commit 44c9970

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/lib/fileutils.test.ts

+3
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import {
2222
RENDER_HLD_PIPELINE_FILENAME,
2323
SERVICE_PIPELINE_FILENAME,
2424
VM_IMAGE,
25+
BEDROCK_FILENAME,
2526
} from "../lib/constants";
2627
import { disableVerboseLogging, enableVerboseLogging } from "../logger";
2728
import {
@@ -243,6 +244,7 @@ describe("generateServiceBuildAndUpdatePipelineYaml", () => {
243244
]);
244245
expect(serviceYaml?.trigger?.paths).toStrictEqual({
245246
include: [p],
247+
exclude: [BEDROCK_FILENAME],
246248
});
247249
}
248250
const yamlWithNoDot = serviceBuildAndUpdatePipeline(
@@ -252,6 +254,7 @@ describe("generateServiceBuildAndUpdatePipelineYaml", () => {
252254
);
253255
expect(yamlWithNoDot?.trigger?.paths).toStrictEqual({
254256
include: ["another-service"],
257+
exclude: [BEDROCK_FILENAME],
255258
});
256259
});
257260
});

src/test/mockFactory.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import yaml from "js-yaml";
2-
import { HELM_VERSION, VM_IMAGE } from "../lib/constants";
2+
import { HELM_VERSION, VM_IMAGE, BEDROCK_FILENAME } from "../lib/constants";
33
import {
44
BUILD_REPO_NAME,
55
generateYamlScript,
@@ -32,7 +32,10 @@ export const createTestServiceBuildAndUpdatePipelineYaml = (
3232
const data: AzurePipelinesYaml = {
3333
trigger: {
3434
branches: { include: ringBranches },
35-
paths: { include: [sanitizeTriggerPath(relativeServicePathFormatted)] }, // Only building for a single service's path.
35+
paths: {
36+
include: [sanitizeTriggerPath(relativeServicePathFormatted)],
37+
exclude: [BEDROCK_FILENAME],
38+
}, // Only building for a single service's path.
3639
},
3740
variables: [...(variableGroups ?? []).map((group) => ({ group }))],
3841
stages: [

0 commit comments

Comments
 (0)