mirror of
https://github.com/argoproj/argo-cd
synced 2026-04-21 17:07:16 +00:00
Signed-off-by: ralf.weber <ralf.weber@cistec.com> Co-authored-by: ralf.weber <ralf.weber@cistec.com>
This commit is contained in:
parent
d3bdc9d5f3
commit
6c38186f7f
4 changed files with 24 additions and 10 deletions
|
|
@ -2,3 +2,8 @@ actionTests:
|
|||
- action: refresh
|
||||
inputPath: testdata/external-secret.yaml
|
||||
expectedOutputPath: testdata/external-secret-updated.yaml
|
||||
|
||||
discoveryTests:
|
||||
- inputPath: testdata/external-secret.yaml
|
||||
result:
|
||||
- name: "refresh"
|
||||
|
|
|
|||
|
|
@ -3,11 +3,13 @@ local actions = {}
|
|||
local disable_refresh = false
|
||||
local time_units = {"ns", "us", "µs", "ms", "s", "m", "h"}
|
||||
local digits = obj.spec.refreshInterval
|
||||
for _, time_unit in ipairs(time_units) do
|
||||
digits, _ = digits:gsub(time_unit, "")
|
||||
if tonumber(digits) == 0 then
|
||||
disable_refresh = true
|
||||
break
|
||||
if digits ~= nil then
|
||||
digits = tostring(digits)
|
||||
for _, time_unit in ipairs(time_units) do
|
||||
if digits == "0" or digits == "0" .. time_unit then
|
||||
disable_refresh = true
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -2,3 +2,8 @@ actionTests:
|
|||
- action: push
|
||||
inputPath: testdata/push-secret.yaml
|
||||
expectedOutputPath: testdata/push-secret-updated.yaml
|
||||
|
||||
discoveryTests:
|
||||
- inputPath: testdata/push-secret.yaml
|
||||
result:
|
||||
- name: "push"
|
||||
|
|
|
|||
|
|
@ -3,11 +3,13 @@ local actions = {}
|
|||
local disable_push = false
|
||||
local time_units = {"ns", "us", "µs", "ms", "s", "m", "h"}
|
||||
local digits = obj.spec.refreshInterval
|
||||
for _, time_unit in ipairs(time_units) do
|
||||
digits, _ = digits:gsub(time_unit, "")
|
||||
if tonumber(digits) == 0 then
|
||||
disable_push = true
|
||||
break
|
||||
if digits ~= nil then
|
||||
digits = tostring(digits)
|
||||
for _, time_unit in ipairs(time_units) do
|
||||
if digits == "0" or digits == "0" .. time_unit then
|
||||
disable_push = true
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue