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

Commit 88dfc1c

Browse files
dennisseahmtarng
andauthored
[HOUSEKEEPING] remove unused serviceName parameter in installBuildUpdatePipeline (#401)
Co-authored-by: Michael Tarng <[email protected]>
1 parent 55e9cca commit 88dfc1c

File tree

2 files changed

+5
-22
lines changed

2 files changed

+5
-22
lines changed

src/commands/service/pipeline.test.ts

+4-20
Original file line numberDiff line numberDiff line change
@@ -118,22 +118,14 @@ describe("required pipeline variables", () => {
118118
describe("create pipeline tests", () => {
119119
it("should create a pipeline", async () => {
120120
(createPipelineForDefinition as jest.Mock).mockReturnValueOnce({ id: 10 });
121-
await installBuildUpdatePipeline(
122-
"serviceName",
123-
"/path/to/yaml",
124-
MOCKED_VALUES
125-
);
121+
await installBuildUpdatePipeline("/path/to/yaml", MOCKED_VALUES);
126122
});
127123

128124
it("should fail if the build client cant be instantiated", async () => {
129125
(getBuildApiClient as jest.Mock).mockReturnValueOnce(Promise.reject());
130126

131127
try {
132-
await installBuildUpdatePipeline(
133-
"serviceName",
134-
"/path/to/yaml",
135-
MOCKED_VALUES
136-
);
128+
await installBuildUpdatePipeline("/path/to/yaml", MOCKED_VALUES);
137129
expect(true).toBe(false);
138130
} catch (_) {
139131
// expecting exception to be thrown
@@ -147,11 +139,7 @@ describe("create pipeline tests", () => {
147139
);
148140

149141
try {
150-
await installBuildUpdatePipeline(
151-
"serviceName",
152-
"/path/to/yaml",
153-
MOCKED_VALUES
154-
);
142+
await installBuildUpdatePipeline("/path/to/yaml", MOCKED_VALUES);
155143
expect(true).toBe(false);
156144
} catch (_) {
157145
// expecting exception to be thrown
@@ -164,11 +152,7 @@ describe("create pipeline tests", () => {
164152
(queueBuild as jest.Mock).mockReturnValueOnce(Promise.reject());
165153

166154
try {
167-
await installBuildUpdatePipeline(
168-
"serviceName",
169-
"/path/to/yaml",
170-
MOCKED_VALUES
171-
);
155+
await installBuildUpdatePipeline("/path/to/yaml", MOCKED_VALUES);
172156
expect(true).toBe(false);
173157
} catch (_) {
174158
// expecting exception to be thrown

src/commands/service/pipeline.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ export const execute = async (
9696
opts.repoName,
9797
accessOpts
9898
);
99-
await installBuildUpdatePipeline(serviceName, pipelinesYamlPath, opts);
99+
await installBuildUpdatePipeline(pipelinesYamlPath, opts);
100100
await exitFn(0);
101101
} catch (err) {
102102
logger.error(err);
@@ -124,7 +124,6 @@ export const commandDecorator = (command: commander.Command): void => {
124124
* @param values Values from commander
125125
*/
126126
export const installBuildUpdatePipeline = async (
127-
serviceName: string,
128127
pipelinesYamlPath: string,
129128
values: CommandOptions
130129
): Promise<void> => {

0 commit comments

Comments
 (0)