fix defaults not handled by yaml configuration

This commit is contained in:
CrazyMax
2023-09-23 12:54:17 +02:00
parent 286af41566
commit b9615bf2db
21 changed files with 146 additions and 282 deletions

View File

@@ -10,7 +10,7 @@ import (
)
var (
defaultImageDefaults = model.Image{
defaultImageDefaults = model.ImageDefaults{
NotifyOn: model.NotifyOnDefaults,
SortTags: registry.SortTagReverse,
}
@@ -173,7 +173,9 @@ func TestListJobDirectory(t *testing.T) {
func TestDefaultImageOptions(t *testing.T) {
fc := New(&model.PrdFile{
Filename: "./fixtures/dockerhub.yml",
}, &model.Image{WatchRepo: utl.NewTrue()})
}, &model.ImageDefaults{
WatchRepo: utl.NewTrue(),
})
for _, job := range fc.ListJob() {
assert.True(t, *job.Image.WatchRepo)