Only require secrets when mutating

Rename `with_lock` to more generic `mutating` and move the env_args
check to that point. This allows read-only actions to be run without
requiring secrets.
This commit is contained in:
Donal McBreen
2023-06-20 09:16:34 +01:00
parent 08d8790851
commit 4950f61a87
11 changed files with 85 additions and 68 deletions

View File

@@ -116,6 +116,12 @@ class CliMainTest < CliTestCase
end
end
test "deploy with missing secrets" do
assert_raises(KeyError) do
run_command("deploy", config_file: "deploy_with_secrets")
end
end
test "redeploy" do
invoke_options = { "config_file" => "test/fixtures/deploy_simple.yml", "version" => "999", "skip_hooks" => false }