diff --git a/plugin/kustomize.lua b/plugin/kustomize.lua index e018282..ad96e43 100644 --- a/plugin/kustomize.lua +++ b/plugin/kustomize.lua @@ -20,7 +20,7 @@ vim.api.nvim_create_user_command("KustomizeRun", function(opts) local choice = opts.fargs[1] local cmd = config.options.run[choice].cmd local args = config.options.run[choice].args - local timeout = config.options.run[choice].timeout or 5000 + local timeout = config.options.run[choice].timeout or 5000 -- TODO: refactor in one datastructure run.run_checked(cmd, args, timeout) end, { desc = "Run commands", diff --git a/tests/kustomize/test_deprecations.lua b/tests/kustomize/test_deprecations.lua index 83c425d..b09aa0b 100644 --- a/tests/kustomize/test_deprecations.lua +++ b/tests/kustomize/test_deprecations.lua @@ -14,14 +14,14 @@ local want = { describe("no deprecations", function() it("No deprecations for 1.25", function() table.insert(deprecations.args, "tests/kustomize/test_data/depreatations/pass.yaml") - local _, out = run.run(deprecations.cmd, deprecations.args) + local _, out = run.run(deprecations.cmd, deprecations.args, 5000) table.remove(deprecations.args) eq(out, {}) end) it("Deprecation found for 1.25", function() table.insert(deprecations.args, "tests/kustomize/test_data/deprecations/fail.yaml") - local _, out = run.run(deprecations.cmd, deprecations.args) + local _, out = run.run(deprecations.cmd, deprecations.args, 5000) table.remove(deprecations.args) eq(out, out) end) @@ -37,7 +37,7 @@ describe("no deprecations", function() "-f", "tests/kustomize/test_data/deprecations/fail.yaml", } - local _, out = run.run(deprecations.cmd, deprecations.args) + local _, out = run.run(deprecations.cmd, deprecations.args, 5000) table.remove(deprecations.args) eq(out, {}) end) @@ -46,7 +46,7 @@ describe("no deprecations", function() table.insert(deprecations.args, "--output json") -- prevent colored output table.insert(deprecations.args, "--foo") table.insert(deprecations.args, "tests/kustomize/test_data/deprecations/fail.yaml") - local _, out = run.run(deprecations.cmd, deprecations.args) + local _, out = run.run(deprecations.cmd, deprecations.args, 5000) eq(out, { "unknown flag: --foo" }) end) end) diff --git a/tests/kustomize/test_validate.lua b/tests/kustomize/test_validate.lua index ecd9966..c422c6c 100644 --- a/tests/kustomize/test_validate.lua +++ b/tests/kustomize/test_validate.lua @@ -10,14 +10,14 @@ local want = { describe("validate", function() it("valid Kubernetes deployment", function() table.insert(validation.args, "tests/kustomize/test_data/validate/pass.yaml") - local _, out = run.run(validation.cmd, validation.args) + local _, out = run.run(validation.cmd, validation.args, 5000) table.remove(validation.args) eq(out, {}) end) it("invalid Kubernetes deployment", function() table.insert(validation.args, "tests/kustomize/test_data/validate/fail.yaml") - local _, out = run.run(validation.cmd, validation.args) + local _, out = run.run(validation.cmd, validation.args, 5000) table.remove(validation.args) eq(out, want) end)