feat(gitops): general improvements BE-12919 (#2780)

This commit is contained in:
andres-portainer
2026-06-02 09:44:57 -03:00
committed by GitHub
parent 484af3c2c8
commit 1fa756372e
10 changed files with 190 additions and 124 deletions
+4 -3
View File
@@ -93,14 +93,15 @@ func Test_RefreshableStacks(t *testing.T) {
staticStack := portainer.Stack{ID: 1}
stackWithWebhook := portainer.Stack{ID: 2, AutoUpdate: &portainer.AutoUpdateSettings{Webhook: "webhook"}}
refreshableStack := portainer.Stack{ID: 3, AutoUpdate: &portainer.AutoUpdateSettings{Interval: "1m"}}
intervalNoWorkflow := portainer.Stack{ID: 3, AutoUpdate: &portainer.AutoUpdateSettings{Interval: "1m"}}
refreshableStack := portainer.Stack{ID: 4, WorkflowID: 1, AutoUpdate: &portainer.AutoUpdateSettings{Interval: "1m"}}
for _, stack := range []*portainer.Stack{&staticStack, &stackWithWebhook, &refreshableStack} {
for _, stack := range []*portainer.Stack{&staticStack, &stackWithWebhook, &intervalNoWorkflow, &refreshableStack} {
err := store.Stack().Create(stack)
require.NoError(t, err)
}
stacks, err := store.Stack().RefreshableStacks()
require.NoError(t, err)
assert.ElementsMatch(t, []portainer.Stack{refreshableStack}, stacks)
require.ElementsMatch(t, []portainer.Stack{refreshableStack}, stacks)
}