fix(git): add a minimum interval validation BE-12220 (#1144)

This commit is contained in:
andres-portainer
2025-09-04 15:11:12 -03:00
committed by GitHub
parent 2ba348551d
commit f8ae5368bf
2 changed files with 18 additions and 4 deletions

View File

@@ -23,6 +23,16 @@ func Test_ValidateAutoUpdate(t *testing.T) {
value: &portainer.AutoUpdateSettings{Interval: "1dd2hh3mm"},
wantErr: true,
},
{
name: "short interval value",
value: &portainer.AutoUpdateSettings{Interval: "1s"},
wantErr: true,
},
{
name: "valid webhook without interval",
value: &portainer.AutoUpdateSettings{Webhook: "8dce8c2f-9ca1-482b-ad20-271e86536ada"},
wantErr: false,
},
{
name: "valid auto update",
value: &portainer.AutoUpdateSettings{