diff --git a/cmd/chart-repo/utils.go b/cmd/chart-repo/utils.go index 969eae11f..2f563dd70 100644 --- a/cmd/chart-repo/utils.go +++ b/cmd/chart-repo/utils.go @@ -99,7 +99,8 @@ func syncRepo(dbSession datastore.Session, repoName, repoURL string, authorizati charts := chartsFromIndex(index, r) if len(charts) == 0 { - return errors.New("no charts in repository index") + log.Warnf("The repository %s has no charts.", repoName) + return nil } err = importCharts(dbSession, charts) if err != nil { diff --git a/cmd/chart-repo/utils_test.go b/cmd/chart-repo/utils_test.go index e70ba4c97..894ebd6de 100644 --- a/cmd/chart-repo/utils_test.go +++ b/cmd/chart-repo/utils_test.go @@ -587,5 +587,5 @@ func Test_emptyChartRepo(t *testing.T) { m := mock.Mock{} dbSession := mockstore.NewMockSession(&m) err := syncRepo(dbSession, "testRepo", "https://my.examplerepo.com", "") - assert.ExistsErr(t, err, "Failed Request") + assert.NoErr(t, err) }