fix(discovery): add missing lua syntax and return to discovery (fixes #24257) (#24262)

Signed-off-by: jan-mrm <67435696+jan-mrm@users.noreply.github.com>
This commit is contained in:
jan-mrm
2025-08-25 21:08:34 +02:00
committed by GitHub
parent 1c5d7f1f65
commit b20fd4342f
5 changed files with 86 additions and 5 deletions

View File

@@ -15,4 +15,7 @@ end
if forcePromote then
actions["force-promote"]["disabled"] = false
else
actions["force-promote"]["disabled"] = true
actions["force-promote"]["disabled"] = true
end
return actions

View File

@@ -10,4 +10,40 @@ actionTests:
expectedOutputPath: testdata/monovertex-unpause-fast.yaml
- action: force-promote
inputPath: testdata/monovertex.yaml
expectedOutputPath: testdata/monovertex-force-promote.yaml
expectedOutputPath: testdata/monovertex-force-promote.yaml
discoveryTests:
- inputPath: testdata/monovertex.yaml
result:
- name: pause
disabled: false
iconClass: 'fa-solid fa-fw fa-pause'
- name: unpause-gradual
disabled: true
iconClass: 'fa-solid fa-fw fa-play'
displayName: 'Unpause (gradual)'
- name: unpause-fast
disabled: true
iconClass: 'fa-solid fa-fw fa-play'
displayName: 'Unpause (fast)'
- name: force-promote
disabled: false
iconClass: 'fa-solid fa-fw fa-forward'
displayName: 'Force Promote'
- inputPath: testdata/monovertex-paused.yaml
result:
- name: pause
disabled: true
iconClass: 'fa-solid fa-fw fa-pause'
- name: unpause-gradual
disabled: false
iconClass: 'fa-solid fa-fw fa-play'
displayName: 'Unpause (gradual)'
- name: unpause-fast
disabled: true
iconClass: 'fa-solid fa-fw fa-play'
displayName: 'Unpause (fast)'
- name: force-promote
disabled: false
iconClass: 'fa-solid fa-fw fa-forward'
displayName: 'Force Promote'

View File

@@ -54,4 +54,7 @@ end
if forcePromote then
actions["force-promote"]["disabled"] = false
else
actions["force-promote"]["disabled"] = true
actions["force-promote"]["disabled"] = true
end
return actions

View File

@@ -10,4 +10,40 @@ actionTests:
expectedOutputPath: testdata/pipeline-unpause-fast.yaml
- action: force-promote
inputPath: testdata/pipeline.yaml
expectedOutputPath: testdata/pipeline-force-promote.yaml
expectedOutputPath: testdata/pipeline-force-promote.yaml
discoveryTests:
- inputPath: testdata/pipeline.yaml
result:
- name: pause
disabled: false
iconClass: 'fa-solid fa-fw fa-pause'
- name: unpause-gradual
disabled: true
iconClass: 'fa-solid fa-fw fa-play'
displayName: 'Unpause (gradual)'
- name: unpause-fast
disabled: true
iconClass: 'fa-solid fa-fw fa-play'
displayName: 'Unpause (fast)'
- name: force-promote
disabled: false
iconClass: 'fa-solid fa-fw fa-forward'
displayName: 'Force Promote'
- inputPath: testdata/pipeline-paused.yaml
result:
- name: pause
disabled: true
iconClass: 'fa-solid fa-fw fa-pause'
- name: unpause-gradual
disabled: false
iconClass: 'fa-solid fa-fw fa-play'
displayName: 'Unpause (gradual)'
- name: unpause-fast
disabled: true
iconClass: 'fa-solid fa-fw fa-play'
displayName: 'Unpause (fast)'
- name: force-promote
disabled: false
iconClass: 'fa-solid fa-fw fa-forward'
displayName: 'Force Promote'

View File

@@ -54,4 +54,7 @@ end
if forcePromote then
actions["force-promote"]["disabled"] = false
else
actions["force-promote"]["disabled"] = true
actions["force-promote"]["disabled"] = true
end
return actions