Skip to content

Commit

Permalink
fix: IS-3260: Helmfile dep check variable standardization (#60)
Browse files Browse the repository at this point in the history
* update action yaml and script

* update tests

* re-build dist

Co-authored-by: Marcin Dobosz <[email protected]>
  • Loading branch information
dlongeuay and marcind authored Nov 19, 2020
1 parent 178e974 commit 5c9be6a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions helmfile-dependency-check/__test__/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ beforeEach(() => {
})

afterEach(() => {
delete process.env["INPUT_WORKING-DIR"]
delete process.env["INPUT_WORKING_DIRECTORY"]
})

describe("helmfile-dep-update", () => {
it("helmfile missing", async () => {
process.env["INPUT_WORKING-DIR"] = path.join(baseDir, "helmfile-missing")
process.env["INPUT_WORKING_DIRECTORY"] = path.join(baseDir, "helmfile-missing")
const setOutputMock = jest.spyOn(core, "setOutput")

await helmfileDepCheck()
Expand All @@ -30,7 +30,7 @@ describe("helmfile-dep-update", () => {
expect(setOutputMock).toHaveBeenCalledWith("helmfile-lock-updates", [])
})
it("helmfile missing repositories", async () => {
process.env["INPUT_WORKING-DIR"] = path.join(baseDir, "helmfile-no-repository")
process.env["INPUT_WORKING_DIRECTORY"] = path.join(baseDir, "helmfile-no-repository")
const setOutputMock = jest.spyOn(core, "setOutput")

await helmfileDepCheck()
Expand All @@ -39,7 +39,7 @@ describe("helmfile-dep-update", () => {
expect(setOutputMock).toHaveBeenCalledWith("helmfile-lock-updates", [])
})
it("helmfile lock fresh", async () => {
process.env["INPUT_WORKING-DIR"] = path.join(baseDir, "helmfile-lock-fresh")
process.env["INPUT_WORKING_DIRECTORY"] = path.join(baseDir, "helmfile-lock-fresh")
const setOutputMock = jest.spyOn(core, "setOutput")

await helmfileDepCheck()
Expand All @@ -48,7 +48,7 @@ describe("helmfile-dep-update", () => {
expect(setOutputMock).toHaveBeenCalledWith("helmfile-lock-updates", [])
})
it("helmfile lock update", async () => {
process.env["INPUT_WORKING-DIR"] = path.join(baseDir, "helmfile-lock-update")
process.env["INPUT_WORKING_DIRECTORY"] = path.join(baseDir, "helmfile-lock-update")
const setOutputMock = jest.spyOn(core, "setOutput")

await helmfileDepCheck()
Expand All @@ -63,7 +63,7 @@ describe("helmfile-dep-update", () => {
expect(setOutputMock).toHaveBeenCalledWith("helmfile-lock-updates", [updateData])
})
it("helmfile lock missing", async () => {
process.env["INPUT_WORKING-DIR"] = path.join(baseDir, "helmfile-lock-missing")
process.env["INPUT_WORKING_DIRECTORY"] = path.join(baseDir, "helmfile-lock-missing")
const setOutputMock = jest.spyOn(core, "setOutput")

await helmfileDepCheck()
Expand Down
2 changes: 1 addition & 1 deletion helmfile-dependency-check/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ runs:
using: "node12"
main: "dist/index.js"
inputs:
working-dir:
working_directory:
description: "The directory to run the action in"
default: "."
outputs:
Expand Down
2 changes: 1 addition & 1 deletion helmfile-dependency-check/dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion helmfile-dependency-check/helmfileDepCheck.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export async function helmfileDepCheck() {
helmfileLockUpdates: []
}

const workingDir = getInput("working-dir")
const workingDir = getInput("working_directory")
// path.join is not used, because of issues when building with ncc
const helmfilePath = process.cwd() + "/" + workingDir + "/helmfile.yaml"

Expand Down

0 comments on commit 5c9be6a

Please sign in to comment.